version 1.215, 2009/10/28 16:38:18 |
version 1.216, 2009/11/10 04:30:45 |
|
|
|
|
#include <ctype.h> |
#include <ctype.h> |
#include <errno.h> |
#include <errno.h> |
|
#include <fcntl.h> |
#include <netdb.h> |
#include <netdb.h> |
#include <paths.h> |
#include <paths.h> |
#include <signal.h> |
#include <signal.h> |
|
|
} |
} |
sock = socket_rdomain(ai->ai_family, ai->ai_socktype, ai->ai_protocol, |
sock = socket_rdomain(ai->ai_family, ai->ai_socktype, ai->ai_protocol, |
options.rdomain); |
options.rdomain); |
if (sock < 0) |
if (sock < 0) { |
error("socket: %.100s", strerror(errno)); |
error("socket: %.100s", strerror(errno)); |
|
return -1; |
|
} |
|
fcntl(sock, F_SETFD, FD_CLOEXEC); |
|
|
/* Bind the socket to an alternative local IP address */ |
/* Bind the socket to an alternative local IP address */ |
if (options.bind_address == NULL) |
if (options.bind_address == NULL) |