]> git.ipfire.org Git - thirdparty/lldpd.git/commit - src/lldpd.c
lldpd: do not stay stuck in the receive loop
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:32:45 +0000 (23:32 +0100)
commitc520cb1446b2bab4d5dbc942aaae44f34458850a
tree7b4afe54f3357e7d827d3677420143ce624aea00
parent350cd69596aebc9d72885d00e7e12e3634790111
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
src/lldpd.c