Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162637944
D57266.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
696 B
Referenced Files
None
Subscribers
None
D57266.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D57266: rtnetlink: Fix weight overflow in RTA_MULTIPATH
Attached
Detach File
Event Timeline
Log In to Comment