raw_diag.c (f8da977989c5d5d2f38e025d4ac1e18243723dbb) raw_diag.c (cd05a0eca8752c63bf79c10ae1a877d36cca995a)
1#include <linux/module.h>
2
3#include <linux/inet_diag.h>
4#include <linux/sock_diag.h>
5
6#include <net/inet_sock.h>
7#include <net/raw.h>
8#include <net/rawv6.h>

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

200}
201
202#ifdef CONFIG_INET_DIAG_DESTROY
203static int raw_diag_destroy(struct sk_buff *in_skb,
204 const struct inet_diag_req_v2 *r)
205{
206 struct net *net = sock_net(in_skb->sk);
207 struct sock *sk;
1#include <linux/module.h>
2
3#include <linux/inet_diag.h>
4#include <linux/sock_diag.h>
5
6#include <net/inet_sock.h>
7#include <net/raw.h>
8#include <net/rawv6.h>

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

200}
201
202#ifdef CONFIG_INET_DIAG_DESTROY
203static int raw_diag_destroy(struct sk_buff *in_skb,
204 const struct inet_diag_req_v2 *r)
205{
206 struct net *net = sock_net(in_skb->sk);
207 struct sock *sk;
208 int err;
208
209 sk = raw_sock_get(net, r);
210 if (IS_ERR(sk))
211 return PTR_ERR(sk);
209
210 sk = raw_sock_get(net, r);
211 if (IS_ERR(sk))
212 return PTR_ERR(sk);
212 return sock_diag_destroy(sk, ECONNABORTED);
213 err = sock_diag_destroy(sk, ECONNABORTED);
214 sock_put(sk);
215 return err;
213}
214#endif
215
216static const struct inet_diag_handler raw_diag_handler = {
217 .dump = raw_diag_dump,
218 .dump_one = raw_diag_dump_one,
219 .idiag_get_info = raw_diag_get_info,
220 .idiag_type = IPPROTO_RAW,

--- 42 unchanged lines hidden ---
216}
217#endif
218
219static const struct inet_diag_handler raw_diag_handler = {
220 .dump = raw_diag_dump,
221 .dump_one = raw_diag_dump_one,
222 .idiag_get_info = raw_diag_get_info,
223 .idiag_type = IPPROTO_RAW,

--- 42 unchanged lines hidden ---