fix two more udp pull header issues
Subsystems (3)
Willem de Bruijn
maintainerPATCH 1/2 udp: do not expect udp headers on ioctl SIOCINQ
In reply to Willem de BruijnFrom: Willem de Bruijn <[email protected]>
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.
--- net/ipv4/udp.c | 2 -- 1 file changed, 2 deletions(-)
net/ipv4/udp.c +0 -2
@@ -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); }
Signature · 1 line
2.8.0.rc3.226.g39d4020
Willem de Bruijn
maintainercover fix two more udp pull header issues
From: Willem de Bruijn <[email protected]>
Follow up patches to the fixes to RxRPC and SunRPC. A scan of the code showed two other interfaces that expect UDP packets to have a udphdr when queued: read packet length with ioctl SIOCINQ and receive payload checksum with socket option IP_CHECKSUM.
Willem de Bruijn (2):
udp: do not expect udp headers on ioctl SIOCINQ
udp: do not expect udp headers in recv cmsg IP_CMSG_CHECKSUM
net/ipv4/ip_sockglue.c | 3 ++- net/ipv4/udp.c | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.8.0.rc3.226.g39d4020
From: Willem de Bruijn <[email protected]>
Date: Thu, 7 Apr 2016 18:12:57 -0400
Quoted 4 lines
Follow up patches to the fixes to RxRPC and SunRPC. A scan of the code showed two other interfaces that expect UDP packets to have a udphdr when queued: read packet length with ioctl SIOCINQ and receive payload checksum with socket option
IP_CHECKSUM.
As we are seeing, lots of places depend upon the old way of queueing up UDP frames. :-/
Applied, thanks for mopping all of this up.
Willem de Bruijn
maintainerQuoted 10 lines · David Miller
From: Willem de Bruijn <[email protected]>
Date: Thu, 7 Apr 2016 18:12:57 -0400Quoted 4 lines
Follow up patches to the fixes to RxRPC and SunRPC. A scan of the code showed two other interfaces that expect UDP packets to have a udphdr when queued: read packet length with ioctl SIOCINQ and receive payload checksum with socket option
IP_CHECKSUM.As we are seeing, lots of places depend upon the old way of queueing up UDP frames. :-/
Yes, I greatly underestimated that. I should have done a much more thorough scan before submitting. Hopefully we've caught them all now.
Quoted 1 line
Applied, thanks for mopping all of this up.
Apologies for breaking it in the first place!