raw_diag.c (ead5d1f4d877e92c051e1a1ade623d0d30e71619) | raw_diag.c (01757f536ac825e3614d583fee9acb48c64ed084) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2#include <linux/module.h> 3 4#include <linux/inet_diag.h> 5#include <linux/sock_diag.h> 6 7#include <net/inet_sock.h> 8#include <net/raw.h> --- 105 unchanged lines hidden (view full) --- 114 netlink_net_capable(in_skb, CAP_NET_ADMIN)); 115 sock_put(sk); 116 117 if (err < 0) { 118 kfree_skb(rep); 119 return err; 120 } 121 | 1// SPDX-License-Identifier: GPL-2.0-only 2#include <linux/module.h> 3 4#include <linux/inet_diag.h> 5#include <linux/sock_diag.h> 6 7#include <net/inet_sock.h> 8#include <net/raw.h> --- 105 unchanged lines hidden (view full) --- 114 netlink_net_capable(in_skb, CAP_NET_ADMIN)); 115 sock_put(sk); 116 117 if (err < 0) { 118 kfree_skb(rep); 119 return err; 120 } 121 |
122 err = netlink_unicast(net->diag_nlsk, rep, 123 NETLINK_CB(in_skb).portid, 124 MSG_DONTWAIT); 125 if (err > 0) 126 err = 0; | 122 err = nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid); 123 |
127 return err; 128} 129 130static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, 131 struct netlink_callback *cb, 132 const struct inet_diag_req_v2 *r, 133 struct nlattr *bc, bool net_admin) 134{ --- 129 unchanged lines hidden --- | 124 return err; 125} 126 127static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, 128 struct netlink_callback *cb, 129 const struct inet_diag_req_v2 *r, 130 struct nlattr *bc, bool net_admin) 131{ --- 129 unchanged lines hidden --- |