bfd: Require bfd control packet received in forwarding_if_rx mode.
authorAlex Wang <alexw@nicira.com>
Wed, 16 Apr 2014 23:00:40 +0000 (16:00 -0700)
committerAlex Wang <alexw@nicira.com>
Wed, 30 Apr 2014 23:25:09 +0000 (16:25 -0700)
commit34c88624ad02129a1b477717fe5d3928530dccbe
tree67e04876a083b31b5cf7a651c46bdd432e79c0c3
parent5767a79a40599e5e6e70662833b27ffdbdab7e37
bfd: Require bfd control packet received in forwarding_if_rx mode.

This commit adds a requirement that bfd session must receive at least
one bfd control packet every 100 * bfd->cfg_min_rx amount of time in
forwarding_if_rx mode.  Otherwise, even if the data packets are received
on the monitored interface, the bfd->forwarding is still false.

Since the datapath flow is not purged when the userspace Open Vswitch
crashes, data packet can still be forwarded through the tunnel and
fool the remote BFD session in forwarding_if_rx mode.  Thus, this commit
can prevent the remote BFD session from falsely declaring tunnel liveness
in this situation.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/bfd.c
tests/bfd.at
vswitchd/vswitch.xml