diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:06:01 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:06:01 +0100 |
commit | 153f02da3bce1f3f1a99295648679c71327e8319 (patch) | |
tree | b7b7acf8026ba182f3a81f2d6da975b0b1524972 /proto/bgp/bgp.c | |
parent | 4ae3ee1200b386219673c2168eae996c6207b077 (diff) |
Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addresses
Also redesign preferred address selection and update protocols to use
appropriate preferred address.
Based on a previous work by Jan Maria Matejka.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index cccced57..a8d5cf9d 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -1094,19 +1094,8 @@ bgp_start_neighbor(struct bgp_proto *p) if (ipa_is_link_local(p->source_addr)) p->link_addr = p->source_addr; - else - { - /* Find some link-local address for given iface */ - struct ifa *a; - WALK_LIST(a, p->neigh->iface->addrs) - if (a->scope == SCOPE_LINK) - { - p->link_addr = a->ip; - break; - } - - DBG("%s: Selected link-local address %I\n", p->p.name, p->link_addr); - } + else if (p->neigh->iface->llv6) + p->link_addr = p->neigh->iface->llv6->ip; bgp_initiate(p); } |