[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Patch ipv4 netfilter code to avoid checksumming CHECKUM_UNNCECESSARY



ChangeSet 1.1575, 2005/05/27 11:51:06+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Patch ipv4 netfilter code to avoid checksumming CHECKUM_UNNCECESSARY
        packets. On Xen the check could fail, as packets from domU have a blank
        checksum field.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 net-csum.patch |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+)


diff -Nru a/patches/linux-2.6.11/net-csum.patch 
b/patches/linux-2.6.11/net-csum.patch
--- /dev/null   Wed Dec 31 16:00:00 196900
+++ b/patches/linux-2.6.11/net-csum.patch       2005-05-27 07:01:30 -04:00
@@ -0,0 +1,22 @@
+diff -ur linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 
linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+--- linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_tcp.c   2005-05-27 
11:47:48 +01:00
++++ linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_tcp.c      
2005-05-27 11:48:07 +01:00
+@@ -803,6 +803,7 @@
+        */
+       /* FIXME: Source route IP option packets --RR */
+       if (hooknum == NF_IP_PRE_ROUTING
++          && skb->ip_summed != CHECKSUM_UNNECESSARY
+           && csum_tcpudp_magic(iph->saddr, iph->daddr, tcplen, IPPROTO_TCP,
+                                skb->ip_summed == CHECKSUM_HW ? skb->csum
+                                : skb_checksum(skb, iph->ihl*4, tcplen, 0))) {
+diff -ur linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_udp.c 
linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_udp.c
+--- linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_udp.c   2005-05-27 
11:47:48 +01:00
++++ linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_udp.c      
2005-05-27 11:48:07 +01:00
+@@ -120,6 +120,7 @@
+        * and moreover root might send raw packets.
+        * FIXME: Source route IP option packets --RR */
+       if (hooknum == NF_IP_PRE_ROUTING
++          && skb->ip_summed != CHECKSUM_UNNECESSARY
+           && csum_tcpudp_magic(iph->saddr, iph->daddr, udplen, IPPROTO_UDP,
+                                skb->ip_summed == CHECKSUM_HW ? skb->csum
+                                : skb_checksum(skb, iph->ihl*4, udplen, 0))) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.