Displaying 1 result from an estimated 1 matches for "network_head".
Did you mean:
network_thread
2013 Nov 28
4
[PATCH net] xen-netback: fix fragment detection in checksum setup
...1165,15 +1165,27 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
struct iphdr *iph = (void *)skb->data;
unsigned int header_size;
unsigned int off;
+ bool fragment;
int err = -EPROTO;
+ fragment = false;
+
off = sizeof(struct iphdr);
header_size = skb->network_header + off + MAX_IPOPTLEN;
maybe_pull_tail(skb, header_size);
+ if (ntohs(iph->frag_off) & 0x3fff)
+ fragment = true;
+
off = iph->ihl * 4;
+ if (fragment) {
+ if (net_ratelimit())
+ netdev_err(vif->dev, "Packet is a fragment!\n");
+ goto out;
+ }
+
switch (iph-&g...