diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-11-11 00:11:16 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-11-11 00:11:16 +0000 |
commit | 19abd8e7d2183697a1a2132a978b27152b212716 (patch) | |
tree | d00f7734956187ed6152771be9eddee0fafdc60d /sys/netinet6 | |
parent | 52810dff5367ae5035ebb3bc5b3363810db536e5 (diff) |
do not panic on "ifconfig lo0 inet6 fe80::1 -alias". KAME PR 295.
(NOTE: only root can do it)
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index ddf14e82340..75d9be2769f 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,5 +1,5 @@ -/* $OpenBSD: in6.c,v 1.21 2000/10/06 05:52:01 itojun Exp $ */ -/* $KAME: in6.c,v 1.107 2000/10/06 04:58:30 itojun Exp $ */ +/* $OpenBSD: in6.c,v 1.22 2000/11/11 00:11:15 itojun Exp $ */ +/* $KAME: in6.c,v 1.109 2000/10/24 07:19:01 jinmei Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -1126,7 +1126,14 @@ in6_ifscrub(ifp, ia) { if ((ia->ia_flags & IFA_ROUTE) == 0) return; - if (ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) + /* + * We should check the existence of dstaddr, because link-local + * addresses can be configured without particular destinations + * even on point-to-point or loopback interfaces. + * In this case, kernel would panic in rtinit()... + */ + if (ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT) && + (ia->ia_ifa.ifa_dstaddr != NULL)) rtinit(&(ia->ia_ifa), (int)RTM_DELETE, RTF_HOST); else rtinit(&(ia->ia_ifa), (int)RTM_DELETE, 0); |