aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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,
563 GNUNET_i2s (target)); 563 GNUNET_i2s (target));
564#endif 564#endif
565 int res = GNUNET_OK; 565 int res = GNUNET_OK;
566
567 if (addrlen == sizeof (struct IPv4HttpAddress)) 566 if (addrlen == sizeof (struct IPv4HttpAddress))
568 { 567 {
569 struct IPv4HttpAddress * a4 = (struct IPv4HttpAddress *) addr; 568 struct IPv4HttpAddress * a4 = (struct IPv4HttpAddress *) addr;
570 if (ntohs(a4->u4_port) == 0) 569 if ((ntohs(a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
571 res = GNUNET_SYSERR; 570 res = GNUNET_SYSERR;
572 } 571 }
573 if (addrlen == sizeof (struct IPv6HttpAddress)) 572 if (addrlen == sizeof (struct IPv6HttpAddress))
574 { 573 {
575 struct IPv6HttpAddress * a6 = (struct IPv6HttpAddress *) addr; 574 struct IPv6HttpAddress * a6 = (struct IPv6HttpAddress *) addr;
576 if (ntohs(a6->u6_port) == 0) 575 if ((ntohs(a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO))
577 res = GNUNET_SYSERR; 576 res = GNUNET_SYSERR;
578 } 577 }
579 if (res == GNUNET_OK) 578 if (res == GNUNET_OK)