]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Select the right source address and don't check port numbers.
authorMartin Mares <mj@ucw.cz>
Wed, 19 Apr 2000 12:51:14 +0000 (12:51 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 19 Apr 2000 12:51:14 +0000 (12:51 +0000)
proto/bgp/bgp.c

index d9eddbd5da9f86dbd60f9d90f0e603a80de08b9c..411c77156607c6f9a8bf6063be7bcf6779970ef0 100644 (file)
@@ -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)