summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c5
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;