ia64/xen-unstable

annotate patches/linux-2.6.11/net-csum.patch @ 5184:ed6682910675

bitkeeper revision 1.1575 (4296fb9akkrLM8bKzQ1I7T3Dy3Uu9w)

Patch ipv4 netfilter code to avoid checksumming CHECKUM_UNNCECESSARY
packets. On Xen the check could fail, as packets from domU have a blank
checksum field.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 27 10:51:06 2005 +0000 (2005-05-27)
parents
children 56a63f9f378f
rev   line source
kaf24@5184 1 diff -ur linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_tcp.c linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
kaf24@5184 2 --- linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2005-05-27 11:47:48 +01:00
kaf24@5184 3 +++ linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2005-05-27 11:48:07 +01:00
kaf24@5184 4 @@ -803,6 +803,7 @@
kaf24@5184 5 */
kaf24@5184 6 /* FIXME: Source route IP option packets --RR */
kaf24@5184 7 if (hooknum == NF_IP_PRE_ROUTING
kaf24@5184 8 + && skb->ip_summed != CHECKSUM_UNNECESSARY
kaf24@5184 9 && csum_tcpudp_magic(iph->saddr, iph->daddr, tcplen, IPPROTO_TCP,
kaf24@5184 10 skb->ip_summed == CHECKSUM_HW ? skb->csum
kaf24@5184 11 : skb_checksum(skb, iph->ihl*4, tcplen, 0))) {
kaf24@5184 12 diff -ur linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_udp.c linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_udp.c
kaf24@5184 13 --- linux-2.6.11/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2005-05-27 11:47:48 +01:00
kaf24@5184 14 +++ linux-2.6.11-csum/net/ipv4/netfilter/ip_conntrack_proto_udp.c 2005-05-27 11:48:07 +01:00
kaf24@5184 15 @@ -120,6 +120,7 @@
kaf24@5184 16 * and moreover root might send raw packets.
kaf24@5184 17 * FIXME: Source route IP option packets --RR */
kaf24@5184 18 if (hooknum == NF_IP_PRE_ROUTING
kaf24@5184 19 + && skb->ip_summed != CHECKSUM_UNNECESSARY
kaf24@5184 20 && csum_tcpudp_magic(iph->saddr, iph->daddr, udplen, IPPROTO_UDP,
kaf24@5184 21 skb->ip_summed == CHECKSUM_HW ? skb->csum
kaf24@5184 22 : skb_checksum(skb, iph->ihl*4, udplen, 0))) {