From: Willem de Bruijn Date: Thu, 7 Apr 2016 22:12:58 +0000 (-0400) Subject: udp: do not expect udp headers on ioctl SIOCINQ X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f9a45beaa96;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git udp: do not expect udp headers on ioctl SIOCINQ On udp sockets, ioctl SIOCINQ returns the payload size of the first packet. Since commit e6afc8ace6dd pulled the headers, the result is incorrect when subtracting header length. Remove that operation. Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller --- diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 3563788d064f..d2d294b0a1f1 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -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); }