Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146631818
D55444.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1020 B
Referenced Files
None
Subscribers
None
D55444.id.diff
View Options
diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c
--- a/sbin/route/route_netlink.c
+++ b/sbin/route/route_netlink.c
@@ -263,6 +263,9 @@
snl_end_attr_nested(&nw, off);
}
+ if (rt_metrics->rmx_expire > 0)
+ snl_add_msg_attr_u32(&nw, NL_RTA_EXPIRES, rt_metrics->rmx_expire);
+
if (rt_metrics->rmx_weight > 0)
snl_add_msg_attr_u32(&nw, NL_RTA_WEIGHT, rt_metrics->rmx_weight);
@@ -343,7 +346,6 @@
print_getmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct sockaddr *dst)
{
struct snl_state *ss = &h->ss_cmd;
- struct timespec ts;
struct snl_parsed_route r = { .rtax_weight = RT_DEFAULT_WEIGHT };
if (!snl_parse_nlmsg(ss, hdr, &snl_rtm_route_parser, &r))
@@ -385,11 +387,7 @@
printf("%8lu ", 0UL);
printf("%8lu ", rmx.rmx_mtu);
printf("%8lu ", rmx.rmx_weight);
- if (rmx.rmx_expire > 0)
- clock_gettime(CLOCK_REALTIME_FAST, &ts);
- else
- ts.tv_sec = 0;
- printf("%8ld \n", (long)(rmx.rmx_expire - ts.tv_sec));
+ printf("%8ld \n", rmx.rmx_expire);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 6:45 AM (17 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28961982
Default Alt Text
D55444.id.diff (1020 B)
Attached To
Mode
D55444: route: Fix -expire argument when using netlink
Attached
Detach File
Event Timeline
Log In to Comment