diff options
author | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 21:41:35 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 21:41:35 +0100 |
commit | c882c9dd80d1d2007b96132eeb06d1151ea4d30c (patch) | |
tree | a4dcf5be67c1b7344a4e907f5994d63b7ed7b161 /bfdd | |
parent | bfdd: Prevent unininited data transmittal (diff) | |
download | frr-c882c9dd80d1d2007b96132eeb06d1151ea4d30c.tar.xz frr-c882c9dd80d1d2007b96132eeb06d1151ea4d30c.zip |
bfdd: Prevent storage of ifp pointer that has been deleted
On shutdown, interfaces are deleted but if the bfd session
is down we retain the interface pointer. Remove the retained
pointer.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/ptm_adapter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 57fb81aa2..db636c919 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -706,8 +706,10 @@ static void bfdd_sessions_disable_interface(struct interface *ifp) if (strcmp(ifp->name, bs->key.ifname)) continue; /* Skip disabled sessions. */ - if (bs->sock == -1) + if (bs->sock == -1) { + bs->ifp = NULL; continue; + } bfd_session_disable(bs); bs->ifp = NULL; |