Skip to content

Commit

Permalink
udp: do not expect udp headers on ioctl SIOCINQ
Browse files Browse the repository at this point in the history
On udp sockets, ioctl SIOCINQ returns the payload size of the first
packet. Since commit e6afc8a pulled the headers, the result is
incorrect when subtracting header length. Remove that operation.

Fixes: e6afc8a ("udp: remove headers from UDP packets before queueing")

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Apr 14, 2016
1 parent 99717bd commit 9f9a45b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9f9a45b

Please sign in to comment.