summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_bsd_addr.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2008-07-09 16:45:30 +0000
committerrrs <rrs@FreeBSD.org>2008-07-09 16:45:30 +0000
commita51aa927fad5ab9ebbb294340935d462f68ee19b (patch)
tree4a87f4aa4fe465871cb0aabaa4a65bf4595791b3 /sys/netinet/sctp_bsd_addr.c
parentc0ef832fd278f80304905d075e4657c1a92b196b (diff)
downloadFreeBSD-src-a51aa927fad5ab9ebbb294340935d462f68ee19b.zip
FreeBSD-src-a51aa927fad5ab9ebbb294340935d462f68ee19b.tar.gz
1) Adds the rest of the VIMAGE change macros
2) Adds some __UserSpace__ on some of the common defines that the user space code needs 3) Fixes a bug when we send up data to a user that failed. We need to a) trim off the data chunk headers, if present, and b) make sure the frag bit is communicated properly for the msgs coming off the stream queues... i.e. we see if some of the msg has been taken. Obtained from: jeli contributed the VIMAGE changes on this pass Thanks Julain!
Diffstat (limited to 'sys/netinet/sctp_bsd_addr.c')
-rw-r--r--sys/netinet/sctp_bsd_addr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c
index d1003fa..03de58e 100644
--- a/sys/netinet/sctp_bsd_addr.c
+++ b/sys/netinet/sctp_bsd_addr.c
@@ -79,7 +79,6 @@ MALLOC_DEFINE(SCTP_M_MVRF, "sctp_mvrf", "sctp mvrf pcb list");
MALLOC_DEFINE(SCTP_M_ITER, "sctp_iter", "sctp iterator control");
MALLOC_DEFINE(SCTP_M_SOCKOPT, "sctp_socko", "sctp socket option");
-
#if defined(SCTP_USE_THREAD_BASED_ITERATOR)
void
sctp_wakeup_iterator(void)
@@ -116,6 +115,7 @@ sctp_startup_iterator(void)
#endif
#ifdef INET6
+
void
sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa)
{
@@ -123,7 +123,7 @@ sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa)
ifa6 = (struct in6_ifaddr *)ifa->ifa;
ifa->flags = ifa6->ia6_flags;
- if (!ip6_use_deprecated) {
+ if (!MODULE_GLOBAL(MOD_INET6, ip6_use_deprecated)) {
if (ifa->flags &
IN6_IFF_DEPRECATED) {
ifa->localifa_flags |= SCTP_ADDR_IFA_UNUSEABLE;
@@ -143,7 +143,7 @@ sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa)
}
}
-#endif
+#endif /* INET6 */
static uint32_t
@@ -189,6 +189,8 @@ sctp_is_desired_interface_type(struct ifaddr *ifa)
static void
sctp_init_ifns_for_vrf(int vrfid)
{
+
+
/*
* Here we must apply ANY locks needed by the IFN we access and also
* make sure we lock any IFA that exists as we float through the
@@ -200,8 +202,9 @@ sctp_init_ifns_for_vrf(int vrfid)
struct sctp_ifa *sctp_ifa;
uint32_t ifa_flags;
- TAILQ_FOREACH(ifn, &ifnet, if_list) {
+ TAILQ_FOREACH(ifn, &MODULE_GLOBAL(MOD_NET, ifnet), if_list) {
TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
+
if (ifa->ifa_addr == NULL) {
continue;
}
@@ -329,7 +332,7 @@ void
struct ifnet *ifn;
struct ifaddr *ifa;
- TAILQ_FOREACH(ifn, &ifnet, if_list) {
+ TAILQ_FOREACH(ifn, &MODULE_GLOBAL(MOD_NET, ifnet), if_list) {
if (!(*pred) (ifn)) {
continue;
}
OpenPOWER on IntegriCloud