Re: Using connect() on UDP RPC client sockets.

2001-06-21 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, Ian Dowse writes: > >I would like to change the RPC client code to use connect() for >UDP sockets. I think this would be a more modern behaviour; it is As a first step to achieve this goal, I would like to commit the following patch to the RPC library in -current.

Re: Using connect() on UDP RPC client sockets.

2001-05-22 Thread Garrett Wollman
< said: > Can anyone realistically see bind or ntpd being modified to take > advantage of it when running on FreeBSD? Yes, given that it results in substantial simplification and (in the case of named) enables non-privileged operation even in the presence of dynamically-configured network interf

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Barney Wolff
Well there's SCTP ... I have a general comment/question: Is there a policy on when it is appropriate to create a FreeBSD-only feature? I can certainly see it when there is a big win to be had. A feature like this, though, if not likely to become part of Posix/Single-Unix or whatever the term i

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Garrett Wollman
< said: > Where an RFC mandates that the reply source address must be the same > as the request dest addr This is true for *any* protocol built over IP, regardless of what the individual protocol specifications say. See RFC 1122 sections 3.3.4.2, 4.1.3.5, and 4.2.3.7. (It actually says ``SHOUL

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Garrett Wollman
< said: > I think the option should be renamed to something like IP_SENDSRCADDR > just to avoid confusion - does this seem reasonable? I think it's OK to add an additional name for the same control message, but it should be possible (and documented) to use the exact control message as was return

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, Thomas Moestl writes: > >I have a patch that does just that (although it just overloads >IP_RECVDSTADDR for sendmsg instead of creating a new flag). I wrote it >some time ago for a DNS server (the standard requires the source >address to be the address the packet we

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Thomas Moestl
On Mon, 2001/05/21 at 14:43:09 +0100, Ian Dowse wrote: > In message <[EMAIL PROTECTED]>, Barney Wolff writes: > >1. Multi-homed hosts are in fact very common, especially in > >corporate environments. To get the right source addr in > >its reply, the server must open separate sockets on e

Re: Using connect() on UDP RPC client sockets.

2001-05-21 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, Barney Wolff writes: >1. Multi-homed hosts are in fact very common, especially in >corporate environments. To get the right source addr in >its reply, the server must open separate sockets on each >of its host's addresses - as named and ntpd do. And t

Re: Using connect() on UDP RPC client sockets.

2001-05-20 Thread Barney Wolff
1. Multi-homed hosts are in fact very common, especially in corporate environments. To get the right source addr in its reply, the server must open separate sockets on each of its host's addresses - as named and ntpd do. And then it has to detect changes in the set of addresses.

Using connect() on UDP RPC client sockets.

2001-05-20 Thread Ian Dowse
The RPC client code in libc performs UDP RPC calls with sendto() and recvfrom() using an unconnected socket. When a reply arrives, the library code checks only that the XID of the reply matches that of the request; it does not check that the reply came from the address to which the request was se