summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-12-23 15:11:41 +0000
committerclaudio <claudio@openbsd.org>2009-12-23 15:11:41 +0000
commit3bea17528427a979ee731e3f8a4c8b6b47f56ffa (patch)
treedf986681335ae39648d079a4dc635b30137b601a
parentThe process's rdomain should be, well, per-process and not per-rthread, (diff)
downloadwireguard-openbsd-3bea17528427a979ee731e3f8a4c8b6b47f56ffa.tar.xz
wireguard-openbsd-3bea17528427a979ee731e3f8a4c8b6b47f56ffa.zip
Loopback interface don't have link local addresses so use the real IPv6
address for so that the device is no considered unnumbered.
-rw-r--r--usr.sbin/ospf6d/kroute.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/kroute.c b/usr.sbin/ospf6d/kroute.c
index 5fbf4b92d90..fbebd40abb3 100644
--- a/usr.sbin/ospf6d/kroute.c
+++ b/usr.sbin/ospf6d/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.17 2009/12/22 19:44:52 claudio Exp $ */
+/* $OpenBSD: kroute.c,v 1.18 2009/12/23 15:11:41 claudio Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -861,7 +861,8 @@ if_newaddr(u_short ifindex, struct sockaddr_in6 *ifa, struct sockaddr_in6 *mask,
ifa->sin6_addr.s6_addr[3] = 0;
}
- if (IN6_IS_ADDR_LINKLOCAL(&ifa->sin6_addr))
+ if (IN6_IS_ADDR_LINKLOCAL(&ifa->sin6_addr) ||
+ iface->flags & IFF_LOOPBACK)
iface->addr = ifa->sin6_addr;
if ((ia = calloc(1, sizeof(struct iface_addr))) == NULL)