]> git.proxmox.com Git - mirror_frr.git/commitdiff
ripd: fix null-pointer dereference
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 3 May 2023 20:01:36 +0000 (17:01 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Wed, 3 May 2023 20:01:36 +0000 (17:01 -0300)
Fixes #13416.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_interface.c

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