mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 13:41:46 +00:00
Merge pull request #1083 from donaldsharp/unreachable
zebra: Allow bh_type to override nexthop selection
This commit is contained in:
commit
99df910d50
@ -384,16 +384,23 @@ static int netlink_route_change_read_unicast(struct sockaddr_nl *snl,
|
|||||||
size_t sz = (afi == AFI_IP) ? 4 : 16;
|
size_t sz = (afi == AFI_IP) ? 4 : 16;
|
||||||
|
|
||||||
memset(&nh, 0, sizeof(nh));
|
memset(&nh, 0, sizeof(nh));
|
||||||
if (index && !gate)
|
|
||||||
nh.type = NEXTHOP_TYPE_IFINDEX;
|
if (bh_type == BLACKHOLE_UNSPEC) {
|
||||||
else if (index && gate)
|
if (index && !gate)
|
||||||
nh.type = (afi == AFI_IP)
|
nh.type = NEXTHOP_TYPE_IFINDEX;
|
||||||
? NEXTHOP_TYPE_IPV4_IFINDEX
|
else if (index && gate)
|
||||||
: NEXTHOP_TYPE_IPV6_IFINDEX;
|
nh.type = (afi == AFI_IP) ?
|
||||||
else if (!index && gate)
|
? NEXTHOP_TYPE_IPV4_IFINDEX
|
||||||
nh.type = (afi == AFI_IP) ? NEXTHOP_TYPE_IPV4
|
: NEXTHOP_TYPE_IPV6_IFINDEX;
|
||||||
: NEXTHOP_TYPE_IPV6;
|
else if (!index && gate)
|
||||||
else {
|
nh.type = (afi == AFI_IP) ?
|
||||||
|
? NEXTHOP_TYPE_IPV4
|
||||||
|
: NEXTHOP_TYPE_IPV6;
|
||||||
|
else {
|
||||||
|
nh.type = NEXTHOP_TYPE_BLACKHOLE;
|
||||||
|
nh.bh_type = bh_type;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
nh.type = NEXTHOP_TYPE_BLACKHOLE;
|
nh.type = NEXTHOP_TYPE_BLACKHOLE;
|
||||||
nh.bh_type = bh_type;
|
nh.bh_type = bh_type;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user