diff options
| author | oy <Tom_Adams@web.de> | 2011-03-30 12:08:33 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-30 12:08:33 +0200 |
| commit | 59d56cd332ecc86008c27326631566a4d2d94ecb (patch) | |
| tree | 9e207d901bd93c86e9e98260479a57a9fef85faa /src/base | |
| parent | 693bd39e77ee91ec335d8e30350b57edca8056fd (diff) | |
| download | zcatch-59d56cd332ecc86008c27326631566a4d2d94ecb.tar.gz zcatch-59d56cd332ecc86008c27326631566a4d2d94ecb.zip | |
finished IPv6 support (master servers aren't compatible with 0.5 and older). Closes #233
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/system.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/base/system.c b/src/base/system.c index ef3a38bf..e694f80e 100644 --- a/src/base/system.c +++ b/src/base/system.c @@ -593,7 +593,7 @@ static int priv_net_extract(const char *hostname, char *host, int max_host, int if(hostname[0] == '[') { // ipv6 mode - for(i = 1; i < max_host-1 && hostname[i] && hostname[i] != ']'; i++) + for(i = 1; i < max_host && hostname[i] && hostname[i] != ']'; i++) host[i-1] = hostname[i]; host[i-1] = 0; if(hostname[i] != ']') // malformatted @@ -711,6 +711,7 @@ int net_addr_from_str(NETADDR *addr, const char *string) struct sockaddr_in6 sa6; char buf[128]; int i; + str++; for(i = 0; i < 127 && str[i] && str[i] != ']'; i++) buf[i] = str[i]; buf[i] = 0; |