summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-07-12 17:39:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-07-12 17:39:39 +0200
commit9be9a264137cdd881f339c37d1a1918527924254 (patch)
tree0b815a7ac09fb59a3e72aad6ce713c7a77ed0662 /sysdep/unix
parentcfe34a316e35a209fcd814ccf3523c262e8d4b0a (diff)
downloadbird-9be9a264137cdd881f339c37d1a1918527924254.tar
bird-9be9a264137cdd881f339c37d1a1918527924254.zip
Implements proper multihop BGP.
Also does some incompatible changes to config file syntax, like removing 'via IP' from multihop option.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/io.c5
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);