aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/udp_media.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/udp_media.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/udp_media.c')
-rw-r--r--net/tipc/udp_media.c6
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;