mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 20:58:44 +00:00
Fixes export of routes with link-local gw.
This commit is contained in:
parent
13a7395704
commit
f2d7da742b
@ -877,10 +877,12 @@ bgp_create_attrs(struct bgp_proto *p, rte *e, ea_list **attrs, struct linpool *p
|
|||||||
z = bgp_set_attr_wa(ea->attrs+2, pool, BA_NEXT_HOP, NEXT_HOP_LENGTH);
|
z = bgp_set_attr_wa(ea->attrs+2, pool, BA_NEXT_HOP, NEXT_HOP_LENGTH);
|
||||||
if (p->cf->next_hop_self ||
|
if (p->cf->next_hop_self ||
|
||||||
rta->dest != RTD_ROUTER ||
|
rta->dest != RTD_ROUTER ||
|
||||||
(!p->is_internal && (e->attrs->iface != p->neigh->iface)))
|
ipa_equal(e->attrs->gw, IPA_NONE) ||
|
||||||
|
ipa_has_link_scope(rta->gw) ||
|
||||||
|
(!p->is_internal && (rta->iface != p->neigh->iface)))
|
||||||
set_next_hop(z, p->source_addr);
|
set_next_hop(z, p->source_addr);
|
||||||
else
|
else
|
||||||
set_next_hop(z, e->attrs->gw);
|
set_next_hop(z, rta->gw);
|
||||||
|
|
||||||
bgp_set_attr(ea->attrs+3, BA_LOCAL_PREF, 0);
|
bgp_set_attr(ea->attrs+3, BA_LOCAL_PREF, 0);
|
||||||
|
|
||||||
|
@ -899,12 +899,11 @@ originate_ext_lsa_body(net *n, rte *e, u16 *length, struct proto_ospf *po,
|
|||||||
int size = sizeof(struct ospf_lsa_ext);
|
int size = sizeof(struct ospf_lsa_ext);
|
||||||
u32 *buf;
|
u32 *buf;
|
||||||
|
|
||||||
if (!ipa_equal(e->attrs->gw, IPA_NONE))
|
if ((e->attrs->dest == RTD_ROUTER) &&
|
||||||
{
|
!ipa_equal(e->attrs->gw, IPA_NONE) &&
|
||||||
/* FIXME: check for link-local in OSPFv3 ? */
|
!ipa_has_link_scope(e->attrs->gw) &&
|
||||||
if (ospf_iface_find((struct proto_ospf *) p, e->attrs->iface) != NULL)
|
(ospf_iface_find((struct proto_ospf *) p, e->attrs->iface) != NULL))
|
||||||
gw = 1;
|
gw = 1;
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef OSPFv3
|
#ifdef OSPFv3
|
||||||
size += IPV6_PREFIX_SPACE(n->n.pxlen);
|
size += IPV6_PREFIX_SPACE(n->n.pxlen);
|
||||||
|
Loading…
Reference in New Issue
Block a user