diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-25 23:33:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-25 23:33:56 +0000 |
commit | 858539f346bb72c1313c0f9bf0ef20d829664ae5 (patch) | |
tree | 827bfdb87d9254a60c4454ae81f754c98370f33e | |
parent | a31bab668764d3dcce73e40a4ac77b5bf84eb723 (diff) | |
download | gnunet-858539f346bb72c1313c0f9bf0ef20d829664ae5.tar.gz gnunet-858539f346bb72c1313c0f9bf0ef20d829664ae5.zip |
-udp broadcasts should not be flagged as inbound
-rw-r--r-- | src/transport/plugin_transport_udp_broadcasting.c | 11 | ||||
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c index 3ef9ecaaf..814328f48 100644 --- a/src/transport/plugin_transport_udp_broadcasting.c +++ b/src/transport/plugin_transport_udp_broadcasting.c | |||
@@ -160,7 +160,9 @@ broadcast_ipv6_mst_cb (void *cls, void *client, | |||
160 | 160 | ||
161 | hello = (struct GNUNET_MessageHeader *) &msg[1]; | 161 | hello = (struct GNUNET_MessageHeader *) &msg[1]; |
162 | address = GNUNET_HELLO_address_allocate (&msg->sender, PLUGIN_NAME, | 162 | address = GNUNET_HELLO_address_allocate (&msg->sender, PLUGIN_NAME, |
163 | (const char *) &mc->addr, sizeof (mc->addr), GNUNET_HELLO_ADDRESS_INFO_INBOUND); | 163 | (const char *) &mc->addr, |
164 | sizeof (mc->addr), | ||
165 | GNUNET_HELLO_ADDRESS_INFO_NONE); | ||
164 | plugin->env->receive (plugin->env->cls, address, NULL, hello); | 166 | plugin->env->receive (plugin->env->cls, address, NULL, hello); |
165 | plugin->env->update_address_metrics (plugin->env->cls, address, | 167 | plugin->env->update_address_metrics (plugin->env->cls, address, |
166 | NULL, &atsi, 1); | 168 | NULL, &atsi, 1); |
@@ -202,8 +204,11 @@ broadcast_ipv4_mst_cb (void *cls, void *client, | |||
202 | GNUNET_break (ntohl(mc->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED); | 204 | GNUNET_break (ntohl(mc->ats_address_network_type) != GNUNET_ATS_NET_UNSPECIFIED); |
203 | 205 | ||
204 | hello = (struct GNUNET_MessageHeader *) &msg[1]; | 206 | hello = (struct GNUNET_MessageHeader *) &msg[1]; |
205 | address = GNUNET_HELLO_address_allocate (&msg->sender, PLUGIN_NAME, | 207 | address = GNUNET_HELLO_address_allocate (&msg->sender, |
206 | (const char *) &mc->addr, sizeof (mc->addr), GNUNET_HELLO_ADDRESS_INFO_INBOUND); | 208 | PLUGIN_NAME, |
209 | (const char *) &mc->addr, | ||
210 | sizeof (mc->addr), | ||
211 | GNUNET_HELLO_ADDRESS_INFO_NONE); | ||
207 | plugin->env->receive (plugin->env->cls, address, NULL, hello); | 212 | plugin->env->receive (plugin->env->cls, address, NULL, hello); |
208 | plugin->env->update_address_metrics (plugin->env->cls, address, | 213 | plugin->env->update_address_metrics (plugin->env->cls, address, |
209 | NULL, &atsi, 1); | 214 | NULL, &atsi, 1); |
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 51e8991b9..0ae698cd6 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1446,7 +1446,7 @@ process_data (void *cls, | |||
1446 | PLUGIN_NAME, | 1446 | PLUGIN_NAME, |
1447 | &mas->endpoint->wlan_addr, | 1447 | &mas->endpoint->wlan_addr, |
1448 | sizeof (mas->endpoint->wlan_addr), | 1448 | sizeof (mas->endpoint->wlan_addr), |
1449 | GNUNET_HELLO_ADDRESS_INFO_INBOUND); | 1449 | GNUNET_HELLO_ADDRESS_INFO_NONE); |
1450 | mas->session = lookup_session (mas->endpoint, | 1450 | mas->session = lookup_session (mas->endpoint, |
1451 | &tmpsource); | 1451 | &tmpsource); |
1452 | if (NULL == mas->session) | 1452 | if (NULL == mas->session) |