Page MenuHomeFreeBSD

D57266.diff
No OneTemporary

D57266.diff

diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -217,7 +217,7 @@
return;
rtnh->rtnh_flags = 0;
rtnh->rtnh_ifindex = if_getindex(wn[i].nh->nh_ifp);
- rtnh->rtnh_hops = wn[i].weight;
+ rtnh->rtnh_hops = MIN(wn[i].weight, UINT8_MAX);
dump_rc_nhop_gw(nw, wn[i].nh);
uint32_t rtflags = nhop_get_rtflags(wn[i].nh);
if (rtflags != base_rtflags)
@@ -242,7 +242,8 @@
}
nlattr_set_len(nw, off);
nlattr_add_u32(nw, NL_RTA_PRIORITY, nhop_metric);
- nlattr_add_u32(nw, NL_RTA_WEIGHT, nhop_weight);
+ if (nhop_weight != RT_DEFAULT_WEIGHT)
+ nlattr_add_u32(nw, NL_RTA_WEIGHT, nhop_weight);
}
static void

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 16, 7:24 AM (18 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33587721
Default Alt Text
D57266.diff (696 B)

Event Timeline