summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-04-19 12:51:14 +0000
committerMartin Mares <mj@ucw.cz>2000-04-19 12:51:14 +0000
commit035044b1d946c50efd4b59a8869198a0300c8151 (patch)
tree091ccc512610d1f48920388382d81f7c7d7af2db /proto
parent85c92555efcd67d2671a8aef1bf7c3f4acc2b21d (diff)
Select the right source address and don't check port numbers.
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index d9eddbd5..411c7715 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -210,11 +210,8 @@ 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 = _MI(0x3ea80001); /* FIXME: Hack */
+ s->saddr = p->local_addr;
s->daddr = p->cf->remote_ip;
-#if 0
- s->sport = /* FIXME */
-#endif
s->dport = BGP_PORT;
bgp_setup_sk(p, conn, s);
s->tx_hook = bgp_connected;
@@ -237,7 +234,7 @@ bgp_incoming_connection(sock *sk, int dummy)
WALK_LIST(n, bgp_list)
{
struct bgp_proto *p = SKIP_BACK(struct bgp_proto, bgp_node, n);
- if (ipa_equal(p->cf->remote_ip, sk->daddr) && sk->dport == BGP_PORT)
+ if (ipa_equal(p->cf->remote_ip, sk->daddr))
{
DBG("BGP: Authorized\n");
if (p->incoming_conn.sk)