On 14 Dec 2001, dwd@samba.org wrote:> open_socket_in was attempting to try all the protocols returned from > getaddrinfo(), but only if a corresponding call to socket() returned one of > three *NOSUPPORT errno codes. A Redhat 6.2 system was observed returning > EINVAL instead so it never went on to try IPv4. This update adds EINVAL to > the list. Question: why not always continue through the list regardless of > what errno is?Good question. In fact, I see to remember some IPv6 documentation suggesting just that, in case e.g. a host is unreachable over one protocol. I guess that wouldn't happen in socket(), but it's probably generally good. -- Martin
On 14 Dec 2001, dwd@samba.org wrote:> Modified Files: > options.c > Log Message: > When INET6 is not defined, meaning that IPv6 is not supported, need to > initalize the global_opts.af_hint to AF_INET or systems such as Linux that > have a native getaddrinfo() because they support IPv6 will attempt to > create IPv6 sockets. This brings up a problem with the new global_opts > structure; in order to initialize them to a value other than 0, we need to > explicitly initialize them all in an order that matches the order in > rsync.h. > I think that's more inconvenient & error prone than keeping > global variables.I see your point... Should we get rid of it, or add an initialization function? -- Martin