]> git.proxmox.com Git - mirror_frr.git/blobdiff - bfdd/ptm_adapter.c
bfdd: Prevent storage of ifp pointer that has been deleted
[mirror_frr.git] / bfdd / ptm_adapter.c
index 57fb81aa27a733163a16c846dd3917eb766720c1..db636c91919c9760db91071f3a8681d97f900243 100644 (file)
@@ -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;