]> git.ipfire.org Git - thirdparty/lldpd.git/commit
lldpd: do not stay stuck in the receive loop 0.5.7
authorVincent Bernat <bernat@luffy.cx>
Wed, 29 Feb 2012 22:14:41 +0000 (23:14 +0100)
committerVincent Bernat <bernat@luffy.cx>
Wed, 29 Feb 2012 22:25:50 +0000 (23:25 +0100)
commita8b66dd39ca5de2d796d2ffd9db7505e853e8a87
tree72c7ca72370733961ca7787e9a38a609e773d60b
parentc1232d59d6f3ffe5d9c3411de869dd5d66c8500d
lldpd: do not stay stuck in the receive loop

On some corner case conditions, we can stay stuck in the receive loop
because we did not send packets for more than 30 seconds. In this
case, we keep reset the timeout to 30 seconds and we cannot exit the
loop (since the first condition to exit the loop is to have reached
the timeout).

Therefore, we invert the condition. If we have stay too long in the
loop, just exit. We know for sure that we will hit lldpd_send_all()
soon and get back to a sane state.

Also, in receive only state, we are also stuck in the loop. This
forbids us to update data about local chassis and interfaces. We also
fix this.
CHANGELOG
configure.ac
src/lldpd.c