Revision 153f02da proto/bgp/bgp.c

View differences:

proto/bgp/bgp.c
1094 1094

  
1095 1095
  if (ipa_is_link_local(p->source_addr))
1096 1096
    p->link_addr = p->source_addr;
1097
  else
1098
  {
1099
    /* Find some link-local address for given iface */
1100
    struct ifa *a;
1101
    WALK_LIST(a, p->neigh->iface->addrs)
1102
      if (a->scope == SCOPE_LINK)
1103
      {
1104
	p->link_addr = a->ip;
1105
	break;
1106
      }
1107

  
1108
    DBG("%s: Selected link-local address %I\n", p->p.name, p->link_addr);
1109
  }
1097
  else if (p->neigh->iface->llv6)
1098
    p->link_addr = p->neigh->iface->llv6->ip;
1110 1099

  
1111 1100
  bgp_initiate(p);
1112 1101
}

Also available in: Unified diff