Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys inhibit error code from rtinit(). this happens when we ...
details: https://anonhg.NetBSD.org/src/rev/3e21ce9e2d48
branches: trunk
changeset: 495646:3e21ce9e2d48
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Aug 02 15:03:02 2000 +0000
description:
inhibit error code from rtinit(). this happens when we try to assign
multiple addresses from same prefix, onto single interface. PR 10427.
more info:
- 4.4BSD did not check return code from in_ifinit() at all.
4.4BSD does not support multiple address from same prefix.
- past KAME change passed in{,6}_ifinit() to upwards, toward ifconfig(8).
the behavior is filed as PR 10427.
- the commit inhibits EEXIST from rtinit(), hence partially recovers old
4.4BSD behavior.
- the right thing to happen is to properly support multiple address assignment
from the same prefix. KAME tree has more extensive change, however, it needs
much more time to get stabilized (rtentry refcnt change can cause serious
issue, we really need to bake it before bring it to netbsd)
diffstat:
sys/netinet/in.c | 5 ++++-
sys/netinet6/in6.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 3ddb47abfdf3 -r 3e21ce9e2d48 sys/netinet/in.c
--- a/sys/netinet/in.c Wed Aug 02 14:40:45 2000 +0000
+++ b/sys/netinet/in.c Wed Aug 02 15:03:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.61 2000/05/06 02:41:32 mycroft Exp $ */
+/* $NetBSD: in.c,v 1.62 2000/08/02 15:03:02 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -878,6 +878,9 @@
error = rtinit(&ia->ia_ifa, (int)RTM_ADD, flags);
if (!error)
ia->ia_flags |= IFA_ROUTE;
+ /* XXX check if the subnet route points to the same interface */
+ if (error == EEXIST)
+ error = 0;
/*
* If the interface supports multicast, join the "all hosts"
* multicast group on that interface.
diff -r 3ddb47abfdf3 -r 3e21ce9e2d48 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Wed Aug 02 14:40:45 2000 +0000
+++ b/sys/netinet6/in6.c Wed Aug 02 15:03:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.c,v 1.33 2000/07/13 09:56:20 itojun Exp $ */
+/* $NetBSD: in6.c,v 1.34 2000/08/02 15:03:04 itojun Exp $ */
/* $KAME: in6.c,v 1.99 2000/07/11 17:00:58 jinmei Exp $ */
/*
@@ -1264,6 +1264,9 @@
}
if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, flags)) == 0)
ia->ia_flags |= IFA_ROUTE;
+ /* XXX check if the subnet route points to the same interface */
+ if (error == EEXIST)
+ error = 0;
/* Add ownaddr as loopback rtentry, if necessary(ex. on p2p link). */
in6_ifaddloop(&(ia->ia_ifa));
Home |
Main Index |
Thread Index |
Old Index