]> git.puffer.fish Git - matthieu/frr.git/commitdiff
nhrpd: Fix multicast crash due to dangling references to nhrp peers
authorReuben Dowle <reuben.dowle@4rf.com>
Wed, 17 Feb 2021 00:49:06 +0000 (13:49 +1300)
committerReuben Dowle <reuben.dowle@4rf.com>
Mon, 5 Apr 2021 21:22:59 +0000 (09:22 +1200)
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
nhrpd/nhrp_multicast.c

index 0c5de838ad5782ad82057743fe97ae3624c2e43e..6feab210c97e06966e31ffa4a9fc6a4e97442262 100755 (executable)
@@ -62,8 +62,8 @@ static void nhrp_multicast_forward_nbma(union sockunion *nbma_addr, struct inter
        if(p && p->online) {
                /* Send packet */
                nhrp_multicast_send(p, pkt);
-               nhrp_peer_unref(p);
        }
+       nhrp_peer_unref(p);
 }
 
 static void nhrp_multicast_forward_cache(struct nhrp_cache *c, void *pctx)