summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2014-04-07 21:28:21 +0000
committertuexen <tuexen@FreeBSD.org>2014-04-07 21:28:21 +0000
commit90c4737aa09effa5521c1b9f11ec2e6ef27a89e8 (patch)
treeb0785228b0cea449aba88ef3165b952fa57f0f49
parentfe8b77648757d952d14bbc941f2818b0114434b0 (diff)
downloadFreeBSD-src-90c4737aa09effa5521c1b9f11ec2e6ef27a89e8.zip
FreeBSD-src-90c4737aa09effa5521c1b9f11ec2e6ef27a89e8.tar.gz
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
-rw-r--r--sys/net/route.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index c7211a7..748b0ca 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1773,6 +1773,16 @@ rt_addrmsg(int cmd, struct ifaddr *ifa, int fibnum)
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 *ifa, int error, struct rtentry *rt,
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)
OpenPOWER on IntegriCloud