diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-04 02:39:55 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-02-04 02:39:55 +0000 |
| commit | 5870ad9672ac09e366f1bfd4086e98cd019ed8f2 (patch) | |
| tree | d7657a18e022900fdc6e0df24b59af9042e84109 /libbb | |
| parent | 42823d597a9029ac497edda9102f61283630635b (diff) | |
| download | busybox-w32-5870ad9672ac09e366f1bfd4086e98cd019ed8f2.tar.gz busybox-w32-5870ad9672ac09e366f1bfd4086e98cd019ed8f2.tar.bz2 busybox-w32-5870ad9672ac09e366f1bfd4086e98cd019ed8f2.zip | |
mount: (try to) support cifs with IPv6
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/xconnect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index e5bdaac38..c3ccc470b 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c | |||
| @@ -164,8 +164,9 @@ USE_FEATURE_IPV6(sa_family_t af,) | |||
| 164 | hint.ai_flags = ai_flags & ~DIE_ON_ERROR; | 164 | hint.ai_flags = ai_flags & ~DIE_ON_ERROR; |
| 165 | rc = getaddrinfo(host, NULL, &hint, &result); | 165 | rc = getaddrinfo(host, NULL, &hint, &result); |
| 166 | if (rc || !result) { | 166 | if (rc || !result) { |
| 167 | bb_error_msg("bad address '%s'", org_host); | ||
| 167 | if (ai_flags & DIE_ON_ERROR) | 168 | if (ai_flags & DIE_ON_ERROR) |
| 168 | bb_error_msg_and_die("bad address '%s'", org_host); | 169 | sleep_and_die(); |
| 169 | goto ret; | 170 | goto ret; |
| 170 | } | 171 | } |
| 171 | r = xmalloc(offsetof(len_and_sockaddr, sa) + result->ai_addrlen); | 172 | r = xmalloc(offsetof(len_and_sockaddr, sa) + result->ai_addrlen); |
| @@ -187,6 +188,11 @@ len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t | |||
| 187 | } | 188 | } |
| 188 | #endif | 189 | #endif |
| 189 | 190 | ||
| 191 | len_and_sockaddr* host2sockaddr(const char *host, int port) | ||
| 192 | { | ||
| 193 | return str2sockaddr(host, port, AF_UNSPEC, 0); | ||
| 194 | } | ||
| 195 | |||
| 190 | len_and_sockaddr* xhost2sockaddr(const char *host, int port) | 196 | len_and_sockaddr* xhost2sockaddr(const char *host, int port) |
| 191 | { | 197 | { |
| 192 | return str2sockaddr(host, port, AF_UNSPEC, DIE_ON_ERROR); | 198 | return str2sockaddr(host, port, AF_UNSPEC, DIE_ON_ERROR); |
