From: Joe Stringer Date: Wed, 25 Dec 2013 00:50:53 +0000 (-0800) Subject: bfd: Notify connectivity_seq on rmt_state changes. X-Git-Tag: v2.1.0~53 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=b79b0811351b181f94b3f815aa267a5385868fdc bfd: Notify connectivity_seq on rmt_state changes. 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 Signed-off-by: Joe Stringer Signed-off-by: Ben Pfaff --- diff --git a/lib/bfd.c b/lib/bfd.c index a4179f869..b8574d516 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;