[ovs-dev] [PATCH] bfd: Notify connectivity_seq on rmt_state changes.

Joe Stringer joestringer at nicira.com
Wed Dec 25 00:50:53 UTC 2013


The bfd module did not previously change the global connectivity_seq
when the remote state changed, which means that such state changes may
not be propagated to the database. This is particularly bad if this is
the last state transition to happen in an otherwise stable environment.
This patch checks for transitions in remote state, and ensures that the
main thread will update the database when these happen.

Bug #22136.

Co-authored-by: Alex Wang <alexw at nicira.com>
Signed-off-by: Joe Stringer <joestringer at nicira.com>
---
 lib/bfd.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bfd.c b/lib/bfd.c
index a4179f8..b8574d5 100644
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -735,6 +735,10 @@ bfd_process_packet(struct bfd *bfd, const struct flow *flow,
         goto out;
     }
 
+    if (bfd->rmt_state != rmt_state) {
+        seq_change(connectivity_seq_get());
+    }
+
     bfd->rmt_disc = ntohl(msg->my_disc);
     bfd->rmt_state = rmt_state;
     bfd->rmt_flags = flags;
-- 
1.7.9.5




More information about the dev mailing list