IP aliases and sunrpc over UDP

H . J . Lu hjl@lucon.org
Wed Feb 16 19:54:00 GMT 2000


On Wed, Feb 16, 2000 at 06:06:33PM -0800, H . J . Lu wrote:
> There is a problem with IP aliases in sunrpc server over UDP. If
> there are more than one IP addresses on an interface, when the sunrpc
> server sends the reply back to client, the kernel will pick an IP
> address on that interface for the reply packet, which may not be the
> IP address the client is using. In some cases like NAT, it doesn't work
> very well. If we add a "struct msghdr" field in SVCXPRT, with
> IP_PKTINFO, recvmsg and sendmsg, we may be able to get it right. Any
> comments? I can create a patch for glibc 2.2 if it is a good idea.

After taking a closer look, a new entry to SVCXPRT:

	struct sockaddr_storage xp_laddr;	/* local address */

should be sufficient.

H.J.


More information about the Libc-hacker mailing list