diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 15:41:35 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-01-30 15:41:35 -0500 |
| commit | c882c9dd80d1d2007b96132eeb06d1151ea4d30c (patch) | |
| tree | a4dcf5be67c1b7344a4e907f5994d63b7ed7b161 /bfdd/ptm_adapter.c | |
| parent | f91d3ae36c8cdbc65afb3fe517ea68700fa8ed30 (diff) | |
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/ptm_adapter.c')
| -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 57fb81aa27..db636c9191 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; |
