diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-11 13:30:30 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-11 13:30:30 +0200 |
commit | 62eb41a8bf4be835265df15f0183a4682a71ba31 (patch) | |
tree | 16c06fc992aa2dd07e9898d8051f3a4c3ba74bd4 /util.c | |
parent | d40144aec7a0bf59a05f236102bf094363caa32e (diff) |
Don't cry and die on a configured server (!) which doesn't resolve (DNS). Just cry some.postpone-resolving
Part of fixing RADSECPROXY-30.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -114,7 +114,7 @@ char *addr2string(struct sockaddr *addr) { RADIUS packet to be discarded on first attempt (due to Path MTU discovery). */ -void disable_DF_bit(int socket, struct addrinfo *res) { +void disable_DF_bit(int socket, const struct addrinfo *res) { if ((res->ai_family == AF_INET) && (res->ai_socktype == SOCK_DGRAM)) { #if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT) /* @@ -132,11 +132,11 @@ void disable_DF_bit(int socket, struct addrinfo *res) { } } -int bindtoaddr(struct addrinfo *addrinfo, int family, int reuse, int v6only) { +int bindtoaddr(const struct addrinfo *addrinfo, int family, int reuse, int v6only) { int s, on = 1; - struct addrinfo *res; + const struct addrinfo *res = addrinfo; - for (res = addrinfo; res; res = res->ai_next) { + for (; res; res = res->ai_next) { if (family != AF_UNSPEC && family != res->ai_family) continue; s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); |