[PATCH] ipv4: Export rtm_ipv4_policy.

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE3359d

2 messages, 2 authors, 2017-07-04 · open the first message on its own page

[PATCH] ipv4: Export rtm_ipv4_policy.

From: David Miller <davem@davemloft.net>
Date: 2017-07-04 14:18:23

The MPLS code now needs it.

Fixes: 397fc9e5cefe ("mpls: route get support")
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/ipv4/fib_frontend.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 4e678fa..1b5860f 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -626,6 +626,7 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX + 1] = {
 	[RTA_UID]		= { .type = NLA_U32 },
 	[RTA_MARK]		= { .type = NLA_U32 },
 };
+EXPORT_SYMBOL_GPL(rtm_ipv4_policy);
 
 static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
 			     struct nlmsghdr *nlh, struct fib_config *cfg,
-- 
2.9.4

Re: [PATCH] ipv4: Export rtm_ipv4_policy.

From: Roopa Prabhu <hidden>
Date: 2017-07-04 23:21:43

On Tue, Jul 4, 2017 at 7:18 AM, David Miller [off-list ref] wrote:
The MPLS code now needs it.

Fixes: 397fc9e5cefe ("mpls: route get support")
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Sorry david. Just saw this. It was a cut-copy-paste error.
It should be the below. I can also submit a patch. Thanks.
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c

index 4b6ff85..9a28c3f 100644

--- a/net/mpls/af_mpls.c

+++ b/net/mpls/af_mpls.c
@@ -2130,7 +2130,7 @@ static int mpls_getroute(struct sk_buff *in_skb,
struct nlmsghdr *in_nlh,

        u8 n_labels;



        err = nlmsg_parse(in_nlh, sizeof(*rtm), tb, RTA_MAX,

-                         rtm_ipv4_policy, extack);

+                         rtm_mpls_policy, extack);

        if (err < 0)

                goto errout;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help