diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2011-12-26 14:08:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-26 14:08:47 -0500 |
commit | 3b0723c12e825e26aa5fc0c6970108425824b51d (patch) | |
tree | 23ae96d0b284a5676aa826e23c338a6292642d01 /net/unix/diag.c | |
parent | c5e1fd8ccae09f574d6f978c90c2b968ee29030c (diff) |
unix_diag: Fix incoming connections nla length
The NLA_PUT macro should accept the actual attribute length, not
the amount of elements in array :(
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/diag.c')
-rw-r--r-- | net/unix/diag.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/unix/diag.c b/net/unix/diag.c index 91d57828499c..39e44c98176a 100644 --- a/net/unix/diag.c +++ b/net/unix/diag.c | |||
@@ -72,7 +72,8 @@ static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) | |||
72 | 72 | ||
73 | if (sk->sk_state == TCP_LISTEN) { | 73 | if (sk->sk_state == TCP_LISTEN) { |
74 | spin_lock(&sk->sk_receive_queue.lock); | 74 | spin_lock(&sk->sk_receive_queue.lock); |
75 | buf = UNIX_DIAG_PUT(nlskb, UNIX_DIAG_ICONS, sk->sk_receive_queue.qlen); | 75 | buf = UNIX_DIAG_PUT(nlskb, UNIX_DIAG_ICONS, |
76 | sk->sk_receive_queue.qlen * sizeof(u32)); | ||
76 | i = 0; | 77 | i = 0; |
77 | skb_queue_walk(&sk->sk_receive_queue, skb) { | 78 | skb_queue_walk(&sk->sk_receive_queue, skb) { |
78 | struct sock *req, *peer; | 79 | struct sock *req, *peer; |