diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2009-07-25 21:23:39 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2009-07-25 21:23:39 +0200 |
commit | 94911d4cc3741df95fef45e0cceed1ebc311404b (patch) | |
tree | 928e632c0b8a142def39c03623cd8cf5982247f7 | |
parent | 4cf0073b5c9d6428142c33f1283f269668329eb0 (diff) |
Don’t perror("connect") when there most likely is no IPv6 connectivity
-rw-r--r-- | src/get_ipv6_addr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/get_ipv6_addr.c b/src/get_ipv6_addr.c index 2fd978b..aa09d3a 100644 --- a/src/get_ipv6_addr.c +++ b/src/get_ipv6_addr.c @@ -41,7 +41,10 @@ const char *get_ipv6_addr() { * it saves the local address with which packets would * be sent to the destination. */ if (connect(fd, resp->ai_addr, resp->ai_addrlen) == -1) { - perror("connect()"); + /* We don’t display the error here because most + * likely, there just is no IPv6 connectivity. + * Thus, don’t spam the user’s console but just + * try the next address. */ (void)close(fd); continue; } |