Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754322AbbG3SNU (ORCPT ); Thu, 30 Jul 2015 14:13:20 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36162 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbbG3SNP (ORCPT ); Thu, 30 Jul 2015 14:13:15 -0400 From: Joe Stringer To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, pablo@netfilter.org, kaber@trash.net, jpettit@nicira.com, pshelar@nicira.com, azhou@nicira.com, jesse@nicira.com, fwestpha@redhat.com, hannes@redhat.com, tgraf@noironetworks.com Subject: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive() Date: Thu, 30 Jul 2015 11:12:35 -0700 Message-Id: <1438279963-29563-2-git-send-email-joestringer@nicira.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1438279963-29563-1-git-send-email-joestringer@nicira.com> References: <1438279963-29563-1-git-send-email-joestringer@nicira.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 27 Signed-off-by: Joe Stringer --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/