summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-12-23 15:11:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-12-23 15:11:42 +0000
commit22f4b7bfb9c9331c9bbccb00a1f046568d0a205c (patch)
tree7f6c89ec49a6dfecbcbd0a441a8a97f47b5de3f0
parent8640ed18d254c01ccd2e43c98334e3a84dbd726b (diff)
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)