Can Not Send Netlink Messages with Unshare(CLONE_NEWNET)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
A process can not send netlink messages(errno is ECONNREFUSED) after
running unshare(CLONE_NEWNET).

Part of the call stack when process failed:
netlink_sendmsg
netlink_unicast
netlink_getsockbyportid
netlink_lookup(return NULL)

The corresponding pseudocode is shown below:
unshare(CLONE_NEWNET) ;
res_socket = syscall(__NR_socket, 0x10ul, 3ul, 8);
syscall(__NR_sendmsg, res_socket, msghdr, 0ul);

I can't understand  this situation. Is this deliberate design?

Thanks.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux