Date: Fri, 8 Aug 2025 00:39:17 GMT From: Gordon Tetlow <gordon@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 168703212b61 - releng/14.2 - route: fix `route -n monitor` when its output is redirected Message-ID: <202508080039.5780dH8a073959@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/14.2 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=168703212b618f32b42ed1f9e062a74d7f0cc534 commit 168703212b618f32b42ed1f9e062a74d7f0cc534 Author: Oleg Streejak <oleg@pcbtech.ru> AuthorDate: 2025-07-17 17:06:50 +0000 Commit: Gordon Tetlow <gordon@FreeBSD.org> CommitDate: 2025-08-07 23:23:56 +0000 route: fix `route -n monitor` when its output is redirected This is a small oversight in the transition to netlink; the non-netlink implementation would explicitly flush its stdout as necessary to avoid apparent long stalls in output when we end up fully-buffered. Adjust the netlink implementation to do the same. This was noticed while trying to triage failures in the wg-quick script. Commit message by kevans, patch by author. PR: 278265 Fixes: 091fec1188929 ("route: switch transport protocol [...]") Approved by: so Security: FreeBSD-EN-25:14.route (cherry picked from commit 97b61b22edba74c62adba1d022fb73541aa5ff93) (cherry picked from commit dd695839efd80fe81143cd6c7a552c30df8448f6) --- sbin/route/route_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 28766b062e18..2870d256aadd 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -733,6 +733,7 @@ print_nlmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct snl_msg_info *cinf print_nlmsg_generic(h, hdr, cinfo); } + fflush(stdout); snl_clear_lb(&h->ss_cmd); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202508080039.5780dH8a073959>