]> git.puffer.fish Git - mirror/frr.git/commit
vrrpd: fix broken reads when reinitializing
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 5 Mar 2019 20:33:27 +0000 (20:33 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 17 May 2019 00:27:08 +0000 (00:27 +0000)
commita90edf08e3ccdfd466a3663f87abc59931a56e7f
tree4e1193647717dcb9096df1faf646a093f1ad9e09
parent18ca2e1ff40c86920804c7967a0a0828c2911996
vrrpd: fix broken reads when reinitializing

When a VRRP router was shut down - either due to an administrative
event, or its interface getting deleted, or some other reason - it was
forgetting to cancel its read task. When it was started again, the read
task was still around, and so it wasn't getting scheduled again with the
new socket fd's. This caused our socket to queue ingress packets but
never read them, resulting in the restarted router always electing
itself to Master (since it wasn't listening to any other advertisements,
even though the kernel was delivering them).

The t_write cancellation call doesn't matter here, but I'm putting it in
there because it doesn't hurt and this way I won't forget about it if it
becomes necessary in the future.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
vrrpd/vrrp.c