]> err.no Git - linux-2.6/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)
commit7a37f5787e76bf1765c1add3a9a7163f841a28bb
treef67e69f082bf6a6083e3b0cff089d1bba1d1da0c
parent0e8cd28a084691587549630dce728661401d343b
[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