From: Igor Ryzhov Date: Fri, 7 May 2021 14:52:41 +0000 (+0300) Subject: ospf6d: fix crash when removing router from vrf that doesn't exist X-Git-Tag: base_8.1~520^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c84bbb2ad04f04d0a2420c7aa36d7935c454972d;p=mirror%2Ffrr.git ospf6d: fix crash when removing router from vrf that doesn't exist `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 --- diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 6981baba99..ccab39481e 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -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;