rtnetlink.c (4f84d82f7a623f8641af2574425c329431ff158f) rtnetlink.c (b7c6ba6eb1234e35a74fb8ba8123232a7b1ba9e4)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

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

1379{
1380 struct sock *sk = net->rtnl;
1381 if (sk) {
1382 /* At the last minute lie and say this is a socket for the
1383 * initial network namespace. So the socket will be safe to
1384 * free.
1385 */
1386 sk->sk_net = get_net(&init_net);
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

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

1379{
1380 struct sock *sk = net->rtnl;
1381 if (sk) {
1382 /* At the last minute lie and say this is a socket for the
1383 * initial network namespace. So the socket will be safe to
1384 * free.
1385 */
1386 sk->sk_net = get_net(&init_net);
1387 sock_release(net->rtnl->sk_socket);
1387 netlink_kernel_release(net->rtnl);
1388 net->rtnl = NULL;
1389 }
1390}
1391
1392static struct pernet_operations rtnetlink_net_ops = {
1393 .init = rtnetlink_net_init,
1394 .exit = rtnetlink_net_exit,
1395};

--- 41 unchanged lines hidden ---
1388 net->rtnl = NULL;
1389 }
1390}
1391
1392static struct pernet_operations rtnetlink_net_ops = {
1393 .init = rtnetlink_net_init,
1394 .exit = rtnetlink_net_exit,
1395};

--- 41 unchanged lines hidden ---