mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Select the right source address and don't check port numbers.
This commit is contained in:
parent
85c92555ef
commit
035044b1d9
@ -210,11 +210,8 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c
|
|||||||
DBG("BGP: Connecting\n");
|
DBG("BGP: Connecting\n");
|
||||||
s = sk_new(p->p.pool);
|
s = sk_new(p->p.pool);
|
||||||
s->type = SK_TCP_ACTIVE;
|
s->type = SK_TCP_ACTIVE;
|
||||||
s->saddr = _MI(0x3ea80001); /* FIXME: Hack */
|
s->saddr = p->local_addr;
|
||||||
s->daddr = p->cf->remote_ip;
|
s->daddr = p->cf->remote_ip;
|
||||||
#if 0
|
|
||||||
s->sport = /* FIXME */
|
|
||||||
#endif
|
|
||||||
s->dport = BGP_PORT;
|
s->dport = BGP_PORT;
|
||||||
bgp_setup_sk(p, conn, s);
|
bgp_setup_sk(p, conn, s);
|
||||||
s->tx_hook = bgp_connected;
|
s->tx_hook = bgp_connected;
|
||||||
@ -237,7 +234,7 @@ bgp_incoming_connection(sock *sk, int dummy)
|
|||||||
WALK_LIST(n, bgp_list)
|
WALK_LIST(n, bgp_list)
|
||||||
{
|
{
|
||||||
struct bgp_proto *p = SKIP_BACK(struct bgp_proto, bgp_node, n);
|
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");
|
DBG("BGP: Authorized\n");
|
||||||
if (p->incoming_conn.sk)
|
if (p->incoming_conn.sk)
|
||||||
|
Loading…
Reference in New Issue
Block a user