diff options
-rw-r--r-- | net/tipc/net.c | 2 | ||||
-rw-r--r-- | net/tipc/netlink.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index 856f9e97ea29..4fbaa0464405 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -252,6 +252,8 @@ int __tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info) | |||
252 | u64 *w0 = (u64 *)&node_id[0]; | 252 | u64 *w0 = (u64 *)&node_id[0]; |
253 | u64 *w1 = (u64 *)&node_id[8]; | 253 | u64 *w1 = (u64 *)&node_id[8]; |
254 | 254 | ||
255 | if (!attrs[TIPC_NLA_NET_NODEID_W1]) | ||
256 | return -EINVAL; | ||
255 | *w0 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID]); | 257 | *w0 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID]); |
256 | *w1 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID_W1]); | 258 | *w1 = nla_get_u64(attrs[TIPC_NLA_NET_NODEID_W1]); |
257 | tipc_net_init(net, node_id, 0); | 259 | tipc_net_init(net, node_id, 0); |
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index d4e0bbeee727..6ff2254088f6 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -81,6 +81,8 @@ const struct nla_policy tipc_nl_net_policy[TIPC_NLA_NET_MAX + 1] = { | |||
81 | [TIPC_NLA_NET_UNSPEC] = { .type = NLA_UNSPEC }, | 81 | [TIPC_NLA_NET_UNSPEC] = { .type = NLA_UNSPEC }, |
82 | [TIPC_NLA_NET_ID] = { .type = NLA_U32 }, | 82 | [TIPC_NLA_NET_ID] = { .type = NLA_U32 }, |
83 | [TIPC_NLA_NET_ADDR] = { .type = NLA_U32 }, | 83 | [TIPC_NLA_NET_ADDR] = { .type = NLA_U32 }, |
84 | [TIPC_NLA_NET_NODEID] = { .type = NLA_U64 }, | ||
85 | [TIPC_NLA_NET_NODEID_W1] = { .type = NLA_U64 }, | ||
84 | }; | 86 | }; |
85 | 87 | ||
86 | const struct nla_policy tipc_nl_link_policy[TIPC_NLA_LINK_MAX + 1] = { | 88 | const struct nla_policy tipc_nl_link_policy[TIPC_NLA_LINK_MAX + 1] = { |