bfd: Set next_tx correctly when processing packets
authorJoe Stringer <joestringer@nicira.com>
Fri, 6 Dec 2013 20:22:07 +0000 (12:22 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 17 Dec 2013 22:26:07 +0000 (14:26 -0800)
commit122bbcc44da26f92131f4d3032df427af6d04ce6
treec6c05818aef5e1807cde85c606a9b83a4fdcedf8
parentbf24a5f9cd5965767e040d2b3245a7fb289601c6
bfd: Set next_tx correctly when processing packets

In the case where we have not yet sent a control packet for a bfd
connection, and we receive a control packet from the remote host,
bfd->next_tx is updated to an unusual value. This causes the logging to
incorrectly report that there has been long delays (in the order of
weeks) since the last bfd transmission time.

This patch only modifies bfd->next_tx in this case if we are not
expecting to immediately send a control packet. This should mean that
bfd->next_tx is either 0 (immediate tx) or in the order of time_msec().

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/bfd.c