netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brice Goglin <brice@myri.com>
To: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH net-next] myri10ge: check fragmentation in LRO get_frag_header()
Date: Mon, 08 Dec 2008 10:17:36 +0100	[thread overview]
Message-ID: <493CE630.3010809@myri.com> (raw)

Add a fragmentation check to myri10ge's LRO get_frag_header() callback.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew Gallatin <gallatin@myri.com> 

--- linux-git/drivers/net/myri10ge/myri10ge.c	2008-12-08 10:12:11.000000000 +0100
+++ linux-tmp/drivers/net/myri10ge/myri10ge.c	2008-12-08 10:12:21.000000000 +0100
@@ -2229,6 +2229,8 @@ myri10ge_get_frag_header(struct skb_frag
 	*ip_hdr = iph;
 	if (iph->protocol != IPPROTO_TCP)
 		return -1;
+	if (iph->frag_off & htons(IP_MF | IP_OFFSET))
+		return -1;
 	*hdr_flags |= LRO_TCP;
 	*tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2);
 



             reply	other threads:[~2008-12-08  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08  9:17 Brice Goglin [this message]
2008-12-09  8:14 ` [PATCH net-next] myri10ge: check fragmentation in LRO get_frag_header() David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493CE630.3010809@myri.com \
    --to=brice@myri.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).