ia64/xen-unstable

changeset 8177:9b7649651f49

While working bug #143, it came to my attention that no verbose error is
loged if the dom0 kernel mangles a packet and tries to checksum
offload it.

This should let the user know what is going wrong (instead of silently
dropping the packet).

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Dec 02 11:08:24 2005 +0100 (2005-12-02)
parents 1e89d78f21c5
children de95bab19b18
files linux-2.6-xen-sparse/net/core/dev.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/net/core/dev.c	Fri Dec 02 11:06:40 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/net/core/dev.c	Fri Dec 02 11:08:24 2005 +0100
     1.3 @@ -1283,6 +1283,11 @@ int dev_queue_xmit(struct sk_buff *skb)
     1.4  			skb->csum = offsetof(struct udphdr, check);
     1.5  			break;
     1.6  		default:
     1.7 +			if (net_ratelimit())
     1.8 +				printk(KERN_ERR "Attempting to checksum a non-"
     1.9 +				       "TCP/UDP packet, dropping a protocol"
    1.10 +				       " %d packet", skb->nh.iph->protocol);
    1.11 +			rc = -EPROTO;
    1.12  			goto out_kfree_skb;
    1.13  		}
    1.14  		if ((skb->h.raw + skb->csum + 2) > skb->tail)