aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bearer.c14
-rw-r--r--net/tipc/link.c2
-rw-r--r--net/tipc/net.c4
-rw-r--r--net/tipc/netlink.c3
-rw-r--r--net/tipc/netlink_compat.c32
-rw-r--r--net/tipc/node.c12
-rw-r--r--net/tipc/socket.c2
-rw-r--r--net/tipc/udp_media.c7
8 files changed, 39 insertions, 37 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 33a5bdfbef76..9b5c45f48f60 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -802,7 +802,7 @@ int tipc_nl_bearer_get(struct sk_buff *skb, struct genl_info *info)
802 802
803 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, 803 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX,
804 info->attrs[TIPC_NLA_BEARER], 804 info->attrs[TIPC_NLA_BEARER],
805 tipc_nl_bearer_policy); 805 tipc_nl_bearer_policy, NULL);
806 if (err) 806 if (err)
807 return err; 807 return err;
808 808
@@ -851,7 +851,7 @@ int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info)
851 851
852 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, 852 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX,
853 info->attrs[TIPC_NLA_BEARER], 853 info->attrs[TIPC_NLA_BEARER],
854 tipc_nl_bearer_policy); 854 tipc_nl_bearer_policy, NULL);
855 if (err) 855 if (err)
856 return err; 856 return err;
857 857
@@ -891,7 +891,7 @@ int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info)
891 891
892 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, 892 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX,
893 info->attrs[TIPC_NLA_BEARER], 893 info->attrs[TIPC_NLA_BEARER],
894 tipc_nl_bearer_policy); 894 tipc_nl_bearer_policy, NULL);
895 if (err) 895 if (err)
896 return err; 896 return err;
897 897
@@ -939,7 +939,7 @@ int tipc_nl_bearer_add(struct sk_buff *skb, struct genl_info *info)
939 939
940 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, 940 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX,
941 info->attrs[TIPC_NLA_BEARER], 941 info->attrs[TIPC_NLA_BEARER],
942 tipc_nl_bearer_policy); 942 tipc_nl_bearer_policy, NULL);
943 if (err) 943 if (err)
944 return err; 944 return err;
945 945
@@ -982,7 +982,7 @@ int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info)
982 982
983 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX, 983 err = nla_parse_nested(attrs, TIPC_NLA_BEARER_MAX,
984 info->attrs[TIPC_NLA_BEARER], 984 info->attrs[TIPC_NLA_BEARER],
985 tipc_nl_bearer_policy); 985 tipc_nl_bearer_policy, NULL);
986 if (err) 986 if (err)
987 return err; 987 return err;
988 988
@@ -1104,7 +1104,7 @@ int tipc_nl_media_get(struct sk_buff *skb, struct genl_info *info)
1104 1104
1105 err = nla_parse_nested(attrs, TIPC_NLA_MEDIA_MAX, 1105 err = nla_parse_nested(attrs, TIPC_NLA_MEDIA_MAX,
1106 info->attrs[TIPC_NLA_MEDIA], 1106 info->attrs[TIPC_NLA_MEDIA],
1107 tipc_nl_media_policy); 1107 tipc_nl_media_policy, NULL);
1108 if (err) 1108 if (err)
1109 return err; 1109 return err;
1110 1110
@@ -1152,7 +1152,7 @@ int tipc_nl_media_set(struct sk_buff *skb, struct genl_info *info)
1152 1152
1153 err = nla_parse_nested(attrs, TIPC_NLA_MEDIA_MAX, 1153 err = nla_parse_nested(attrs, TIPC_NLA_MEDIA_MAX,
1154 info->attrs[TIPC_NLA_MEDIA], 1154 info->attrs[TIPC_NLA_MEDIA],
1155 tipc_nl_media_policy); 1155 tipc_nl_media_policy, NULL);
1156 1156
1157 if (!attrs[TIPC_NLA_MEDIA_NAME]) 1157 if (!attrs[TIPC_NLA_MEDIA_NAME])
1158 return -EINVAL; 1158 return -EINVAL;
diff --git a/net/tipc/link.c b/net/tipc/link.c
index ddd2dd6f77aa..60820dc35a08 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1827,7 +1827,7 @@ int tipc_nl_parse_link_prop(struct nlattr *prop, struct nlattr *props[])
1827 int err; 1827 int err;
1828 1828
1829 err = nla_parse_nested(props, TIPC_NLA_PROP_MAX, prop, 1829 err = nla_parse_nested(props, TIPC_NLA_PROP_MAX, prop,
1830 tipc_nl_prop_policy); 1830 tipc_nl_prop_policy, NULL);
1831 if (err) 1831 if (err)
1832 return err; 1832 return err;
1833 1833
diff --git a/net/tipc/net.c b/net/tipc/net.c
index ab8a2d5d1e32..836da66cd852 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -211,8 +211,8 @@ int tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info)
211 return -EINVAL; 211 return -EINVAL;
212 212
213 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX, 213 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX,
214 info->attrs[TIPC_NLA_NET], 214 info->attrs[TIPC_NLA_NET], tipc_nl_net_policy,
215 tipc_nl_net_policy); 215 NULL);
216 if (err) 216 if (err)
217 return err; 217 return err;
218 218
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 26ca8dd64ded..b76f13f6fea1 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -268,7 +268,8 @@ int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr)
268 if (!*attr) 268 if (!*attr)
269 return -EOPNOTSUPP; 269 return -EOPNOTSUPP;
270 270
271 return nlmsg_parse(nlh, GENL_HDRLEN, *attr, maxattr, tipc_nl_policy); 271 return nlmsg_parse(nlh, GENL_HDRLEN, *attr, maxattr, tipc_nl_policy,
272 NULL);
272} 273}
273 274
274int __init tipc_netlink_start(void) 275int __init tipc_netlink_start(void)
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index e1ae8a8a2b8e..9bfe886ab330 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -296,7 +296,7 @@ static int __tipc_nl_compat_doit(struct tipc_nl_compat_cmd_doit *cmd,
296 296
297 err = nla_parse(attrbuf, tipc_genl_family.maxattr, 297 err = nla_parse(attrbuf, tipc_genl_family.maxattr,
298 (const struct nlattr *)trans_buf->data, 298 (const struct nlattr *)trans_buf->data,
299 trans_buf->len, NULL); 299 trans_buf->len, NULL, NULL);
300 if (err) 300 if (err)
301 goto parse_out; 301 goto parse_out;
302 302
@@ -352,7 +352,7 @@ static int tipc_nl_compat_bearer_dump(struct tipc_nl_compat_msg *msg,
352 return -EINVAL; 352 return -EINVAL;
353 353
354 err = nla_parse_nested(bearer, TIPC_NLA_BEARER_MAX, 354 err = nla_parse_nested(bearer, TIPC_NLA_BEARER_MAX,
355 attrs[TIPC_NLA_BEARER], NULL); 355 attrs[TIPC_NLA_BEARER], NULL, NULL);
356 if (err) 356 if (err)
357 return err; 357 return err;
358 358
@@ -472,7 +472,7 @@ static int tipc_nl_compat_link_stat_dump(struct tipc_nl_compat_msg *msg,
472 return -EINVAL; 472 return -EINVAL;
473 473
474 err = nla_parse_nested(link, TIPC_NLA_LINK_MAX, attrs[TIPC_NLA_LINK], 474 err = nla_parse_nested(link, TIPC_NLA_LINK_MAX, attrs[TIPC_NLA_LINK],
475 NULL); 475 NULL, NULL);
476 if (err) 476 if (err)
477 return err; 477 return err;
478 478
@@ -480,7 +480,7 @@ static int tipc_nl_compat_link_stat_dump(struct tipc_nl_compat_msg *msg,
480 return -EINVAL; 480 return -EINVAL;
481 481
482 err = nla_parse_nested(prop, TIPC_NLA_PROP_MAX, 482 err = nla_parse_nested(prop, TIPC_NLA_PROP_MAX,
483 link[TIPC_NLA_LINK_PROP], NULL); 483 link[TIPC_NLA_LINK_PROP], NULL, NULL);
484 if (err) 484 if (err)
485 return err; 485 return err;
486 486
@@ -488,7 +488,7 @@ static int tipc_nl_compat_link_stat_dump(struct tipc_nl_compat_msg *msg,
488 return -EINVAL; 488 return -EINVAL;
489 489
490 err = nla_parse_nested(stats, TIPC_NLA_STATS_MAX, 490 err = nla_parse_nested(stats, TIPC_NLA_STATS_MAX,
491 link[TIPC_NLA_LINK_STATS], NULL); 491 link[TIPC_NLA_LINK_STATS], NULL, NULL);
492 if (err) 492 if (err)
493 return err; 493 return err;
494 494
@@ -598,7 +598,7 @@ static int tipc_nl_compat_link_dump(struct tipc_nl_compat_msg *msg,
598 return -EINVAL; 598 return -EINVAL;
599 599
600 err = nla_parse_nested(link, TIPC_NLA_LINK_MAX, attrs[TIPC_NLA_LINK], 600 err = nla_parse_nested(link, TIPC_NLA_LINK_MAX, attrs[TIPC_NLA_LINK],
601 NULL); 601 NULL, NULL);
602 if (err) 602 if (err)
603 return err; 603 return err;
604 604
@@ -795,7 +795,7 @@ static int tipc_nl_compat_name_table_dump(struct tipc_nl_compat_msg *msg,
795 return -EINVAL; 795 return -EINVAL;
796 796
797 err = nla_parse_nested(nt, TIPC_NLA_NAME_TABLE_MAX, 797 err = nla_parse_nested(nt, TIPC_NLA_NAME_TABLE_MAX,
798 attrs[TIPC_NLA_NAME_TABLE], NULL); 798 attrs[TIPC_NLA_NAME_TABLE], NULL, NULL);
799 if (err) 799 if (err)
800 return err; 800 return err;
801 801
@@ -803,7 +803,7 @@ static int tipc_nl_compat_name_table_dump(struct tipc_nl_compat_msg *msg,
803 return -EINVAL; 803 return -EINVAL;
804 804
805 err = nla_parse_nested(publ, TIPC_NLA_PUBL_MAX, 805 err = nla_parse_nested(publ, TIPC_NLA_PUBL_MAX,
806 nt[TIPC_NLA_NAME_TABLE_PUBL], NULL); 806 nt[TIPC_NLA_NAME_TABLE_PUBL], NULL, NULL);
807 if (err) 807 if (err)
808 return err; 808 return err;
809 809
@@ -863,7 +863,7 @@ static int __tipc_nl_compat_publ_dump(struct tipc_nl_compat_msg *msg,
863 return -EINVAL; 863 return -EINVAL;
864 864
865 err = nla_parse_nested(publ, TIPC_NLA_PUBL_MAX, attrs[TIPC_NLA_PUBL], 865 err = nla_parse_nested(publ, TIPC_NLA_PUBL_MAX, attrs[TIPC_NLA_PUBL],
866 NULL); 866 NULL, NULL);
867 if (err) 867 if (err)
868 return err; 868 return err;
869 869
@@ -929,7 +929,7 @@ static int tipc_nl_compat_sk_dump(struct tipc_nl_compat_msg *msg,
929 return -EINVAL; 929 return -EINVAL;
930 930
931 err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK], 931 err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK],
932 NULL); 932 NULL, NULL);
933 if (err) 933 if (err)
934 return err; 934 return err;
935 935
@@ -940,8 +940,8 @@ static int tipc_nl_compat_sk_dump(struct tipc_nl_compat_msg *msg,
940 u32 node; 940 u32 node;
941 struct nlattr *con[TIPC_NLA_CON_MAX + 1]; 941 struct nlattr *con[TIPC_NLA_CON_MAX + 1];
942 942
943 nla_parse_nested(con, TIPC_NLA_CON_MAX, sock[TIPC_NLA_SOCK_CON], 943 nla_parse_nested(con, TIPC_NLA_CON_MAX,
944 NULL); 944 sock[TIPC_NLA_SOCK_CON], NULL, NULL);
945 945
946 node = nla_get_u32(con[TIPC_NLA_CON_NODE]); 946 node = nla_get_u32(con[TIPC_NLA_CON_NODE]);
947 tipc_tlv_sprintf(msg->rep, " connected to <%u.%u.%u:%u>", 947 tipc_tlv_sprintf(msg->rep, " connected to <%u.%u.%u:%u>",
@@ -977,8 +977,8 @@ static int tipc_nl_compat_media_dump(struct tipc_nl_compat_msg *msg,
977 if (!attrs[TIPC_NLA_MEDIA]) 977 if (!attrs[TIPC_NLA_MEDIA])
978 return -EINVAL; 978 return -EINVAL;
979 979
980 err = nla_parse_nested(media, TIPC_NLA_MEDIA_MAX, attrs[TIPC_NLA_MEDIA], 980 err = nla_parse_nested(media, TIPC_NLA_MEDIA_MAX,
981 NULL); 981 attrs[TIPC_NLA_MEDIA], NULL, NULL);
982 if (err) 982 if (err)
983 return err; 983 return err;
984 984
@@ -998,7 +998,7 @@ static int tipc_nl_compat_node_dump(struct tipc_nl_compat_msg *msg,
998 return -EINVAL; 998 return -EINVAL;
999 999
1000 err = nla_parse_nested(node, TIPC_NLA_NODE_MAX, attrs[TIPC_NLA_NODE], 1000 err = nla_parse_nested(node, TIPC_NLA_NODE_MAX, attrs[TIPC_NLA_NODE],
1001 NULL); 1001 NULL, NULL);
1002 if (err) 1002 if (err)
1003 return err; 1003 return err;
1004 1004
@@ -1045,7 +1045,7 @@ static int tipc_nl_compat_net_dump(struct tipc_nl_compat_msg *msg,
1045 return -EINVAL; 1045 return -EINVAL;
1046 1046
1047 err = nla_parse_nested(net, TIPC_NLA_NET_MAX, attrs[TIPC_NLA_NET], 1047 err = nla_parse_nested(net, TIPC_NLA_NET_MAX, attrs[TIPC_NLA_NET],
1048 NULL); 1048 NULL, NULL);
1049 if (err) 1049 if (err)
1050 return err; 1050 return err;
1051 1051
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 4512e83652b1..1dcde24c7053 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1607,8 +1607,8 @@ int tipc_nl_peer_rm(struct sk_buff *skb, struct genl_info *info)
1607 return -EINVAL; 1607 return -EINVAL;
1608 1608
1609 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX, 1609 err = nla_parse_nested(attrs, TIPC_NLA_NET_MAX,
1610 info->attrs[TIPC_NLA_NET], 1610 info->attrs[TIPC_NLA_NET], tipc_nl_net_policy,
1611 tipc_nl_net_policy); 1611 NULL);
1612 if (err) 1612 if (err)
1613 return err; 1613 return err;
1614 1614
@@ -1774,7 +1774,7 @@ int tipc_nl_node_set_link(struct sk_buff *skb, struct genl_info *info)
1774 1774
1775 err = nla_parse_nested(attrs, TIPC_NLA_LINK_MAX, 1775 err = nla_parse_nested(attrs, TIPC_NLA_LINK_MAX,
1776 info->attrs[TIPC_NLA_LINK], 1776 info->attrs[TIPC_NLA_LINK],
1777 tipc_nl_link_policy); 1777 tipc_nl_link_policy, NULL);
1778 if (err) 1778 if (err)
1779 return err; 1779 return err;
1780 1780
@@ -1902,7 +1902,7 @@ int tipc_nl_node_reset_link_stats(struct sk_buff *skb, struct genl_info *info)
1902 1902
1903 err = nla_parse_nested(attrs, TIPC_NLA_LINK_MAX, 1903 err = nla_parse_nested(attrs, TIPC_NLA_LINK_MAX,
1904 info->attrs[TIPC_NLA_LINK], 1904 info->attrs[TIPC_NLA_LINK],
1905 tipc_nl_link_policy); 1905 tipc_nl_link_policy, NULL);
1906 if (err) 1906 if (err)
1907 return err; 1907 return err;
1908 1908
@@ -2042,7 +2042,7 @@ int tipc_nl_node_set_monitor(struct sk_buff *skb, struct genl_info *info)
2042 2042
2043 err = nla_parse_nested(attrs, TIPC_NLA_MON_MAX, 2043 err = nla_parse_nested(attrs, TIPC_NLA_MON_MAX,
2044 info->attrs[TIPC_NLA_MON], 2044 info->attrs[TIPC_NLA_MON],
2045 tipc_nl_monitor_policy); 2045 tipc_nl_monitor_policy, NULL);
2046 if (err) 2046 if (err)
2047 return err; 2047 return err;
2048 2048
@@ -2163,7 +2163,7 @@ int tipc_nl_node_dump_monitor_peer(struct sk_buff *skb,
2163 2163
2164 err = nla_parse_nested(mon, TIPC_NLA_MON_MAX, 2164 err = nla_parse_nested(mon, TIPC_NLA_MON_MAX,
2165 attrs[TIPC_NLA_MON], 2165 attrs[TIPC_NLA_MON],
2166 tipc_nl_monitor_policy); 2166 tipc_nl_monitor_policy, NULL);
2167 if (err) 2167 if (err)
2168 return err; 2168 return err;
2169 2169
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 15f6ce7bf868..740100abeec3 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -2866,7 +2866,7 @@ int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb)
2866 2866
2867 err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, 2867 err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX,
2868 attrs[TIPC_NLA_SOCK], 2868 attrs[TIPC_NLA_SOCK],
2869 tipc_nl_sock_policy); 2869 tipc_nl_sock_policy, NULL);
2870 if (err) 2870 if (err)
2871 return err; 2871 return err;
2872 2872
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c
index 46061cf48cd1..ecca64fc6a6f 100644
--- a/net/tipc/udp_media.c
+++ b/net/tipc/udp_media.c
@@ -457,7 +457,7 @@ int tipc_udp_nl_dump_remoteip(struct sk_buff *skb, struct netlink_callback *cb)
457 457
458 err = nla_parse_nested(battrs, TIPC_NLA_BEARER_MAX, 458 err = nla_parse_nested(battrs, TIPC_NLA_BEARER_MAX,
459 attrs[TIPC_NLA_BEARER], 459 attrs[TIPC_NLA_BEARER],
460 tipc_nl_bearer_policy); 460 tipc_nl_bearer_policy, NULL);
461 if (err) 461 if (err)
462 return err; 462 return err;
463 463
@@ -609,7 +609,8 @@ int tipc_udp_nl_bearer_add(struct tipc_bearer *b, struct nlattr *attr)
609 struct nlattr *opts[TIPC_NLA_UDP_MAX + 1]; 609 struct nlattr *opts[TIPC_NLA_UDP_MAX + 1];
610 struct udp_media_addr *dst; 610 struct udp_media_addr *dst;
611 611
612 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX, attr, tipc_nl_udp_policy)) 612 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX, attr,
613 tipc_nl_udp_policy, NULL))
613 return -EINVAL; 614 return -EINVAL;
614 615
615 if (!opts[TIPC_NLA_UDP_REMOTE]) 616 if (!opts[TIPC_NLA_UDP_REMOTE])
@@ -662,7 +663,7 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b,
662 663
663 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX, 664 if (nla_parse_nested(opts, TIPC_NLA_UDP_MAX,
664 attrs[TIPC_NLA_BEARER_UDP_OPTS], 665 attrs[TIPC_NLA_BEARER_UDP_OPTS],
665 tipc_nl_udp_policy)) 666 tipc_nl_udp_policy, NULL))
666 goto err; 667 goto err;
667 668
668 if (!opts[TIPC_NLA_UDP_LOCAL] || !opts[TIPC_NLA_UDP_REMOTE]) { 669 if (!opts[TIPC_NLA_UDP_LOCAL] || !opts[TIPC_NLA_UDP_REMOTE]) {