Changeset 449
- Timestamp:
- May 1, 2014, 10:10:47 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/Changelog
r448 r449 1 3.1.1 :1 3.1.1 (01-0-2014): 2 2 * Disable inline asm on Cygwin (issue reported by Erik) 3 3 * Fix sh_ipvx_is_ipv4 such that numeric hostnames are not 4 4 incorrectly recognised as IP address (reported by A. Hofland) 5 * Fix sh_ipvx_is_ipv6 5 6 6 7 3.1.0 (31-10-2013): -
trunk/src/cutest_sh_tools.c
r448 r449 115 115 input = strdup("127"); 116 116 CuAssertTrue(tc, !sh_ipvx_is_numeric(input)); 117 #if defined(USE_IPVX) 118 input = strdup("::1"); 119 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 120 input = strdup("2002:c0a8:101::42"); 121 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 122 input = strdup("2003:dead:beef:4dad:23:46:bb:101"); 123 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 124 input = strdup("::192:168:0:1::"); 125 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 126 input = strdup("1:1:192:168:0:1:1:1"); 127 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 128 input = strdup("1:1:192:168:0:1:1:1:0"); 129 CuAssertTrue(tc, !sh_ipvx_is_numeric(input)); 130 input = strdup("2001:0db8:85a3:0000:0000:8a2e:0370:7334"); 131 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 132 input = strdup("2001:db8:85a3:0:0:8a2e:370:7334"); 133 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 134 input = strdup("2001:db8:85a3::8a2e:370:7334"); 135 CuAssertTrue(tc, sh_ipvx_is_numeric(input)); 136 #endif 117 137 } 118 138 -
trunk/src/sh_ipvx.c
r448 r449 82 82 else if (c == ':') 83 83 ++k; 84 else if (c == '.' && k < 3)84 else if (c == '.' && k < 2) 85 85 return (1 == 0); /* ::ffff:ipv4 */ 86 86 } 87 if (k < 2 || k > 7) 88 return (1 == 0); 89 87 90 return (1 == 1); 88 91 }
Note:
See TracChangeset
for help on using the changeset viewer.