HomeFreeBSD

route: fix `route -n monitor` when its output is redirected

Description

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 [...]")
MFC after: 3 days

Details

Provenance
Oleg Streejak <oleg@pcbtech.ru>Authored on Jul 17 2025, 5:06 PM
kevansCommitted on Jul 17 2025, 5:17 PM
Parents
rG8768b60de16a: lib: Fix calls that naively set F_SETFD.
Branches
Unknown
Tags
Unknown