From patchwork Fri Jul 1 07:58:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lamparter X-Patchwork-Id: 12902879 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 714D0C433EF for ; Fri, 1 Jul 2022 07:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235855AbiGAH65 (ORCPT ); Fri, 1 Jul 2022 03:58:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235845AbiGAH64 (ORCPT ); Fri, 1 Jul 2022 03:58:56 -0400 Received: from eidolon.nox.tf (eidolon.nox.tf [IPv6:2a07:2ec0:2185::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E82706EE8B for ; Fri, 1 Jul 2022 00:58:54 -0700 (PDT) Received: from [2a02:169:59c5:1:7d5c:5092:64f9:9cbc] (helo=areia) by eidolon.nox.tf with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o7BYC-00F8tH-Sk; Fri, 01 Jul 2022 09:58:53 +0200 Received: from equinox by areia with local (Exim 4.96) (envelope-from ) id 1o7BXq-000HAT-1u; Fri, 01 Jul 2022 09:58:30 +0200 From: David Lamparter To: netdev@vger.kernel.org Cc: "David S. Miller" , David Ahern , Eric Dumazet , David Lamparter Subject: [PATCH net-next 1/2] ipv6: make rtm_ipv6_policy available Date: Fri, 1 Jul 2022 09:58:04 +0200 Message-Id: <20220701075805.65978-2-equinox@diac24.net> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701075805.65978-1-equinox@diac24.net> References: <20220630202706.33555ad2@kernel.org> <20220701075805.65978-1-equinox@diac24.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org ... so ip6mr.c can use it too (as it is in IPv4.) Signed-off-by: David Lamparter --- 1:1 analog to IPv4, where rtm_ipv4_policy is exposed for pretty exactly the same thing. IPv6 just got away with not using this across file boundaries so far. --- include/net/ip6_fib.h | 1 + net/ipv6/route.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 6268963d9599..a12fedea97de 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -483,6 +483,7 @@ void rt6_get_prefsrc(const struct rt6_info *rt, struct in6_addr *addr) rcu_read_unlock(); } +extern const struct nla_policy rtm_ipv6_policy[]; int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack); diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 1d6f75eef4bd..26c7b31abe96 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -4964,7 +4964,7 @@ void rt6_mtu_change(struct net_device *dev, unsigned int mtu) fib6_clean_all(dev_net(dev), rt6_mtu_change_route, &arg); } -static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = { +const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = { [RTA_UNSPEC] = { .strict_start_type = RTA_DPORT + 1 }, [RTA_GATEWAY] = { .len = sizeof(struct in6_addr) }, [RTA_PREFSRC] = { .len = sizeof(struct in6_addr) },