Commit 88bf179aa3 (bfd/cfm: Check status change before update status to database.) used a boolean flag to trigger bfd status update. However, the flag is not set on bfd creation and deletion.
To prevent any stale status in database, this commit makes bfd module always set the flag on bfd creation and deletion. Signed-off-by: Alex Wang <al...@nicira.com> --- lib/bfd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bfd.c b/lib/bfd.c index 2d53bd2..d83d198 100644 --- a/lib/bfd.c +++ b/lib/bfd.c @@ -388,6 +388,8 @@ bfd_configure(struct bfd *bfd, const char *name, const struct smap *cfg, bfd_set_state(bfd, STATE_DOWN, DIAG_NONE); memcpy(bfd->eth_dst, eth_addr_bfd, ETH_ADDR_LEN); + + bfd_status_changed(bfd); } atomic_store(&bfd->check_tnl_key, @@ -492,6 +494,7 @@ bfd_unref(struct bfd *bfd) OVS_EXCLUDED(mutex) { if (bfd && ovs_refcount_unref(&bfd->ref_cnt) == 1) { ovs_mutex_lock(&mutex); + bfd_status_changed(bfd); hmap_remove(all_bfds, &bfd->node); netdev_close(bfd->netdev); free(bfd->name); -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev