svn commit: r264241 - head/sys/net

Michael Tuexen tuexen at FreeBSD.org
Mon Apr 7 21:28:21 UTC 2014


Author: tuexen
Date: Mon Apr  7 21:28:21 2014
New Revision: 264241
URL: http://svnweb.freebsd.org/changeset/base/264241

Log:
  Call sctp_addr_change() from rt_addrmsg() instead of rt_newaddrmsg_fib(),
  since rt_addrmsg() gets also called from other functions.
  
  MFC after: 3 days

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c	Mon Apr  7 21:18:12 2014	(r264240)
+++ head/sys/net/route.c	Mon Apr  7 21:28:21 2014	(r264241)
@@ -1773,6 +1773,16 @@ rt_addrmsg(int cmd, struct ifaddr *ifa, 
 	KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
 	    ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
 
+#if defined(INET) || defined(INET6)
+#ifdef SCTP
+	/*
+	 * notify the SCTP stack
+	 * this will only get called when an address is added/deleted
+	 * XXX pass the ifaddr struct instead if ifa->ifa_addr...
+	 */
+	sctp_addr_change(ifa, cmd);
+#endif /* SCTP */
+#endif
 	return (rtsock_addrmsg(cmd, ifa, fibnum));
 }
 
@@ -1823,16 +1833,6 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr
 	KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
 	    ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
 
-#if defined(INET) || defined(INET6)
-#ifdef SCTP
-	/*
-	 * notify the SCTP stack
-	 * this will only get called when an address is added/deleted
-	 * XXX pass the ifaddr struct instead if ifa->ifa_addr...
-	 */
-	sctp_addr_change(ifa, cmd);
-#endif /* SCTP */
-#endif
 	if (cmd == RTM_ADD) {
 		rt_addrmsg(cmd, ifa, fibnum);
 		if (rt != NULL)


More information about the svn-src-head mailing list