diff mbox series

[net-next,1/2] ipv6: make rtm_ipv6_policy available

Message ID 20220701075805.65978-2-equinox@diac24.net (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series ip6mr: implement RTM_GETROUTE for single entry | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 619 this patch: 619
netdev/cc_maintainers warning 3 maintainers not CCed: yoshfuji@linux-ipv6.org pabeni@redhat.com kuba@kernel.org
netdev/build_clang success Errors and warnings before: 41 this patch: 41
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 620 this patch: 620
netdev/checkpatch warning CHECK: spaces preferred around that '+' (ctx:VxV)
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

David Lamparter July 1, 2022, 7:58 a.m. UTC
... so ip6mr.c can use it too (as it is in IPv4.)

Signed-off-by: David Lamparter <equinox@diac24.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 mbox series

Patch

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) },