|
@@ -294,11 +294,14 @@ int parse_uri_dstip(str* received, struct ip_addr* ip, unsigned short* port,
|
|
|
hooks.uri.dstip->body.len == 0))
|
|
|
goto end; /* no dst_ip param */
|
|
|
/* check if it's ipv4 or ipv6 */
|
|
|
- if (likely(((p = str2ip(&hooks.uri.dstip->body)) != 0) ||
|
|
|
+ if (
|
|
|
#ifdef USE_IPV6
|
|
|
- ((p = str2ip6(&hooks.uri.dstip->body)) != 0)
|
|
|
+ likely(((p = str2ip(&hooks.uri.dstip->body)) != 0) ||
|
|
|
+ ((p = str2ip6(&hooks.uri.dstip->body)) != 0))
|
|
|
+#else /* ! USE_IPV6 */
|
|
|
+ likely(((p = str2ip(&hooks.uri.dstip->body)) != 0))
|
|
|
#endif /* USE_IPV6 */
|
|
|
- )) {
|
|
|
+ ) {
|
|
|
*ip = *p;
|
|
|
} else
|
|
|
goto error_no_ip; /* no ip */
|