summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-12-02 11:54:32 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-12-02 11:54:32 +0100
commit2d0b7e24a52d51904faa8a8e96d68863491c110a (patch)
tree74e2ecdce593149a62bf7b43ba61235e20338ece /proto
parent0bb4e37db317a1290bad24fe430cac6569a9bd8c (diff)
Fixes problem with source address selection in BGP and BFD.
Diffstat (limited to 'proto')
-rw-r--r--proto/bfd/bfd.c2
-rw-r--r--proto/bgp/bgp.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c
index 89355483..b697e84c 100644
--- a/proto/bfd/bfd.c
+++ b/proto/bfd/bfd.c
@@ -740,7 +740,7 @@ bfd_neigh_notify(struct neighbor *nb)
if ((nb->scope > 0) && !n->req)
{
- ip_addr local = ipa_nonzero(n->local) ? n->local : nb->iface->addr->ip;
+ ip_addr local = ipa_nonzero(n->local) ? n->local : nb->ifa->ip;
n->req = bfd_request_session(p->p.pool, n->addr, local, nb->iface, NULL, NULL);
}
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index f5b6b8fc..7cd0b0ae 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -718,9 +718,8 @@ bgp_start_neighbor(struct bgp_proto *p)
{
/* Called only for single-hop BGP sessions */
- /* Remove this ? */
if (ipa_zero(p->source_addr))
- p->source_addr = p->neigh->iface->addr->ip;
+ p->source_addr = p->neigh->ifa->ip;
#ifdef IPV6
{