summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index f1c1a300..216625e9 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -673,6 +673,13 @@ netlink_interface_addr (struct sockaddr_nl *snl, struct nlmsghdr *h)
broad = NULL;
}
+ /* addr is primary key, SOL if we don't have one */
+ if (addr == NULL)
+ {
+ zlog_debug ("%s: NULL address", __func__);
+ return -1;
+ }
+
/* Flags. */
if (ifa->ifa_flags & IFA_F_SECONDARY)
SET_FLAG (flags, ZEBRA_IFA_SECONDARY);