ia64/xen-unstable

view patches/linux-2.6.16-rc4/net-csum.patch @ 9027:b567eb77399f

Add 'console=xxx' to the Xen serial console section to make it obvious
that one might need to specify 'console=xxx' and not just 'comX=xxx'
if one isn't using the default com1,vga.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
author kaf24@firebug.cl.cam.ac.uk
date Sun Feb 26 10:50:15 2006 +0100 (2006-02-26)
parents 1c7145a5bb43
children
line source
1 diff -pruN ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
2 --- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-02-02 17:39:51.000000000 +0000
3 +++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-02-02 17:44:18.000000000 +0000
4 @@ -129,10 +129,14 @@ 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 + if ((*pskb)->proto_csum_blank) {
10 + hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
11 + } else {
12 + hdr->check = ip_nat_cheat_check(~oldip, newip,
13 ip_nat_cheat_check(oldport ^ 0xFFFF,
14 newport,
15 hdr->check));
16 + }
17 return 1;
18 }
20 diff -pruN ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
21 --- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-02-02 17:39:51.000000000 +0000
22 +++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2006-02-02 17:44:18.000000000 +0000
23 @@ -113,11 +113,16 @@ udp_manip_pkt(struct sk_buff **pskb,
24 newport = tuple->dst.u.udp.port;
25 portptr = &hdr->dest;
26 }
27 - if (hdr->check) /* 0 is a special case meaning no checksum */
28 - hdr->check = ip_nat_cheat_check(~oldip, newip,
29 + if (hdr->check) { /* 0 is a special case meaning no checksum */
30 + if ((*pskb)->proto_csum_blank) {
31 + hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
32 + } else {
33 + hdr->check = ip_nat_cheat_check(~oldip, newip,
34 ip_nat_cheat_check(*portptr ^ 0xFFFF,
35 newport,
36 hdr->check));
37 + }
38 + }
39 *portptr = newport;
40 return 1;
41 }