Thread (1 message) 1 message, 1 author, 2007-03-05

Re: [NFS] [PATCH 001 of 3] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying

From: Neil Brown <hidden>
Date: 2007-03-05 23:49:13
Also in: linux-nfs, lkml

On Monday March 5, olaf.kirch@oracle.com wrote:
On Friday 02 March 2007 05:28, NeilBrown wrote:
quoted
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.
... and this IPv6 code could never have worked anyway:
:-(
It's hard to test the IPv6 server until we have an IPv6 client I
guess, so thanks for the code review, even though we aren't going to
end up using that code...
But I find using recvmsg just for getting at the addresses
a little awkward too.
Do you?  It's surely a lot better than code duplication, and it is
exactly how you would get the information from user-space.
                      And I think to be on the safe side, you
should check that you're really looking at a PKTINFO cmsg
rather than something else.
Maybe.....
But is there really a chance that it might not be PKTINFO?
And what do you do if it isn't?
Log an error and drop the packet I guess.

I'll see what I can do.

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help