diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2010-05-02 23:22:21 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2010-05-02 23:22:21 +0000 |
commit | 2c8eb2f20999f03d781045d7d5bdadf748fe3cfc (patch) | |
tree | d4e24e55dd38c17f3005b08ec1a69ca0105d801a /src/transport/plugin_transport_tcp.c | |
parent | 44820ac6d7817008dcbbb8727dbab21dbbe3a116 (diff) | |
download | gnunet-2c8eb2f20999f03d781045d7d5bdadf748fe3cfc.tar.gz gnunet-2c8eb2f20999f03d781045d7d5bdadf748fe3cfc.zip |
Set the oft-forgotten sin_len.
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index e7512d980..fad999fa4 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -849,6 +849,9 @@ tcp_plugin_send (void *cls, | |||
849 | t6 = addr; | 849 | t6 = addr; |
850 | af = AF_INET6; | 850 | af = AF_INET6; |
851 | memset (&a6, 0, sizeof (a6)); | 851 | memset (&a6, 0, sizeof (a6)); |
852 | #if HAVE_SOCKADDR_IN_SIN_LEN | ||
853 | a6.sin6_len = sizeof (a6); | ||
854 | #endif | ||
852 | a6.sin6_family = AF_INET6; | 855 | a6.sin6_family = AF_INET6; |
853 | a6.sin6_port = t6->t6_port; | 856 | a6.sin6_port = t6->t6_port; |
854 | memcpy (a6.sin6_addr.s6_addr, | 857 | memcpy (a6.sin6_addr.s6_addr, |
@@ -862,6 +865,9 @@ tcp_plugin_send (void *cls, | |||
862 | t4 = addr; | 865 | t4 = addr; |
863 | af = AF_INET; | 866 | af = AF_INET; |
864 | memset (&a4, 0, sizeof (a4)); | 867 | memset (&a4, 0, sizeof (a4)); |
868 | #if HAVE_SOCKADDR_IN_SIN_LEN | ||
869 | a4.sin_len = sizeof (a4); | ||
870 | #endif | ||
865 | a4.sin_family = AF_INET; | 871 | a4.sin_family = AF_INET; |
866 | a4.sin_port = t4->t_port; | 872 | a4.sin_port = t4->t_port; |
867 | a4.sin_addr.s_addr = t4->ipv4_addr; | 873 | a4.sin_addr.s_addr = t4->ipv4_addr; |