netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH 1/4] gre: Enforce IP ID verification on outer headers
@ 2016-03-07 17:22 Alexander Duyck
  2016-03-07 17:22 ` [net-next PATCH 2/4] geneve: " Alexander Duyck
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alexander Duyck @ 2016-03-07 17:22 UTC (permalink / raw)
  To: netdev, davem

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.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
---
 net/ipv4/gre_offload.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index 47f4c544c916..632733f18019 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -175,8 +175,6 @@ static struct sk_buff **gre_gro_receive(struct sk_buff **head,
 					     null_compute_pseudo);
 	}
 
-	flush = 0;
-
 	for (p = *head; p; p = p->next) {
 		const struct gre_base_hdr *greh2;
 
@@ -205,6 +203,9 @@ static struct sk_buff **gre_gro_receive(struct sk_buff **head,
 				continue;
 			}
 		}
+
+		/* Include the IP ID check from the outer IP hdr */
+		NAPI_GRO_CB(p)->flush |= NAPI_GRO_CB(p)->flush_id;
 	}
 
 	skb_gro_pull(skb, grehlen);
@@ -213,6 +214,7 @@ static struct sk_buff **gre_gro_receive(struct sk_buff **head,
 	skb_gro_postpull_rcsum(skb, greh, grehlen);
 
 	pp = ptype->callbacks.gro_receive(head, skb);
+	flush = 0;
 
 out_unlock:
 	rcu_read_unlock();

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-03-09 21:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [net-next PATCH 4/4] gue: " Alexander Duyck

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).