提交 9f9a45be 编写于 作者: W Willem de Bruijn 提交者: 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: NWillem de Bruijn <willemb@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册