Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Mar 2010 11:47:39 +0900
From:      Randall Stewart <rrs@lakerest.net>
To:        wooky@btconnect.com
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   sctp ipv6 csum issue
Message-ID:  <F030DA98-F092-47B7-A083-C2536BB0068B@lakerest.net>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-6-144566907
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Content-Transfer-Encoding: 7bit

Nigel:

Here is a patch for your issue I think.

Its off of a head machine but I think it should apply. If not
let me know.

See if this does not fix the issue.

Thanks

R

--Apple-Mail-6-144566907
Content-Disposition: attachment;
	filename=patch.ip6_output.txt
Content-Type: text/plain;
	x-unix-mode=0644;
	name="patch.ip6_output.txt"
Content-Transfer-Encoding: 7bit

Index: ip6_output.c
===================================================================
--- ip6_output.c	(revision 205059)
+++ ip6_output.c	(working copy)
@@ -208,6 +208,9 @@
 	struct route_in6 *ro_pmtu = NULL;
 	int hdrsplit = 0;
 	int needipsec = 0;
+#ifdef SCTP
+	int sw_csum;
+#endif
 #ifdef IPSEC
 	struct ipsec_output_state state;
 	struct ip6_rthdr *rh = NULL;
@@ -829,6 +832,10 @@
 			}
 			m->m_pkthdr.csum_flags |=
 			    CSUM_IP_CHECKED | CSUM_IP_VALID;
+#ifdef SCTP
+			if (m->m_pkthdr.csum_flags & CSUM_SCTP)
+				m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
+#endif
 			error = netisr_queue(NETISR_IPV6, m);
 			goto done;
 		} else
@@ -857,6 +864,13 @@
 	 * 4: if dontfrag == 1 && alwaysfrag == 1
 	 *	error, as we cannot handle this conflicting request
 	 */
+#ifdef SCTP
+	sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist;
+	if (sw_csum & CSUM_SCTP) {
+		sctp_delayed_cksum(m);
+		sw_csum &= ~CSUM_SCTP;
+	}
+#endif
 	tlen = m->m_pkthdr.len;
 
 	if (opt && (opt->ip6po_flags & IP6PO_DONTFRAG))

--Apple-Mail-6-144566907
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed
Content-Transfer-Encoding: 7bit


------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)


--Apple-Mail-6-144566907--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F030DA98-F092-47B7-A083-C2536BB0068B>