net: route: add missing nla_policy entry for RTA_MARK attribute
authorLiping Zhang <zlpnobody@gmail.com>
Mon, 27 Feb 2017 12:59:39 +0000 (20:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Mar 2017 18:25:56 +0000 (10:25 -0800)
This will add stricter validating for RTA_MARK attribute.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_frontend.c
net/ipv6/route.c

index b39a791f6756fc831857774b984febc71e37fae3..42bfd08109dd78ab509493e8d2205d72845bb3eb 100644 (file)
@@ -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,
index f54f4265b37f291ea10c8f67a45a243d2095074c..d94f1dfa54c84234dc7dc2ea1edfe29942ca66e8 100644 (file)
@@ -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,