ia64/xen-unstable

view patches/linux-2.6.16.13/net-csum.patch @ 10912:ee6014279103

[LINUX] Clarify a confusing error message in xenbus_probe.c.

Signed-off-by: Michael LeMay <mdlemay@epoch.ncsc.mil>
author kfraser@localhost.localdomain
date Wed Aug 02 14:59:22 2006 +0100 (2006-08-02)
parents cebedeefbfbd
children
line source
1 diff -pruN ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
2 --- ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-05-02 22:38:44.000000000 +0100
3 +++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-05-16 13:28:19.000000000 +0100
4 @@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
5 if (hdrsize < sizeof(*hdr))
6 return 1;
8 - hdr->check = ip_nat_cheat_check(~oldip, newip,
9 +#ifdef CONFIG_XEN
10 + if ((*pskb)->proto_csum_blank)
11 + hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
12 + else
13 +#endif
14 + hdr->check = ip_nat_cheat_check(~oldip, newip,
15 ip_nat_cheat_check(oldport ^ 0xFFFF,
16 newport,
17 hdr->check));
18 diff -pruN ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
19 --- ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-05-02 22:38:44.000000000 +0100
20 +++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2006-05-16 13:30:14.000000000 +0100
21 @@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
22 newport = tuple->dst.u.udp.port;
23 portptr = &hdr->dest;
24 }
25 - if (hdr->check) /* 0 is a special case meaning no checksum */
26 - hdr->check = ip_nat_cheat_check(~oldip, newip,
27 + if (hdr->check) { /* 0 is a special case meaning no checksum */
28 +#ifdef CONFIG_XEN
29 + if ((*pskb)->proto_csum_blank)
30 + hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
31 + else
32 +#endif
33 + hdr->check = ip_nat_cheat_check(~oldip, newip,
34 ip_nat_cheat_check(*portptr ^ 0xFFFF,
35 newport,
36 hdr->check));
37 + }
38 *portptr = newport;
39 return 1;
40 }
41 diff -pruN ../pristine-linux-2.6.16.13/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
42 --- ../pristine-linux-2.6.16.13/net/ipv4/xfrm4_output.c 2006-05-02 22:38:44.000000000 +0100
43 +++ ./net/ipv4/xfrm4_output.c 2006-05-04 17:41:37.000000000 +0100
44 @@ -17,6 +17,8 @@
45 #include <net/xfrm.h>
46 #include <net/icmp.h>
48 +extern int skb_checksum_setup(struct sk_buff *skb);
49 +
50 /* Add encapsulation header.
51 *
52 * In transport mode, the IP header will be moved forward to make space
53 @@ -103,6 +105,10 @@ static int xfrm4_output_one(struct sk_bu
54 struct xfrm_state *x = dst->xfrm;
55 int err;
57 + err = skb_checksum_setup(skb);
58 + if (err)
59 + goto error_nolock;
60 +
61 if (skb->ip_summed == CHECKSUM_HW) {
62 err = skb_checksum_help(skb, 0);
63 if (err)