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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 016D6C43381 for ; Mon, 25 Feb 2019 11:14:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C470021734 for ; Mon, 25 Feb 2019 11:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726826AbfBYLOn (ORCPT ); Mon, 25 Feb 2019 06:14:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41564 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbfBYLOn (ORCPT ); Mon, 25 Feb 2019 06:14:43 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F277E308624A; Mon, 25 Feb 2019 11:14:42 +0000 (UTC) Received: from bistromath.localdomain (ovpn-204-202.brq.redhat.com [10.40.204.202]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2BE75D9D1; Mon, 25 Feb 2019 11:14:41 +0000 (UTC) Date: Mon, 25 Feb 2019 12:14:39 +0100 From: Sabrina Dubroca To: Hangbin Liu Cc: netdev@vger.kernel.org, Roopa Prabhu , "David S . Miller" Subject: Re: [PATCH net] ipv4: Add ICMPv6 support when parse route ipproto Message-ID: <20190225111439.GA26565@bistromath.localdomain> References: <20190225074700.7316-1-liuhangbin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190225074700.7316-1-liuhangbin@gmail.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 25 Feb 2019 11:14:43 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2019-02-25, 15:47:00 +0800, Hangbin Liu wrote: > @@ -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: Is IPPROTO_ICMPV6 supposed to be valid in the IPv4 code path calling this function? inet_rtm_getroute_build_skb() doesn't seem to handle it. Likewise, userspace could pass IPPROTO_ICMP from the IPv6 caller. Also, should that be guarded by #if IS_ENABLED(CONFIG_IPV6) ? > return 0; > default: > NL_SET_ERR_MSG(extack, "Unsupported ip proto"); > -- > 2.19.2 > -- Sabrina