summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-11-16 09:09:23 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-11-16 09:09:23 +0000
commitb60674eb5004789b7a0fb2fa88cd97b58baaf41d (patch)
treeb97535e8524f9eae03574ad002723e351c60d204
parent02d4ff31b04d2255910eabb56d5731dcbd6e4ae3 (diff)
-rw-r--r--src/transport/plugin_transport_http.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index 69d964c43..a6c9190bd 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -563,17 +563,16 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
GNUNET_i2s (target));
#endif
int res = GNUNET_OK;
-
if (addrlen == sizeof (struct IPv4HttpAddress))
{
struct IPv4HttpAddress * a4 = (struct IPv4HttpAddress *) addr;
- if (ntohs(a4->u4_port) == 0)
+ if ((ntohs(a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
res = GNUNET_SYSERR;
}
if (addrlen == sizeof (struct IPv6HttpAddress))
{
struct IPv6HttpAddress * a6 = (struct IPv6HttpAddress *) addr;
- if (ntohs(a6->u6_port) == 0)
+ if ((ntohs(a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO))
res = GNUNET_SYSERR;
}
if (res == GNUNET_OK)