[PATCH net] net: route: add missing nla_policy entry for RTA_MARK attribute

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

STALE3477d

2 messages, 2 authors, 2017-03-01 · open the first message on its own page

[PATCH net] net: route: add missing nla_policy entry for RTA_MARK attribute

From: Liping Zhang <hidden>
Date: 2017-02-27 14:08:50

From: Liping Zhang <redacted>

This will add stricter validating for RTA_MARK attribute.

Signed-off-by: Liping Zhang <redacted>
---
 net/ipv4/fib_frontend.c | 1 +
 net/ipv6/route.c        | 1 +
 2 files changed, 2 insertions(+)
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index b39a791..42bfd08 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -622,6 +622,7 @@ const struct nla_policy rtm_ipv4_policy[RTA_MAX + 1] = {
 	[RTA_ENCAP_TYPE]	= { .type = NLA_U16 },
 	[RTA_ENCAP]		= { .type = NLA_NESTED },
 	[RTA_UID]		= { .type = NLA_U32 },
+	[RTA_MARK]		= { .type = NLA_U32 },
 };
 
 static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f54f426..d94f1df 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2891,6 +2891,7 @@ static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
 	[RTA_ENCAP]		= { .type = NLA_NESTED },
 	[RTA_EXPIRES]		= { .type = NLA_U32 },
 	[RTA_UID]		= { .type = NLA_U32 },
+	[RTA_MARK]		= { .type = NLA_U32 },
 };
 
 static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
-- 
2.5.5

Re: [PATCH net] net: route: add missing nla_policy entry for RTA_MARK attribute

From: David Miller <davem@davemloft.net>
Date: 2017-03-01 18:35:13

From: Liping Zhang <redacted>
Date: Mon, 27 Feb 2017 20:59:39 +0800
From: Liping Zhang <redacted>

This will add stricter validating for RTA_MARK attribute.

Signed-off-by: Liping Zhang <redacted>
Looks good, applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help