summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_ifattach.c
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2005-10-19 16:43:57 +0000
committersuz <suz@FreeBSD.org>2005-10-19 16:43:57 +0000
commit0fd6aaa3c72e091ea82eeb6ca31260249efa9d73 (patch)
tree2070f4924e6453dbc954b97947d35fc326589fea /sys/netinet6/in6_ifattach.c
parentbb15d175e9f27891f493c926b38dfcc2a7f35d88 (diff)
downloadFreeBSD-src-0fd6aaa3c72e091ea82eeb6ca31260249efa9d73.zip
FreeBSD-src-0fd6aaa3c72e091ea82eeb6ca31260249efa9d73.tar.gz
sync with KAME regarding the following clarification in RFC3542:
- disable IPv6 operation if DAD fails for some EUI-64 link-local addresses. - export get_hw_ifid() (and rename it) as a subroutine for this process. Obtained from: KAME Reviewd by: ume, gnn MFC after: 2 week
Diffstat (limited to 'sys/netinet6/in6_ifattach.c')
-rw-r--r--sys/netinet6/in6_ifattach.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index d9244dc..1ddf5fe 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -75,7 +75,6 @@ extern struct inpcbinfo ripcbinfo;
static int get_rand_ifid __P((struct ifnet *, struct in6_addr *));
static int generate_tmp_ifid __P((u_int8_t *, const u_int8_t *, u_int8_t *));
-static int get_hw_ifid __P((struct ifnet *, struct in6_addr *));
static int get_ifid __P((struct ifnet *, struct ifnet *, struct in6_addr *));
static int in6_ifattach_linklocal __P((struct ifnet *, struct ifnet *));
static int in6_ifattach_loopback __P((struct ifnet *));
@@ -217,8 +216,8 @@ generate_tmp_ifid(seed0, seed1, ret)
* Get interface identifier for the specified interface.
* XXX assumes single sockaddr_dl (AF_LINK address) per an interface
*/
-static int
-get_hw_ifid(ifp, in6)
+int
+in6_get_hw_ifid(ifp, in6)
struct ifnet *ifp;
struct in6_addr *in6; /* upper 64bits are preserved */
{
@@ -359,14 +358,14 @@ get_ifid(ifp0, altifp, in6)
struct ifnet *ifp;
/* first, try to get it from the interface itself */
- if (get_hw_ifid(ifp0, in6) == 0) {
+ if (in6_get_hw_ifid(ifp0, in6) == 0) {
nd6log((LOG_DEBUG, "%s: got interface identifier from itself\n",
if_name(ifp0)));
goto success;
}
/* try secondary EUI64 source. this basically is for ATM PVC */
- if (altifp && get_hw_ifid(altifp, in6) == 0) {
+ if (altifp && in6_get_hw_ifid(altifp, in6) == 0) {
nd6log((LOG_DEBUG, "%s: got interface identifier from %s\n",
if_name(ifp0), if_name(altifp)));
goto success;
@@ -377,7 +376,7 @@ get_ifid(ifp0, altifp, in6)
for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) {
if (ifp == ifp0)
continue;
- if (get_hw_ifid(ifp, in6) != 0)
+ if (in6_get_hw_ifid(ifp, in6) != 0)
continue;
/*
OpenPOWER on IntegriCloud