ia64/xen-unstable

changeset 10728:cebedeefbfbd

Ifdef stuff that is XEN specific in patches
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
author ack@localhost.localdomain
date Wed Jul 12 11:55:10 2006 +0100 (2006-07-12)
parents 3addc7020107
children 84ff152efb0a
files patches/linux-2.6.16.13/net-csum.patch
line diff
     1.1 --- a/patches/linux-2.6.16.13/net-csum.patch	Wed Jul 12 10:33:37 2006 +0100
     1.2 +++ b/patches/linux-2.6.16.13/net-csum.patch	Wed Jul 12 11:55:10 2006 +0100
     1.3 @@ -1,40 +1,39 @@
     1.4  diff -pruN ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
     1.5  --- ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-05-02 22:38:44.000000000 +0100
     1.6 -+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-05-04 17:41:37.000000000 +0100
     1.7 -@@ -129,10 +129,14 @@ tcp_manip_pkt(struct sk_buff **pskb,
     1.8 ++++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c	2006-05-16 13:28:19.000000000 +0100
     1.9 +@@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
    1.10   	if (hdrsize < sizeof(*hdr))
    1.11   		return 1;
    1.12   
    1.13  -	hdr->check = ip_nat_cheat_check(~oldip, newip,
    1.14 -+	if ((*pskb)->proto_csum_blank) {
    1.15 ++#ifdef CONFIG_XEN
    1.16 ++	if ((*pskb)->proto_csum_blank)
    1.17  +		hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
    1.18 -+	} else {
    1.19 ++	else
    1.20 ++#endif
    1.21  +		hdr->check = ip_nat_cheat_check(~oldip, newip,
    1.22   					ip_nat_cheat_check(oldport ^ 0xFFFF,
    1.23   							   newport,
    1.24   							   hdr->check));
    1.25 -+	}
    1.26 - 	return 1;
    1.27 - }
    1.28 - 
    1.29  diff -pruN ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
    1.30  --- ../pristine-linux-2.6.16.13/net/ipv4/netfilter/ip_nat_proto_udp.c	2006-05-02 22:38:44.000000000 +0100
    1.31 -+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c	2006-05-04 17:41:37.000000000 +0100
    1.32 -@@ -113,11 +113,16 @@ udp_manip_pkt(struct sk_buff **pskb,
    1.33 ++++ ./net/ipv4/netfilter/ip_nat_proto_udp.c	2006-05-16 13:30:14.000000000 +0100
    1.34 +@@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
    1.35   		newport = tuple->dst.u.udp.port;
    1.36   		portptr = &hdr->dest;
    1.37   	}
    1.38  -	if (hdr->check) /* 0 is a special case meaning no checksum */
    1.39  -		hdr->check = ip_nat_cheat_check(~oldip, newip,
    1.40  +	if (hdr->check) { /* 0 is a special case meaning no checksum */
    1.41 -+		if ((*pskb)->proto_csum_blank) {
    1.42 ++#ifdef CONFIG_XEN
    1.43 ++		if ((*pskb)->proto_csum_blank)
    1.44  +			hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check);
    1.45 -+		} else {
    1.46 ++		else
    1.47 ++#endif
    1.48  +			hdr->check = ip_nat_cheat_check(~oldip, newip,
    1.49   					ip_nat_cheat_check(*portptr ^ 0xFFFF,
    1.50   							   newport,
    1.51   							   hdr->check));
    1.52 -+		}
    1.53  +	}
    1.54   	*portptr = newport;
    1.55   	return 1;