Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2015 10:24:17 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283696 - head/sys/netinet6
Message-ID:  <201505291024.t4TAOHwX059477@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri May 29 10:24:16 2015
New Revision: 283696
URL: https://svnweb.freebsd.org/changeset/base/283696

Log:
  Move RTM announces into generic code to be independent from Layer2 code.
  This fixes bug introduced in 274988, when announces about new addresses
  don't sent for tunneling interfaces.
  
  Reported by:	tuexen@
  MFC after:	1 week

Modified:
  head/sys/netinet6/in6.c
  head/sys/netinet6/nd6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Fri May 29 10:07:20 2015	(r283695)
+++ head/sys/netinet6/in6.c	Fri May 29 10:24:16 2015	(r283696)
@@ -1279,6 +1279,7 @@ in6_broadcast_ifa(struct ifnet *ifp, str
 		nd6_dad_start((struct ifaddr *)ia, delay);
 	}
 
+	in6_newaddrmsg(ia, RTM_ADD);
 	ifa_free(&ia->ia_ifa);
 	return (error);
 }
@@ -1327,6 +1328,7 @@ in6_purgeaddr(struct ifaddr *ifa)
 		ia->ia_flags &= ~IFA_ROUTE;
 	}
 
+	in6_newaddrmsg(ia, RTM_DELETE);
 	in6_unlink_ifa(ia, ifp);
 }
 

Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c	Fri May 29 10:07:20 2015	(r283695)
+++ head/sys/netinet6/nd6.c	Fri May 29 10:24:16 2015	(r283696)
@@ -2185,7 +2185,6 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia)
 		ln->la_expire = 0;  /* for IPv6 this means permanent */
 		ln->ln_state = ND6_LLINFO_REACHABLE;
 		LLE_WUNLOCK(ln);
-		in6_newaddrmsg(ia, RTM_ADD);
 		return (0);
 	}
 
@@ -2205,8 +2204,6 @@ nd6_rem_ifa_lle(struct in6_ifaddr *ia)
 	struct sockaddr_in6 mask, addr;
 	struct ifnet *ifp;
 
-	in6_newaddrmsg(ia, RTM_DELETE);
-
 	ifp = ia->ia_ifa.ifa_ifp;
 	memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
 	memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505291024.t4TAOHwX059477>