mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Merge branch 'dev' into ospf3
This commit is contained in:
@@ -18,13 +18,8 @@ CF_ADDTO(kern_proto, kern_proto nl_item ';')
|
||||
|
||||
nl_item:
|
||||
KERNEL TABLE expr {
|
||||
#ifndef IPV6
|
||||
if ($3 <= 0 || $3 >= NL_NUM_TABLES)
|
||||
cf_error("Kernel routing table number out of range");
|
||||
#else
|
||||
if ($3 != 254)
|
||||
cf_error("Linux implementation of IPv6 doesn't support multiple routing tables");
|
||||
#endif
|
||||
THIS_KRT->scan.table_id = $3;
|
||||
}
|
||||
;
|
||||
|
@@ -691,18 +691,34 @@ nl_parse_route(struct nlmsghdr *h, int scan)
|
||||
ra.dest = RTD_ROUTER;
|
||||
memcpy(&ra.gw, RTA_DATA(a[RTA_GATEWAY]), sizeof(ra.gw));
|
||||
ipa_ntoh(ra.gw);
|
||||
ng = neigh_find2(&p->p, &ra.gw, ifa, 0);
|
||||
if (ng && ng->scope)
|
||||
{
|
||||
if (ng->iface != ifa)
|
||||
log(L_WARN "KRT: Route with unexpected iface for %I/%d", net->n.prefix, net->n.pxlen);
|
||||
ra.iface = ng->iface;
|
||||
}
|
||||
|
||||
if (i->rtm_flags & RTNH_F_ONLINK)
|
||||
{
|
||||
/* route with 'onlink' attribute */
|
||||
ra.iface = if_find_by_index(oif);
|
||||
if (ra.iface == NULL)
|
||||
{
|
||||
log(L_WARN "Kernel told us to use unknown interface %u for %I/%d",
|
||||
oif, net->n.prefix, net->n.pxlen);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
|
||||
return;
|
||||
}
|
||||
{
|
||||
ng = neigh_find2(&p->p, &ra.gw, ifa, 0);
|
||||
if (ng && ng->scope)
|
||||
{
|
||||
if (ng->iface != ifa)
|
||||
log(L_WARN "KRT: Route with unexpected iface for %I/%d", net->n.prefix, net->n.pxlen);
|
||||
ra.iface = ng->iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
log(L_WARN "Kernel told us to use non-neighbor %I for %I/%d", ra.gw, net->n.prefix, net->n.pxlen);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user