aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2010-05-02 23:22:21 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2010-05-02 23:22:21 +0000
commit2c8eb2f20999f03d781045d7d5bdadf748fe3cfc (patch)
treed4e24e55dd38c17f3005b08ec1a69ca0105d801a /src/transport/plugin_transport_udp.c
parent44820ac6d7817008dcbbb8727dbab21dbbe3a116 (diff)
downloadgnunet-2c8eb2f20999f03d781045d7d5bdadf748fe3cfc.tar.gz
gnunet-2c8eb2f20999f03d781045d7d5bdadf748fe3cfc.zip
Set the oft-forgotten sin_len.
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index a771bf973..0e7f4d126 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -297,6 +297,9 @@ udp_plugin_send (void *cls,
297 t6 = addr; 297 t6 = addr;
298 af = AF_INET6; 298 af = AF_INET6;
299 memset (&a6, 0, sizeof (a6)); 299 memset (&a6, 0, sizeof (a6));
300#if HAVE_SOCKADDR_IN_SIN_LEN
301 a6.sin6_len = sizeof (a6);
302#endif
300 a6.sin6_family = AF_INET6; 303 a6.sin6_family = AF_INET6;
301 a6.sin6_port = t6->u6_port; 304 a6.sin6_port = t6->u6_port;
302 memcpy (a6.sin6_addr.s6_addr, 305 memcpy (a6.sin6_addr.s6_addr,
@@ -310,6 +313,9 @@ udp_plugin_send (void *cls,
310 t4 = addr; 313 t4 = addr;
311 af = AF_INET; 314 af = AF_INET;
312 memset (&a4, 0, sizeof (a4)); 315 memset (&a4, 0, sizeof (a4));
316#if HAVE_SOCKADDR_IN_SIN_LEN
317 a4.sin_len = sizeof (a4);
318#endif
313 a4.sin_family = AF_INET; 319 a4.sin_family = AF_INET;
314 a4.sin_port = t4->u_port; 320 a4.sin_port = t4->u_port;
315 a4.sin_addr.s_addr = t4->ipv4_addr; 321 a4.sin_addr.s_addr = t4->ipv4_addr;