[Devel] [PATCH 5/5] veth: don't drop skb->mark if NETIF_F_VENET is set

Andrew Vagin avagin at openvz.org
Thu May 28 04:07:00 PDT 2015


It's required for the virtuozzo traffic shaping.

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 net/core/skbuff.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 05011c2..a8b8b86 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3647,7 +3647,8 @@ void skb_scrub_packet(struct sk_buff *skb)
 	skb->pkt_type = PACKET_HOST;
 	skb->skb_iif = 0;
 	skb_dst_drop(skb);
-	skb->mark = 0;
+	if (!(skb->dev->features & NETIF_F_VENET))
+		skb->mark = 0;
 	secpath_reset(skb);
 	nf_reset(skb);
 	nf_reset_trace(skb);
-- 
1.7.1




More information about the Devel mailing list