ia64/xen-unstable

view patches/linux-2.6.18/net-csum.patch @ 14445:cb1693873a7e

libxc: Explicitly reserve space for special pages in HVM memmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Mar 16 18:59:28 2007 +0000 (2007-03-16)
parents 3adf00179a63
children
line source
1 diff -pruN ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
2 --- ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-09-20 04:42:06.000000000 +0100
3 +++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-01-12 16:08:53.000000000 +0000
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 ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
19 --- ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-09-20 04:42:06.000000000 +0100
20 +++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2007-01-12 16:08:53.000000000 +0000
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 ../orig-linux-2.6.18/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
42 --- ../orig-linux-2.6.18/net/ipv4/xfrm4_output.c 2006-09-20 04:42:06.000000000 +0100
43 +++ ./net/ipv4/xfrm4_output.c 2007-01-12 17:38:34.000000000 +0000
44 @@ -18,6 +18,8 @@
45 #include <net/xfrm.h>
46 #include <net/icmp.h>
48 +extern int skb_checksum_setup(struct sk_buff *skb);
49 +
50 static int xfrm4_tunnel_check_size(struct sk_buff *skb)
51 {
52 int mtu, ret = 0;
53 @@ -48,6 +50,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)