source:
trunk/packages/xen-3.1/xen-3.1/patches/linux-2.6.18/net-csum.patch
@
34
Last change on this file since 34 was 34, checked in by hartmans, 18 years ago | |
---|---|
|
|
File size: 2.3 KB |
-
net/ipv4/netfilter/ip_nat_proto_tcp.c
diff -pruN ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
old new tcp_manip_pkt(struct sk_buff **pskb, 129 129 if (hdrsize < sizeof(*hdr)) 130 130 return 1; 131 131 132 hdr->check = ip_nat_cheat_check(~oldip, newip, 132 #ifdef CONFIG_XEN 133 if ((*pskb)->proto_csum_blank) 134 hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check); 135 else 136 #endif 137 hdr->check = ip_nat_cheat_check(~oldip, newip, 133 138 ip_nat_cheat_check(oldport ^ 0xFFFF, 134 139 newport, 135 140 hdr->check)); -
net/ipv4/netfilter/ip_nat_proto_udp.c
diff -pruN ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
old new udp_manip_pkt(struct sk_buff **pskb, 113 113 newport = tuple->dst.u.udp.port; 114 114 portptr = &hdr->dest; 115 115 } 116 if (hdr->check) /* 0 is a special case meaning no checksum */ 117 hdr->check = ip_nat_cheat_check(~oldip, newip, 116 if (hdr->check) { /* 0 is a special case meaning no checksum */ 117 #ifdef CONFIG_XEN 118 if ((*pskb)->proto_csum_blank) 119 hdr->check = ip_nat_cheat_check(oldip, ~newip, hdr->check); 120 else 121 #endif 122 hdr->check = ip_nat_cheat_check(~oldip, newip, 118 123 ip_nat_cheat_check(*portptr ^ 0xFFFF, 119 124 newport, 120 125 hdr->check)); 126 } 121 127 *portptr = newport; 122 128 return 1; 123 129 } -
net/ipv4/xfrm4_output.c
diff -pruN ../orig-linux-2.6.18/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
old new 18 18 #include <net/xfrm.h> 19 19 #include <net/icmp.h> 20 20 21 extern int skb_checksum_setup(struct sk_buff *skb); 22 21 23 static int xfrm4_tunnel_check_size(struct sk_buff *skb) 22 24 { 23 25 int mtu, ret = 0; … … static int xfrm4_output_one(struct sk_bu 48 50 struct xfrm_state *x = dst->xfrm; 49 51 int err; 50 52 53 err = skb_checksum_setup(skb); 54 if (err) 55 goto error_nolock; 56 51 57 if (skb->ip_summed == CHECKSUM_HW) { 52 58 err = skb_checksum_help(skb, 0); 53 59 if (err)
Note: See TracBrowser
for help on using the repository browser.