ia64/xen-unstable

view patches/linux-2.6.16-rc2/net-csum.patch @ 8762:1bc2d1fe503c

Fill hypercall_page so that its VA space doesn't get used for code.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Mon Feb 06 15:26:29 2006 +0000 (2006-02-06)
parents 7cd3d2e41559
children 6789ae50ce7f
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,16 @@ 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,
11 + ip_nat_cheat_check(oldport ^ 0xFFFF,
12 + newport, hdr->check));
13 + } else {
14 + hdr->check = ip_nat_cheat_check(~oldip, newip,
15 ip_nat_cheat_check(oldport ^ 0xFFFF,
16 newport,
17 hdr->check));
18 + }
19 return 1;
20 }
22 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
23 --- ../pristine-linux-2.6.16-rc1-git4/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-02-02 17:39:51.000000000 +0000
24 +++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2006-02-02 17:44:18.000000000 +0000
25 @@ -113,11 +113,19 @@ udp_manip_pkt(struct sk_buff **pskb,
26 newport = tuple->dst.u.udp.port;
27 portptr = &hdr->dest;
28 }
29 - if (hdr->check) /* 0 is a special case meaning no checksum */
30 - hdr->check = ip_nat_cheat_check(~oldip, newip,
31 +
32 + if (hdr->check) { /* 0 is a special case meaning no checksum */
33 + if ((*pskb)->proto_csum_blank) {
34 + hdr->check = ip_nat_cheat_check(oldip, ~newip,
35 + ip_nat_cheat_check(*portptr ^ 0xFFFF,
36 + newport, hdr->check));
37 + } else {
38 + hdr->check = ip_nat_cheat_check(~oldip, newip,
39 ip_nat_cheat_check(*portptr ^ 0xFFFF,
40 newport,
41 hdr->check));
42 + }
43 + }
44 *portptr = newport;
45 return 1;
46 }