[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200703051953.24900.olaf.kirch@oracle.com>
Date: Mon, 5 Mar 2007 19:53:23 +0100
From: Olaf Kirch <olaf.kirch@...cle.com>
To: nfs@...ts.sourceforge.net
Cc: NeilBrown <neilb@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [NFS] [PATCH 001 of 3] knfsd: Use recv_msg to get peer address for NFSD instead of code-copying
On Friday 02 March 2007 05:28, NeilBrown wrote:
> 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:
> case AF_INET6: {
...
> - rqstp->rq_addrlen = sizeof(struct sockaddr_in);
... this should have been sizeof(sockaddr_in6)...
> - /* Remember which interface received this request */
> - ipv6_addr_copy(&rqstp->rq_daddr.addr6,
> - &skb->nh.ipv6h->saddr);
.... and this should have copied from daddr, not saddr.
But I find using recvmsg just for getting at the addresses
a little awkward too. 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.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@....de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists