Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4162600ybi; Tue, 11 Jun 2019 01:57:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEfOMnPhJ7DmIc5h+eGq8zfFCMuuS/Des1DRN8UbbFGt1UpsgA110qFync8RVGBheiqqQu X-Received: by 2002:a62:3741:: with SMTP id e62mr79821984pfa.213.1560243466359; Tue, 11 Jun 2019 01:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560243466; cv=none; d=google.com; s=arc-20160816; b=N3cmF/5wBGagyDDfV7a5QiZ/I2HLGyGV+/omAYa92fU6+lFEmASZRIrt51D2WdS9r5 1qvJRi87E5jOyzgMwi1N5WkPInR8bTby+LEQeSyUsbfOj32Y0l2W2Vu1kkaJy84yCDDM 7AWxzUghlzoX1sSsK5Den2oWMi4cMSxs1AmGeFOWv6iZzQGJTULNkn50JuyS4EXeMSuh vNaNm7gjc/9StH4fpPI17Wj7l055/n/DWHeKyNXU+h8LM+OSnXx4AoNRn55Qqdl3wFz7 fvsHk7TJF+1e+FkMcndbLNlUBIjm9l8ojy/mL2HjpQqrnKr3tntrLijbfVOyJ5akkiNE fcbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=tjQVAKptCZ2zF/TPZfVzV8ty+CjLbUyqyVrul49MfD0=; b=ZlaI00aBJUJfzX9MU+d3ndljjgcsBXC4+PIUnb5BR4Kf6K43DVForTNgmLVwJYUsgY 6+hHV/aQGyxbJUi1LOCUttiQiTIrf8HfD68yFELhqwSCfdhqcL8TBOWj+AeG8t0obiJK wzfi917hyx8wMiCLu5wrKumIDRO9l3wziNbvmeZ/r2hsCzHFyv19NHt45fAwlVg5VnXq Nn3Eg/LaZxEinj4kpuQxLajwWohk6c0k+x+ILamrIYsjYb0LBFpTk5r+YYqD8Npe56j+ EUUh8UuWDZ+CiiEei+4DTq7x8lAYOfOnIu2N8zpNmp7zYcjyrXGSIv1GnTaFTQeNBHjj ByyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si1307603pfn.225.2019.06.11.01.57.31; Tue, 11 Jun 2019 01:57:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404805AbfFKI5L (ORCPT + 99 others); Tue, 11 Jun 2019 04:57:11 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:55828 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2403860AbfFKI5L (ORCPT ); Tue, 11 Jun 2019 04:57:11 -0400 Received: from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 34A3A1C63823ED2928D3; Tue, 11 Jun 2019 16:57:08 +0800 (CST) Received: from dggeme714-chm.china.huawei.com (10.1.199.110) by DGGEMM403-HUB.china.huawei.com (10.3.20.211) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 11 Jun 2019 16:56:58 +0800 Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by dggeme714-chm.china.huawei.com (10.1.199.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 11 Jun 2019 16:56:57 +0800 Received: from dggeme763-chm.china.huawei.com ([10.6.66.36]) by dggeme763-chm.china.huawei.com ([10.6.66.36]) with mapi id 15.01.1591.008; Tue, 11 Jun 2019 16:56:57 +0800 From: linmiaohe To: "pablo@netfilter.org" , "kadlec@blackhole.kfki.hu" , "fw@strlen.de" , "davem@davemloft.net" , "kuznet@ms2.inr.ac.ru" , "yoshfuji@linux-ipv6.org" , "netfilter-devel@vger.kernel.org" , "coreteam@netfilter.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dsahern@gmail.com" CC: Mingfangsen Subject: =?utf-8?B?562U5aSNOiBbUEFUQ0ggdjNdIG5ldDogbmV0ZmlsdGVyOiBGaXggcnBmaWx0?= =?utf-8?Q?er_dropping_vrf_packets_by_mistake?= Thread-Topic: [PATCH v3] net: netfilter: Fix rpfilter dropping vrf packets by mistake Thread-Index: AQHU+20EJBRdmfpcd0eT0vsD259sj6aWb9Ew Date: Tue, 11 Jun 2019 08:56:57 +0000 Message-ID: References: <212e4feb-39de-2627-9948-bbb117ff4d4e@huawei.com> In-Reply-To: <212e4feb-39de-2627-9948-bbb117ff4d4e@huawei.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.184.189.20] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJpZW5kbHkgcGluZy4NCg0KLS0tLS3pgq7ku7bljp/ku7YtLS0tLQ0K5Y+R5Lu25Lq6OiBsaW51 eC1rZXJuZWwtb3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgta2VybmVsLW93bmVy QHZnZXIua2VybmVsLm9yZ10g5Luj6KGoIGxpbm1pYW9oZQ0K5Y+R6YCB5pe26Ze0OiAyMDE55bm0 NOaciDI15pelIDIxOjQ0DQrmlLbku7bkuro6IH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