summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-21 13:01:28 +0000
committerMartin Mares <mj@ucw.cz>2000-04-21 13:01:28 +0000
commit8b258e4e659cd8bacf0f7e3997d30b43561ac3e6 (patch)
tree55f6ff6513cc3a581af8d2b2e2f9a701c13c4034 /proto/bgp/bgp.c
parent2a9e064d7b41ae6e944dd9fbcb18b89e8fda0dba (diff)
LOCAL_PREF is now always present and exported over all ibgp connections [draft]
Allow setting of address of the local end of the TCP connection. Several bug fixes.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 933ced83..27ade8ed 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -210,7 +210,10 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c
DBG("BGP: Connecting\n");
s = sk_new(p->p.pool);
s->type = SK_TCP_ACTIVE;
- s->saddr = p->local_addr;
+ if (ipa_nonzero(p->cf->source_addr))
+ s->saddr = p->cf->source_addr;
+ else
+ s->saddr = p->local_addr;
s->daddr = p->cf->remote_ip;
s->dport = BGP_PORT;
bgp_setup_sk(p, conn, s);