mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Route destination field merged with nexthop attribute; splitting flowspec validation result out.
As there is either a nexthop or another destination specification (or othing in case of ROAs and Flowspec), it may be merged together. This code is somehow quirky and should be replaced in future by better implementation of nexthop. Also flowspec validation result has its own attribute now as it doesn't have anything to do with route nexthop.
This commit is contained in:
@@ -1366,16 +1366,9 @@ ospf_rt_notify(struct proto *P, struct channel *ch UNUSED, net *n, rte *new, rte
|
||||
uint tag = ea_get_int(a->eattrs, &ea_ospf_tag, 0);
|
||||
|
||||
ip_addr fwd = IPA_NONE;
|
||||
if (a->dest == RTD_UNICAST)
|
||||
eattr *nhea = ea_find(a->eattrs, &ea_gen_nexthop);
|
||||
if (nhea)
|
||||
{
|
||||
eattr *nhea = ea_find(a->eattrs, &ea_gen_nexthop);
|
||||
if (!nhea)
|
||||
{
|
||||
log(L_ERR "%s: Unicast route without nexthop for %N",
|
||||
p->p.name, n->n.addr);
|
||||
return;
|
||||
}
|
||||
|
||||
struct nexthop_adata *nhad = (struct nexthop_adata *) nhea->u.ptr;
|
||||
if (use_gw_for_fwaddr(p, nhad->nh.gw, nhad->nh.iface))
|
||||
fwd = nhad->nh.gw;
|
||||
|
Reference in New Issue
Block a user