diff options
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 690c8fc..c1837f0 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1004,6 +1004,11 @@ sk_leave_group(sock *s, ip_addr maddr) static void sk_tcp_connected(sock *s) { + sockaddr lsa; + int lsa_len = sizeof(lsa); + if (getsockname(s->fd, (struct sockaddr *) &lsa, &lsa_len) == 0) + get_sockaddr(&lsa, &s->saddr, &s->sport, 1); + s->type = SK_TCP; sk_alloc_bufs(s); s->tx_hook(s); |