aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/udp_diag.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-19netlink: rename ssk to sk in struct netlink_skb_paramsPatrick McHardy1-2/+2
Memory mapped netlink needs to store the receiving userspace socket when sending from the kernel to userspace. Rename 'ssk' to 'sk' to avoid confusion. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-03-28net-next: replace obsolete NLMSG_* with type safe nlmsg_*Hong zhi guo1-3/+3
Signed-off-by: Hong Zhiguo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10netlink: Rename pid to portid to avoid confusionEric W. Biederman1-3/+3
It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming fields that hold port identifiers portid instead of pid. I have carefully avoided changing the structures exported to userspace to avoid changing the userspace API. I have successfully built an allyesconfig kernel with this change. Signed-off-by: "Eric W. Biederman" <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-08-14userns: Teach inet_diag to work with user namespacesEric W. Biederman1-1/+4
Compute the user namespace of the socket that we are replying to and translate the kuids of reported sockets into that user namespace. Cc: Andrew Vagin <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Pavel Emelyanov <[email protected]> Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
2012-07-16net: make sock diag per-namespaceAndrey Vagin1-3/+7
Before this patch sock_diag works for init_net only and dumps information about sockets from all namespaces. This patch expands sock_diag for all name-spaces. It creates a netlink kernel socket for each netns and filters data during dumping. v2: filter accoding with netns in all places remove an unused variable. Cc: "David S. Miller" <[email protected]> Cc: Alexey Kuznetsov <[email protected]> Cc: James Morris <[email protected]> Cc: Hideaki YOSHIFUJI <[email protected]> Cc: Patrick McHardy <[email protected]> Cc: Pavel Emelyanov <[email protected]> CC: Eric Dumazet <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Andrew Vagin <[email protected]> Acked-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-25udp_diag: implement idiag_get_info for udp/udplite to get queue informationShan Wei1-0/+9
When we use netlink to monitor queue information for udp socket, idiag_rqueue and idiag_wqueue of inet_diag_msg are returned with 0. Keep consistent with netstat, just return back allocated rmem/wmem size. Signed-off-by: Shan Wei <[email protected]> Acked-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-17net: kill duplicate included headerShan Wei1-1/+0
For net part, remove duplicate included header. Signed-off-by: Shan Wei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-11inet_diag: Rename inet_diag_req into inet_diag_req_v2Pavel Emelyanov1-7/+7
Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-16sock_diag: Generalize requests cookies managementsPavel Emelyanov1-1/+1
The sk address is used as a cookie between dump/get_exact calls. It will be required for unix socket sdumping, so move it from inet_diag to sock_diag. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-16sock_diag: Fix module netlink aliasesPavel Emelyanov1-2/+2
I've made a mistake when fixing the sock_/inet_diag aliases :( 1. The sock_diag layer should request the family-based alias, not just the IPPROTO_IP one; 2. The inet_diag layer should request for AF_INET+protocol alias, not just the protocol one. Thus fix this. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-10udp_diag: Fix the !ipv6 casePavel Emelyanov1-0/+2
Wrap the udp6 lookup into the proper ifdef-s. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-09udp_diag: Implement the dump-all functionalityPavel Emelyanov1-0/+54
Do the same as TCP does -- iterate the given udp_table, filter sockets with bytecode and dump sockets into reply message. The same filtering as for TCP applies, though only some of the state bits really matter. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-09udp_diag: Implement the get_exact dumping functionalityPavel Emelyanov1-1/+51
Do the same as TCP does -- lookup a socket in the given udp_table, check cookie, fill the reply message with existing inet socket dumping helper and send one back. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-09udp_diag: Basic skeletonPavel Emelyanov1-0/+95
Introduce the transport level diag handler module for UDP (and UDP-lite) sockets and register (empty for now) callbacks in the inet_diag module. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>