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:

committato da
David S. Miller

parent
4495af3194
commit
057af70713
@@ -448,15 +448,11 @@ int tipc_udp_nl_dump_remoteip(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
int i;
|
||||
|
||||
if (!bid && !skip_cnt) {
|
||||
struct nlattr **attrs = genl_dumpit_info(cb)->attrs;
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct nlattr *battrs[TIPC_NLA_BEARER_MAX + 1];
|
||||
struct nlattr **attrs;
|
||||
char *bname;
|
||||
|
||||
err = tipc_nlmsg_parse(cb->nlh, &attrs);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (!attrs[TIPC_NLA_BEARER])
|
||||
return -EINVAL;
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user