Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109467682
D41882.id127445.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
924 B
Referenced Files
None
Subscribers
None
D41882.id127445.diff
View Options
Index: sbin/route/route_netlink.c
===================================================================
--- sbin/route/route_netlink.c
+++ sbin/route/route_netlink.c
@@ -271,22 +271,26 @@
hdr = snl_read_reply(ss, hdr->nlmsg_seq);
if (nl_type == NL_RTM_GETROUTE) {
- if (hdr->nlmsg_type == NL_RTM_NEWROUTE)
+ if (hdr->nlmsg_type == NL_RTM_NEWROUTE) {
print_getmsg(h, hdr, dst);
- else {
- snl_parse_errmsg(ss, hdr, &e);
- if (e.error == ESRCH)
- warn("route has not been found");
- else
- warn("message indicates error %d", e.error);
+ return (0);
}
-
- return (0);
}
- if (snl_parse_errmsg(ss, hdr, &e))
+ if (snl_parse_errmsg(ss, hdr, &e)) {
+ switch (e.error) {
+ case (ESRCH):
+ warnx("route has not been found");
+ break;
+ default:
+ warnc(e.error, "message indicates error");
+ break;
+ }
+
return (e.error);
+ }
}
+
return (EINVAL);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 11:14 AM (12 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16492592
Default Alt Text
D41882.id127445.diff (924 B)
Attached To
Mode
D41882: route(8): fix `route not found` exit code and warn with netlink
Attached
Detach File
Event Timeline
Log In to Comment