From: Alexander Duyck <aduyck@mirantis.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Subject: [net-next PATCH 4/4] gue: Enforce IP ID verification on outer headers
Date: Mon, 07 Mar 2016 09:22:20 -0800 [thread overview]
Message-ID: <20160307172220.5295.43204.stgit@localhost.localdomain> (raw)
In-Reply-To: <20160307172201.5295.69740.stgit@localhost.localdomain>
This change enforces the IP ID verification on outer headers. As a result
if the DF flag is not set on the outer header we will force the flow to be
flushed in the event that the IP ID is out of sequence with the existing
flow.
In addition I believe this fixes a bug in which it was possible for no GRO
handler to be defined for a given protocol but we were not setting the
flush bit as it had been cleared before the check.
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
net/ipv4/fou.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 88dab0c1670c..5b93572e7434 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -319,8 +319,6 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
skb_gro_pull(skb, hdrlen);
- flush = 0;
-
for (p = *head; p; p = p->next) {
const struct guehdr *guehdr2;
@@ -343,6 +341,9 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
NAPI_GRO_CB(p)->same_flow = 0;
continue;
}
+
+ /* Include the IP ID check from the outer IP hdr */
+ NAPI_GRO_CB(p)->flush |= NAPI_GRO_CB(p)->flush_id;
}
rcu_read_lock();
@@ -352,6 +353,7 @@ static struct sk_buff **gue_gro_receive(struct sk_buff **head,
goto out_unlock;
pp = ops->callbacks.gro_receive(head, skb);
+ flush = 0;
out_unlock:
rcu_read_unlock();
prev parent reply other threads:[~2016-03-07 17:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 17:22 [net-next PATCH 1/4] gre: Enforce IP ID verification on outer headers Alexander Duyck
2016-03-07 17:22 ` [net-next PATCH 2/4] geneve: " Alexander Duyck
2016-03-07 17:22 ` [net-next PATCH 3/4] vxlan: " Alexander Duyck
2016-03-07 18:05 ` Or Gerlitz
2016-03-07 19:09 ` David Miller
2016-03-07 23:06 ` Alex Duyck
2016-03-07 23:42 ` Jesse Gross
2016-03-09 21:02 ` David Miller
2016-03-09 21:49 ` Alexander Duyck
2016-03-07 17:22 ` Alexander Duyck [this message]
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=20160307172220.5295.43204.stgit@localhost.localdomain \
--to=aduyck@mirantis.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).