Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0850CC43381 for ; Fri, 8 Mar 2019 19:02:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C214B2085A for ; Fri, 8 Mar 2019 19:02:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=dell.com header.i=@dell.com header.b="kJGsIO5c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbfCHTCT (ORCPT ); Fri, 8 Mar 2019 14:02:19 -0500 Received: from esa5.dell-outbound.iphmx.com ([68.232.153.95]:58488 "EHLO esa5.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726254AbfCHTCT (ORCPT ); Fri, 8 Mar 2019 14:02:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1552071727; x=1583607727; h=cc:from:to:subject:date:message-id; bh=UG9W8tz98oZ2sXKMQTIH2E19KskSWJygztOVX6dg0Ws=; b=kJGsIO5cBO1wLqqokqFTP0zpWYkZXiEJKv/r961q/X7BndL566gfBu8U eMRZKdbDTpTtW3UOZi/fherp2FbYrbLVeygrJZ1wXzcnTORh441AtHTUQ YiI1ZqIvMcbw9vxR6rOdZ1TMhN4MDMma08lbIxd3axdzizuQj+pVciXfR o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EsAAB7nIJchyWd50NkHQEBBQEHBQG?= =?us-ascii?q?BUwYBCwGDeieNAqUCgXsLAQGEbIQ4IjYHDQEBAwEBBwEDAgEBAhABAQEVCQg?= =?us-ascii?q?pL4I6KQGCahZnMIEPEiKDAIF2nlU9Am+BAYkHAQEBgh6FRIRpgS8BhmSER4F?= =?us-ascii?q?XP4ERgmSLEAKRdpIoBwKCQASQOQwZkzcBineSQQIEAgQFAhSBTgcpgVgzGiO?= =?us-ascii?q?DPIIWDgmOPCIBMZAYAQE?= X-IPAS-Result: =?us-ascii?q?A2EsAAB7nIJchyWd50NkHQEBBQEHBQGBUwYBCwGDeieNA?= =?us-ascii?q?qUCgXsLAQGEbIQ4IjYHDQEBAwEBBwEDAgEBAhABAQEVCQgpL4I6KQGCahZnM?= =?us-ascii?q?IEPEiKDAIF2nlU9Am+BAYkHAQEBgh6FRIRpgS8BhmSER4FXP4ERgmSLEAKRd?= =?us-ascii?q?pIoBwKCQASQOQwZkzcBineSQQIEAgQFAhSBTgcpgVgzGiODPIIWDgmOPCIBM?= =?us-ascii?q?ZAYAQE?= Received: from mx0b-00154901.pphosted.com ([67.231.157.37]) by esa5.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Mar 2019 13:02:06 -0600 Received: from pps.filterd (m0144103.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x28IvpBu155083 for ; Fri, 8 Mar 2019 14:02:17 -0500 Received: from esa5.dell-outbound2.iphmx.com (esa5.dell-outbound2.iphmx.com [68.232.153.203]) by mx0b-00154901.pphosted.com with ESMTP id 2r3t44sdve-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 08 Mar 2019 14:02:17 -0500 Cc: Farrell Woods Received: from mailuogwhop.emc.com ([168.159.213.141]) by esa5.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 09 Mar 2019 01:01:59 +0600 Received: from emc.com (localhost [127.0.0.1]) by mailuogwprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id x28J2Etc011685; Fri, 8 Mar 2019 14:02:14 -0500 Received: from maildlpprd01.lss.emc.com ([[10.253.24.33]]) by mailuogwprd01.lss.emc.com with ESMTP id x28J1fjU011527 ; Fri, 8 Mar 2019 14:01:44 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com x28J1fjU011527 Received: from mailsyshubprd54.lss.emc.com (mailsyshubprd54.lss.emc.com [10.106.48.29]) by maildlpprd01.lss.emc.com (RSA Interceptor); Fri, 8 Mar 2019 14:01:23 -0500 Received: from hopcyc-boyera-1-00.cec.lab.emc.com ([10.244.196.91]) by mailsyshubprd54.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id x28J1MIQ025423; Fri, 8 Mar 2019 14:01:23 -0500 From: Andrew Boyer To: aboyer@tobark.org, netdev@vger.kernel.org Subject: [PATCH] net/ipv6: Skip policy check to improve compliance Date: Fri, 8 Mar 2019 14:01:11 -0500 Message-Id: <20190308190111.5650-1-andrew.boyer@dell.com> X-Mailer: git-send-email 2.16.2 X-RSA-Classifications: public X-Sentrion-Hostname: mailuogwprd01.lss.emc.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-08_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903080132 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Farrell Woods The patch fixes an IPv6 conformance test failure (v6LC_1_2_03a in the UNH INTACT suite) that occurs specifically when IPsec is in use. The test iterates through the set of unassigned protocol numbers (currently, 143 through 252) and inserts these into the next header field of a Destination Options header. The expected test result is that an ICMPv6 Parameter Problem is sent back. But if there's a policy in place that requires an active SA between the Test Node and the Device Under Test (and none exists), the inbound packet is quietly dropped. Signed-off-by: Farrell Woods --- net/ipv6/ip6_input.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index c7ed2b6..26259b3 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c @@ -409,12 +409,10 @@ void ip6_protocol_deliver_rcu(struct net *net, struct sk_buff *skb, int nexthdr, } } else { if (!raw) { - if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { - __IP6_INC_STATS(net, idev, - IPSTATS_MIB_INUNKNOWNPROTOS); - icmpv6_send(skb, ICMPV6_PARAMPROB, - ICMPV6_UNK_NEXTHDR, nhoff); - } + __IP6_INC_STATS(net, idev, + IPSTATS_MIB_INUNKNOWNPROTOS); + icmpv6_send(skb, ICMPV6_PARAMPROB, + ICMPV6_UNK_NEXTHDR, nhoff); kfree_skb(skb); } else { __IP6_INC_STATS(net, idev, IPSTATS_MIB_INDELIVERS); -- 2.7.4