mptcp_diag.c (dbe69e43372212527abf48609aba7fc39a6daa27) mptcp_diag.c (01757f536ac825e3614d583fee9acb48c64ed084)
1// SPDX-License-Identifier: GPL-2.0
2/* MPTCP socket monitoring support
3 *
4 * Copyright (c) 2020 Red Hat
5 *
6 * Author: Paolo Abeni <pabeni@redhat.com>
7 */
8

--- 43 unchanged lines hidden (view full) ---

52
53 err = inet_sk_diag_fill(sk, inet_csk(sk), rep, cb, req, 0,
54 netlink_net_capable(in_skb, CAP_NET_ADMIN));
55 if (err < 0) {
56 WARN_ON(err == -EMSGSIZE);
57 kfree_skb(rep);
58 goto out;
59 }
1// SPDX-License-Identifier: GPL-2.0
2/* MPTCP socket monitoring support
3 *
4 * Copyright (c) 2020 Red Hat
5 *
6 * Author: Paolo Abeni <pabeni@redhat.com>
7 */
8

--- 43 unchanged lines hidden (view full) ---

52
53 err = inet_sk_diag_fill(sk, inet_csk(sk), rep, cb, req, 0,
54 netlink_net_capable(in_skb, CAP_NET_ADMIN));
55 if (err < 0) {
56 WARN_ON(err == -EMSGSIZE);
57 kfree_skb(rep);
58 goto out;
59 }
60 err = netlink_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid,
61 MSG_DONTWAIT);
62 if (err > 0)
63 err = 0;
60 err = nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid);
61
64out:
65 sock_put(sk);
66
67out_nosk:
68 return err;
69}
70
71static void mptcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,

--- 101 unchanged lines hidden ---
62out:
63 sock_put(sk);
64
65out_nosk:
66 return err;
67}
68
69static void mptcp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,

--- 101 unchanged lines hidden ---