Hello,

libgadu has a test suite which recently started trying to bind to 127.0.0.2:

#define HOST_LOCAL "127.0.0.2"
[...]
        memset(&sin, 0, sizeof(sin));
        sin.sin_family = AF_INET;
        sin.sin_addr.s_addr = inet_addr(HOST_LOCAL);

        if (bind(server_fds[i], (struct sockaddr*) &sin, sizeof(sin)) ==
-1) {
            perror("bind");
            failure();
        }

The reason they are not using 127.0.0.1 is that when running on windows
that address is used for something to workaround win32 limitations (don't
know details).

This succeeds on all Debian architectures except kfreebsd-* where it fails
with:
bind: Cannot assign requested address

I didn't do any detailed investigation nor do I know anything about
freebsd-specific network tools, but doesn't RFC3330 mandate that all of
127.0.0.0/8 should be on loopback?

There are a few options:

1) put some ifdefs into the test to treat kfreebsd (or windows) specially
2) somehow make sure that binding to that address works on the buildds.

What do you think?

Marcin
_______________________________________________
libgadu-devel mailing list
libgadu-devel@lists.ziew.org
http://lists.ziew.org/mailman/listinfo/libgadu-devel

Reply via email to