udp_diag: implement idiag_get_info for udp/udplite to get queue information

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 <davidshan@tencent.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Shan Wei
2012-04-24 18:15:41 +00:00
committed by David S. Miller
parent 2021492657
commit 62ad6fcd74
2 changed files with 10 additions and 1 deletions

View File

@@ -141,7 +141,7 @@ int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
goto rtattr_failure;
if (icsk == NULL) {
r->idiag_rqueue = r->idiag_wqueue = 0;
handler->idiag_get_info(sk, r, NULL);
goto out;
}