summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp_broadcasting.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-04-04 09:43:10 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-04-04 09:43:10 +0000
commitc303b97bd731aef372ec24ebe8b47ee014ada23b (patch)
treeaa287d7443434a9147cfb08fe0caa12e9c8de9e4 /src/transport/plugin_transport_udp_broadcasting.c
parented18131bd038617c03e0b3b83e3eb56c31dc3e4a (diff)
changes for mantis 0002676
Diffstat (limited to 'src/transport/plugin_transport_udp_broadcasting.c')
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index e8e087276..a2278f293 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -394,6 +394,17 @@ iface_proc (void *cls, const char *name, int isDefault,
void
setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struct sockaddr_in *serverAddrv4)
{
+ const struct GNUNET_MessageHeader *hello;
+ hello = plugin->env->get_our_hello ();
+
+ if (GNUNET_YES == GNUNET_HELLO_is_friend_only((const struct GNUNET_HELLO_Message *) hello))
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ _("Disabling HELLO broadcasting due to friend-to-friend only configuration!\n"));
+ return;
+ }
+
+
/* create IPv4 broadcast socket */
plugin->broadcast_ipv4 = GNUNET_NO;
if (plugin->sockv4 != NULL)