WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] Imported patch net-csum.patch from xe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Imported patch net-csum.patch from xen-unstable.hg 15200:bd3d6b4c52ec
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:51 -0700
Delivery-date: Mon, 11 Jun 2007 02:25:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1180947923 -3600
# Node ID fac1f3836a60c612a64efdadb4702f71133533b1
# Parent  aa96379da7411fbe1cdb33e2eef842a0a37348d2
Imported patch net-csum.patch from xen-unstable.hg 15200:bd3d6b4c52ec
---
 net/ipv4/netfilter/ip_nat_proto_tcp.c |    7 ++++++-
 net/ipv4/netfilter/ip_nat_proto_udp.c |   10 ++++++++--
 net/ipv4/xfrm4_output.c               |    6 ++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff -r aa96379da741 -r fac1f3836a60 net/ipv4/netfilter/ip_nat_proto_tcp.c
--- a/net/ipv4/netfilter/ip_nat_proto_tcp.c     Mon Jun 04 10:05:23 2007 +0100
+++ b/net/ipv4/netfilter/ip_nat_proto_tcp.c     Mon Jun 04 10:05:23 2007 +0100
@@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
        if (hdrsize < sizeof(*hdr))
                return 1;
 
-       hdr->check = ip_nat_cheat_check(~oldip, newip,
+#ifdef CONFIG_XEN
+       if ((*pskb)->proto_csum_blank)
+               hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
+       else
+#endif
+               hdr->check = ip_nat_cheat_check(~oldip, newip,
                                        ip_nat_cheat_check(oldport ^ 0xFFFF,
                                                           newport,
                                                           hdr->check));
diff -r aa96379da741 -r fac1f3836a60 net/ipv4/netfilter/ip_nat_proto_udp.c
--- a/net/ipv4/netfilter/ip_nat_proto_udp.c     Mon Jun 04 10:05:23 2007 +0100
+++ b/net/ipv4/netfilter/ip_nat_proto_udp.c     Mon Jun 04 10:05:23 2007 +0100
@@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
                newport = tuple->dst.u.udp.port;
                portptr = &hdr->dest;
        }
-       if (hdr->check) /* 0 is a special case meaning no checksum */
-               hdr->check = ip_nat_cheat_check(~oldip, newip,
+       if (hdr->check) { /* 0 is a special case meaning no checksum */
+#ifdef CONFIG_XEN
+               if ((*pskb)->proto_csum_blank)
+                       hdr->check = ip_nat_cheat_check(oldip, ~newip, 
hdr->check);
+               else
+#endif
+                       hdr->check = ip_nat_cheat_check(~oldip, newip,
                                        ip_nat_cheat_check(*portptr ^ 0xFFFF,
                                                           newport,
                                                           hdr->check));
+       }
        *portptr = newport;
        return 1;
 }
diff -r aa96379da741 -r fac1f3836a60 net/ipv4/xfrm4_output.c
--- a/net/ipv4/xfrm4_output.c   Mon Jun 04 10:05:23 2007 +0100
+++ b/net/ipv4/xfrm4_output.c   Mon Jun 04 10:05:23 2007 +0100
@@ -17,6 +17,8 @@
 #include <net/ip.h>
 #include <net/xfrm.h>
 #include <net/icmp.h>
+
+extern int skb_checksum_setup(struct sk_buff *skb);
 
 static int xfrm4_tunnel_check_size(struct sk_buff *skb)
 {
@@ -48,6 +50,10 @@ static int xfrm4_output_one(struct sk_bu
        struct xfrm_state *x = dst->xfrm;
        int err;
        
+       err = skb_checksum_setup(skb);
+       if (err)
+               goto error_nolock;
+
        if (skb->ip_summed == CHECKSUM_HW) {
                err = skb_checksum_help(skb, 0);
                if (err)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Imported patch net-csum.patch from xen-unstable.hg 15200:bd3d6b4c52ec, Xen patchbot-linux-2.6.18-xen <=