aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-10-05 20:04:39 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-06 15:44:47 +0200
commit057af70713445fad2459aa348c9c2c4ecf7db938 (patch)
treeba8d367a7c7ae4e0555616c8bc477e33ed682ac4 /net/tipc/node.c
parentnet: nfc: have genetlink code to parse the attrs during dumpit (diff)
downloadlinux-dev-057af70713445fad2459aa348c9c2c4ecf7db938.tar.xz
linux-dev-057af70713445fad2459aa348c9c2c4ecf7db938.zip
net: tipc: have genetlink code to parse the attrs during dumpit
Benefit from the fact that the generic netlink code can parse the attrs for dumpit op and avoid need to parse it in the op callback. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index c8f6177dd5a2..f2e3cf70c922 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -2484,13 +2484,9 @@ int tipc_nl_node_dump_monitor_peer(struct sk_buff *skb,
int err;
if (!prev_node) {
- struct nlattr **attrs;
+ struct nlattr **attrs = genl_dumpit_info(cb)->attrs;
struct nlattr *mon[TIPC_NLA_MON_MAX + 1];
- err = tipc_nlmsg_parse(cb->nlh, &attrs);
- if (err)
- return err;
-
if (!attrs[TIPC_NLA_MON])
return -EINVAL;