mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
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>
This commit is contained in:
committed by
David S. Miller
parent
4495af3194
commit
057af70713
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user