summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ospf6d/parse.y')
-rw-r--r--usr.sbin/ospf6d/parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y
index f163e24149d..d49df81a81e 100644
--- a/usr.sbin/ospf6d/parse.y
+++ b/usr.sbin/ospf6d/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.49 2020/01/21 20:38:52 remi Exp $ */
+/* $OpenBSD: parse.y,v 1.50 2020/12/29 19:44:26 benno Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -1253,7 +1253,8 @@ get_rtr_id(void)
for (ifa = ifap; ifa; ifa = ifa->ifa_next) {
if (strncmp(ifa->ifa_name, "carp", 4) == 0)
continue;
- if (ifa->ifa_addr->sa_family != AF_INET)
+ if (ifa->ifa_addr == NULL ||
+ ifa->ifa_addr->sa_family != AF_INET)
continue;
cur = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr;
if ((cur & localnet) == localnet) /* skip 127/8 */