]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: fix crash when removing router from vrf that doesn't exist
authorIgor Ryzhov <iryzhov@nfware.com>
Fri, 7 May 2021 14:52:41 +0000 (17:52 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 17 May 2021 22:27:16 +0000 (01:27 +0300)
`listgetdata(listhead(list))` crashes for an empty list.

Reproducible with:
```
router ospf6 vrf doesntexist
 default-information originate always
 exit
no router ospf6 vrf doesntexist
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
ospf6d/ospf6_asbr.c

index 6981baba99d1a18e1222a1e62b66442e7509cdee..ccab39481ef16ca28aa5301e4f5433874cb3a921 100644 (file)
@@ -579,7 +579,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
        if (ospf6_is_router_abr(ospf6))
                oa = ospf6->backbone;
        else
-               oa = listgetdata(listhead(ospf6->area_list));
+               oa = listnode_head(ospf6->area_list);
 
        if (oa == NULL)
                return;