[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220701075805.65978-2-equinox@diac24.net>
Date: Fri, 1 Jul 2022 09:58:04 +0200
From: David Lamparter <equinox@...c24.net>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
David Lamparter <equinox@...c24.net>
Subject: [PATCH net-next 1/2] ipv6: make rtm_ipv6_policy available
... so ip6mr.c can use it too (as it is in IPv4.)
Signed-off-by: David Lamparter <equinox@...c24.net>
---
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) },
--
2.36.1
Powered by blists - more mailing lists