diff options
author | Pavithra Ramesh <paramesh@vmware.com> | 2013-05-28 12:35:06 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2013-05-28 12:37:32 -0700 |
commit | 8aee94b6ea4fe91d4120803c0d7ec0635bdd83bd (patch) | |
tree | 3be5e8e843ec56322763cd47ecaaa436d11e7b59 /lib/bfd.c | |
parent | 393231b26a529fb189b3228061d5cd2e316adb05 (diff) | |
download | openvswitch-8aee94b6ea4fe91d4120803c0d7ec0635bdd83bd.tar.gz |
BFD: Reconfigure BFD on port deletion.
Invoke the function to reconfigure BFD when a port/interface
is deleted.
Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/bfd.c')
-rw-r--r-- | lib/bfd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -229,7 +229,8 @@ bfd_get_status(const struct bfd *bfd, struct smap *smap) /* Initializes, destroys, or reconfigures the BFD session 'bfd' (named 'name'), * according to the database configuration contained in 'cfg'. Takes ownership * of 'bfd', which may be NULL. Returns a BFD object which may be used as a - * handle for the session, or NULL if BFD is not enabled according to 'cfg'. */ + * handle for the session, or NULL if BFD is not enabled according to 'cfg'. + * Also returns NULL if cfg is NULL. */ struct bfd * bfd_configure(struct bfd *bfd, const char *name, const struct smap *cfg) @@ -246,7 +247,7 @@ bfd_configure(struct bfd *bfd, const char *name, init = true; } - if (!smap_get_bool(cfg, "enable", false)) { + if (!cfg || !smap_get_bool(cfg, "enable", false)) { if (bfd) { hmap_remove(&all_bfds, &bfd->node); free(bfd->name); |