summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-05-30 20:56:07 +0000
committertuexen <tuexen@FreeBSD.org>2012-05-30 20:56:07 +0000
commitdc64091687e3961e47dd73228c98b19328e0afe2 (patch)
tree167555626a68d277678998a3c3164b02f60735f7 /sys/netinet6
parent747595cb72e908946de78a06c4d1a00f72b6cea3 (diff)
downloadFreeBSD-src-dc64091687e3961e47dd73228c98b19328e0afe2.zip
FreeBSD-src-dc64091687e3961e47dd73228c98b19328e0afe2.tar.gz
Seperate SCTP checksum offloading for IPv4 and IPv6.
While there: remove some trainling whitespaces. MFC after: 3 days X-MFC with: 236170
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_forward.c8
-rw-r--r--sys/netinet6/ip6_output.c22
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index 93c7bf2..3321a95 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -587,7 +587,7 @@ skip_routing:
m->m_pkthdr.csum_data = 0xffff;
}
#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP)
+ if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
#endif
error = netisr_queue(NETISR_IPV6, m);
@@ -607,9 +607,9 @@ skip_routing:
m->m_pkthdr.csum_data = 0xffff;
}
#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP)
- m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
-#endif
+ if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
+ m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
+#endif
error = netisr_queue(NETISR_IPV6, m);
goto out;
}
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index fddb45b..df4e1b0 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -508,7 +508,7 @@ skip_ipsec2:;
#ifdef FLOWTABLE
if (ro == &ip6route) {
struct flentry *fle;
-
+
/*
* The flow table returns route entries valid for up to 30
* seconds; we rely on the remainder of ip_output() taking no
@@ -521,7 +521,7 @@ skip_ipsec2:;
flevalid = 1;
}
}
-#endif
+#endif
again:
/*
* if specified, try to fill in the traffic class field.
@@ -667,7 +667,7 @@ again:
/*
* The outgoing interface must be in the zone of source and
- * destination addresses.
+ * destination addresses.
*/
origifp = ifp;
@@ -693,7 +693,7 @@ again:
goto badscope;
}
- /* We should use ia_ifp to support the case of
+ /* We should use ia_ifp to support the case of
* sending packets to an address of our own.
*/
if (ia != NULL && ia->ia_ifp)
@@ -891,7 +891,7 @@ again:
m->m_pkthdr.csum_data = 0xffff;
}
#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP)
+ if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
#endif
error = netisr_queue(NETISR_IPV6, m);
@@ -911,9 +911,9 @@ again:
m->m_pkthdr.csum_data = 0xffff;
}
#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP)
+ if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
-#endif
+#endif
error = netisr_queue(NETISR_IPV6, m);
goto done;
}
@@ -965,8 +965,8 @@ passout:
in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr));
}
#ifdef SCTP
- if (sw_csum & CSUM_SCTP) {
- sw_csum &= ~CSUM_SCTP;
+ if (sw_csum & CSUM_SCTP_IPV6) {
+ sw_csum &= ~CSUM_SCTP_IPV6;
sctp_delayed_cksum(m, sizeof(struct ip6_hdr));
}
#endif
@@ -1081,9 +1081,9 @@ passout:
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
}
#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP) {
+ if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) {
sctp_delayed_cksum(m, hlen);
- m->m_pkthdr.csum_flags &= ~CSUM_SCTP;
+ m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6;
}
#endif
mnext = &m->m_nextpkt;
OpenPOWER on IntegriCloud