OSDN Git Service

tipc: add policy for TIPC_NLA_NET_ADDR
authorEric Dumazet <edumazet@google.com>
Mon, 16 Apr 2018 15:29:42 +0000 (08:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Apr 2018 22:08:18 +0000 (18:08 -0400)
Before syzbot/KMSAN bites, add the missing policy for TIPC_NLA_NET_ADDR

Fixes: 27c21416727a ("tipc: add net set to new netlink api")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/netlink.c

index b76f13f..d4e0bbe 100644 (file)
@@ -79,7 +79,8 @@ const struct nla_policy tipc_nl_sock_policy[TIPC_NLA_SOCK_MAX + 1] = {
 
 const struct nla_policy tipc_nl_net_policy[TIPC_NLA_NET_MAX + 1] = {
        [TIPC_NLA_NET_UNSPEC]           = { .type = NLA_UNSPEC },
-       [TIPC_NLA_NET_ID]               = { .type = NLA_U32 }
+       [TIPC_NLA_NET_ID]               = { .type = NLA_U32 },
+       [TIPC_NLA_NET_ADDR]             = { .type = NLA_U32 },
 };
 
 const struct nla_policy tipc_nl_link_policy[TIPC_NLA_LINK_MAX + 1] = {