]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: ignore unknown address-family in netlink route msg
authorMark Stapp <mjs.ietf@gmail.com>
Tue, 10 Aug 2021 15:44:08 +0000 (11:44 -0400)
committerMark Stapp <mjs.ietf@gmail.com>
Tue, 10 Aug 2021 15:44:08 +0000 (11:44 -0400)
Ignore AFs we don't handle in incoming netlink route
updates.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
zebra/rt_netlink.c

index a64ec52dda3887c46b97957ad2c23d5e0a5abae3..48ccf91ec7d23bf954f8892c8e8633efa610356c 100644 (file)
@@ -861,6 +861,12 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
                }
                memcpy(&src_p.prefix, src, 16);
                src_p.prefixlen = rtm->rtm_src_len;
+       } else {
+               /* We only handle the AFs we handle... */
+               if (IS_ZEBRA_DEBUG_KERNEL)
+                       zlog_debug("%s: unknown address-family %u", __func__,
+                                  rtm->rtm_family);
+               return 0;
        }
 
        /*