diff options
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 91839bbff..d031e6008 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -2854,6 +2854,13 @@ udp_select_read (struct Plugin *plugin, | |||
2854 | /* Connection failure or something. Not a protocol violation. */ | 2854 | /* Connection failure or something. Not a protocol violation. */ |
2855 | return; | 2855 | return; |
2856 | } | 2856 | } |
2857 | |||
2858 | |||
2859 | /* PROCESS STUN PACKET */ | ||
2860 | if(GNUNET_NAT_try_decode_stun_packet(plugin->nat,(uint8_t *)buf, size )) | ||
2861 | return; | ||
2862 | |||
2863 | |||
2857 | if (size < sizeof(struct GNUNET_MessageHeader)) | 2864 | if (size < sizeof(struct GNUNET_MessageHeader)) |
2858 | { | 2865 | { |
2859 | LOG (GNUNET_ERROR_TYPE_WARNING, | 2866 | LOG (GNUNET_ERROR_TYPE_WARNING, |
@@ -2866,6 +2873,10 @@ udp_select_read (struct Plugin *plugin, | |||
2866 | GNUNET_break_op (0); | 2873 | GNUNET_break_op (0); |
2867 | return; | 2874 | return; |
2868 | } | 2875 | } |
2876 | |||
2877 | |||
2878 | |||
2879 | |||
2869 | msg = (const struct GNUNET_MessageHeader *) buf; | 2880 | msg = (const struct GNUNET_MessageHeader *) buf; |
2870 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 2881 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2871 | "UDP received %u-byte message from `%s' type %u\n", | 2882 | "UDP received %u-byte message from `%s' type %u\n", |
@@ -3533,7 +3544,8 @@ setup_sockets (struct Plugin *plugin, | |||
3533 | addrlens, | 3544 | addrlens, |
3534 | &udp_nat_port_map_callback, | 3545 | &udp_nat_port_map_callback, |
3535 | NULL, | 3546 | NULL, |
3536 | plugin); | 3547 | plugin, |
3548 | plugin->sockv4); | ||
3537 | return sockets_created; | 3549 | return sockets_created; |
3538 | } | 3550 | } |
3539 | 3551 | ||