]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] knfsd: use recv_msg to get peer address for NFSD instead of code-copying
authorNeilBrown <neilb@suse.de>
Tue, 6 Mar 2007 09:42:21 +0000 (01:42 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 6 Mar 2007 17:30:26 +0000 (09:30 -0800)
commitaff13a949ed261d2a1dcf58d8a493fd0547a1304
treef67e69f082bf6a6083e3b0cff089d1bba1d1da0c
parent8d0067e3dafc38729dc6ab3e4ac501e6a10b38a1
[PATCH] knfsd: use recv_msg to get peer address for NFSD instead of code-copying

The sunrpc server code needs to know the source and destination address for
UDP packets so it can reply properly.  It currently copies code out of the
network stack to pick the pieces out of the skb.  This is ugly and causes
compile problems with the IPv6 stuff.

So, rip that out and use recv_msg instead.  This is a much cleaner interface,
but has a slight cost in that the checksum is now checked before the copy, so
we don't benefit from doing both at the same time.  This can probably be
fixed.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/sunrpc/svcsock.c