mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:30:30 +00:00
Merge pull request #3698 from donaldsharp/netlink_is_serious_business
Netlink is serious business
This commit is contained in:
commit
3524352154
@ -121,7 +121,7 @@ sub codelist {
|
||||
}
|
||||
$str =~ s/ $//;
|
||||
push @lines, $str . "\\n\" \\\n";
|
||||
push @lines, " \" > - selected route, * - FIB route, q - queued route, f - failed route\\n\\n\"";
|
||||
push @lines, " \" > - selected route, * - FIB route, q - queued route, r - rejected route\\n\\n\"";
|
||||
return join("", @lines);
|
||||
}
|
||||
|
||||
|
@ -1140,8 +1140,7 @@ static void _netlink_route_build_singlepath(const char *routedesc, int bytelen,
|
||||
if (nexthop->type != NEXTHOP_TYPE_BLACKHOLE)
|
||||
addattr32(nlmsg, req_size, RTA_OIF, nexthop->ifindex);
|
||||
|
||||
if (nexthop->type == NEXTHOP_TYPE_IFINDEX
|
||||
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) {
|
||||
if (nexthop->type == NEXTHOP_TYPE_IFINDEX) {
|
||||
if (cmd == RTM_NEWROUTE) {
|
||||
if (nexthop->rmap_src.ipv4.s_addr)
|
||||
addattr_l(nlmsg, req_size, RTA_PREFSRC,
|
||||
@ -1157,23 +1156,6 @@ static void _netlink_route_build_singlepath(const char *routedesc, int bytelen,
|
||||
"nexthop via if %u(%u)",
|
||||
routedesc, nexthop->ifindex, nexthop->vrf_id);
|
||||
}
|
||||
|
||||
if (nexthop->type == NEXTHOP_TYPE_IPV6_IFINDEX) {
|
||||
if (cmd == RTM_NEWROUTE) {
|
||||
if (!IN6_IS_ADDR_UNSPECIFIED(&nexthop->rmap_src.ipv6))
|
||||
addattr_l(nlmsg, req_size, RTA_PREFSRC,
|
||||
&nexthop->rmap_src.ipv6, bytelen);
|
||||
else if (!IN6_IS_ADDR_UNSPECIFIED(&nexthop->src.ipv6))
|
||||
addattr_l(nlmsg, req_size, RTA_PREFSRC,
|
||||
&nexthop->src.ipv6, bytelen);
|
||||
}
|
||||
|
||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||
zlog_debug(
|
||||
"netlink_route_multipath() (%s): "
|
||||
"nexthop via if %u(%u)",
|
||||
routedesc, nexthop->ifindex, nexthop->vrf_id);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function takes a nexthop as argument and
|
||||
@ -1345,8 +1327,7 @@ static void _netlink_route_build_multipath(const char *routedesc, int bytelen,
|
||||
rtnh->rtnh_ifindex = nexthop->ifindex;
|
||||
|
||||
/* ifindex */
|
||||
if (nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX
|
||||
|| nexthop->type == NEXTHOP_TYPE_IFINDEX) {
|
||||
if (nexthop->type == NEXTHOP_TYPE_IFINDEX) {
|
||||
if (nexthop->rmap_src.ipv4.s_addr)
|
||||
*src = &nexthop->rmap_src;
|
||||
else if (nexthop->src.ipv4.s_addr)
|
||||
|
@ -174,7 +174,7 @@ static char re_status_output_char(struct route_entry *re, struct nexthop *nhop)
|
||||
if (CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED))
|
||||
return 'q';
|
||||
|
||||
return 'f';
|
||||
return 'r';
|
||||
}
|
||||
|
||||
if (CHECK_FLAG(re->status, ROUTE_ENTRY_QUEUED))
|
||||
|
Loading…
Reference in New Issue
Block a user