diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-05 20:04:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-06 15:44:47 +0200 |
commit | 057af70713445fad2459aa348c9c2c4ecf7db938 (patch) | |
tree | ba8d367a7c7ae4e0555616c8bc477e33ed682ac4 /net/tipc/udp_media.c | |
parent | 4495af31947bcc8886fe43737500f12729f7bdd9 (diff) | |
download | linux-057af70713445fad2459aa348c9c2c4ecf7db938.tar.gz linux-057af70713445fad2459aa348c9c2c4ecf7db938.tar.bz2 linux-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/udp_media.c')
-rw-r--r-- | net/tipc/udp_media.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 287df68721df..43ca5fd6574d 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -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; |