From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 B1684C43381 for ; Mon, 25 Feb 2019 07:47:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77D0020989 for ; Mon, 25 Feb 2019 07:47:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p14IntqZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725929AbfBYHrP (ORCPT ); Mon, 25 Feb 2019 02:47:15 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:33981 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725863AbfBYHrP (ORCPT ); Mon, 25 Feb 2019 02:47:15 -0500 Received: by mail-pf1-f193.google.com with SMTP id u9so4109710pfn.1 for ; Sun, 24 Feb 2019 23:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xrr8ngCOAwIKbt6LjxmPTtJirmknHDlM8x2OgXs97ko=; b=p14IntqZlMc4cGY25hsVIBvtHDdw9Dh0olhpOEZKWI1hQVADcW5g/IWeIVnwMlf1VK QCxe9tr4tkcSL6PvqqqAWAYOoJznhwpSlmc80qPqil76pSow4kPAm2A3BzHGTlSzA1Mp 3XaQGAQeD9h8/DO7Rxk8l3xyByoE79m5C8jLNEnYw2lQc3aZvzxgcc7aGOMLiAG8pmMe Exr/OTjkFUDzv30nhAU/t17TxN38+xOCzYFz+PWZgGF55yRWkJCyJQDb78McETMFtfDp C3K5HQy3ph45Ru0XsTtgLALoG7TqwmrnclWQFz0VAk2K6DQDxayfNs43aIYjlhFFTnSM jHYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xrr8ngCOAwIKbt6LjxmPTtJirmknHDlM8x2OgXs97ko=; b=pTVg0yAP+tu7Y1qAeF4S0j9DbBNU0oZARlV0RVVMmgDPEkJa2qo1ZtUaXrEDCiMLmq WSAKNKaZz1iWhc1MR84krYrKSSWSOaR1XXtVBNdlLnhTsMuoAjHl5p4c6VmnN08YkC1m ckzhx8HPd4xnvdaE5UQCdAXxr18gSWrI4vA9Ffw90KnK33KPIM1VFmPikIrjwlQuENX+ ukDuGQG5QSK95lDOFPwbcQsjdTFb9Jo7DJlWA9GuRsLA5nf5J0355XttQa4TX1GFu6E6 ggR6dpWaDqGqndlXn0vcVrNwOkLo/V5doF2/pGwFSrPTWDRpT+qT8AzL9D7vKRAw89Zp Ziwg== X-Gm-Message-State: AHQUAuamjRZEcPZvhoc8CFGrfisC9fuPmXZkYwJIplkrjggbzTljsOCg pqM7bn2t/GiFo9PnZlsL797aCM2cNBc= X-Google-Smtp-Source: AHgI3IbWQ+YHssfx7ls2PQPFYNR6tGRIe3JpxycaGuwWrgywYA9fDsLapMlb+rOPK5wKYauhnMreNw== X-Received: by 2002:a63:d413:: with SMTP id a19mr17537511pgh.199.1551080834370; Sun, 24 Feb 2019 23:47:14 -0800 (PST) Received: from dhcp-12-139.nay.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id e21sm19520157pfh.45.2019.02.24.23.47.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Feb 2019 23:47:13 -0800 (PST) From: Hangbin Liu To: netdev@vger.kernel.org Cc: Roopa Prabhu , "David S . Miller" , Hangbin Liu Subject: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto Date: Mon, 25 Feb 2019 15:47:00 +0800 Message-Id: <20190225074700.7316-1-liuhangbin@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For ip rules, we need to use 'ipproto ipv6-icmp' to match ICMPv6 headers. But for ip -6 route, currently we only support tcp, udp and icmp. Add ICMPv6 support so we can match ipv6-icmp rules for route lookup. Reported-by: Jianlin Shi Fixes: eacb9384a3fe ("ipv6: support sport, dport and ip_proto in RTM_GETROUTE") Signed-off-by: Hangbin Liu --- net/ipv4/netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ipv4/netlink.c b/net/ipv4/netlink.c index f86bb4f06609..95601237521f 100644 --- a/net/ipv4/netlink.c +++ b/net/ipv4/netlink.c @@ -3,6 +3,7 @@ #include #include #include +#include #include int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 *ip_proto, @@ -14,6 +15,7 @@ int rtm_getroute_parse_ip_proto(struct nlattr *attr, u8 *ip_proto, case IPPROTO_TCP: case IPPROTO_UDP: case IPPROTO_ICMP: + case IPPROTO_ICMPV6: return 0; default: NL_SET_ERR_MSG(extack, "Unsupported ip proto"); -- 2.19.2