ripd: fix null-pointer dereference

Fixes #13416.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2023-05-03 17:01:36 -03:00
parent abecbc3df1
commit bf384bbc90

View File

@ -1110,9 +1110,10 @@ void rip_interface_sync(struct interface *ifp)
struct rip_interface *ri; struct rip_interface *ri;
ri = ifp->info; ri = ifp->info;
ri->ifp = ifp; if (ri) {
if (ri)
ri->rip = ifp->vrf->info; ri->rip = ifp->vrf->info;
ri->ifp = ifp;
}
} }
/* Called when interface structure allocated. */ /* Called when interface structure allocated. */