diff options
author | erdgeist <> | 2009-11-05 20:20:48 +0000 |
---|---|---|
committer | erdgeist <> | 2009-11-05 20:20:48 +0000 |
commit | b1bf030f922685b2613c7826fac306b6c2a82552 (patch) | |
tree | ee7ae82fc3e51d9a973b864fe14cb13a378b2c86 /opentracker.c | |
parent | 48f67314b6922ffc66c3f089363bd48b72adf755 (diff) |
Fixed parser error for v6 addresses
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/opentracker.c b/opentracker.c index c16b360..9cdc68e 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -327,10 +327,11 @@ static int scan_ip6_port( const char *src, ot_ip6 ip, uint16 *port ) { | |||
327 | if( !(off = scan_ip6( s, ip ) ) ) | 327 | if( !(off = scan_ip6( s, ip ) ) ) |
328 | return 0; | 328 | return 0; |
329 | s += off; | 329 | s += off; |
330 | if( bracket && *s == ']' ) ++s; | ||
330 | if( *s == 0 || isspace(*s)) return s-src; | 331 | if( *s == 0 || isspace(*s)) return s-src; |
331 | if( *s == ']' && bracket ) ++s; | ||
332 | if( !ip6_isv4mapped(ip)){ | 332 | if( !ip6_isv4mapped(ip)){ |
333 | if( ( bracket && *(s) != ':' ) || ( *(s) != '.' ) ) return 0; | 333 | if( *s != ':' && *s != '.' ) return 0; |
334 | if( !bracket && *(s) == ':' ) return 0; | ||
334 | s++; | 335 | s++; |
335 | } else { | 336 | } else { |
336 | if( *(s++) != ':' ) return 0; | 337 | if( *(s++) != ':' ) return 0; |