lkml.org 
[lkml]   [2015]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()
Date
Signed-off-by: Joe Stringer <joestringer@nicira.com>
---
net/openvswitch/vport.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index d14f594..baa018f 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -475,6 +475,9 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
struct sw_flow_key key;
int error;

+ if (!skb->sk || (sock_net(skb->sk) != read_pnet(&vport->dp->net)))
+ skb_scrub_packet(skb, true);
+
stats = this_cpu_ptr(vport->percpu_stats);
u64_stats_update_begin(&stats->syncp);
stats->rx_packets++;
--
2.1.4


\
 
 \ /
  Last update: 2015-07-30 20:21    [W:0.188 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site