Commit 9f9a45be authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller

udp: do not expect udp headers on ioctl SIOCINQ

On udp sockets, ioctl SIOCINQ returns the payload size of the first
packet. Since commit e6afc8ac pulled the headers, the result is
incorrect when subtracting header length. Remove that operation.

Fixes: e6afc8ac ("udp: remove headers from UDP packets before queueing")
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99717bdf
......@@ -1282,8 +1282,6 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
* of this packet since that is all
* that will be read.
*/
amount -= sizeof(struct udphdr);
return put_user(amount, (int __user *)arg);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment