From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Florian Uekermann <florian@uekermann.me>
Cc: wireguard@lists.zx2c4.com, A Jonas <jonas@chaincode.com>,
Carl Dong <carl@obscura.net>
Subject: Re: [PATCH] wg-quick: fix darwin MTU detection
Date: Mon, 4 May 2026 13:55:03 +0200 [thread overview]
Message-ID: <afiJFxeMxJw-n9-G@zx2c4.com> (raw)
In-Reply-To: <20251020142254.16546-2-florian@uekermann.me>
Hi Florian,
Sorry I didn't see this. I filtered this out because it wasn't formatted
correctly (explanation below the break, commit subject not matching
other wg-quick commits). Some notes:
On Mon, Oct 20, 2025 at 04:22:55PM +0200, Florian Uekermann wrote:
> I used macOS 15.4 for testing, but I am not particularly familiar with
> the Apple ecosystem. I'm not sure if this never worked, the netstat
> shipped by Apple changed at some point and how/which other platforms
> (iOS?) may be affected. So please keep that in mind before merging.
If you're submitting a patch with your name on it, please do the
research to make sure it's correct! Otherwise, what you're submitting is
more of a bug report than a patch.
> src/wg-quick/darwin.bash | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/wg-quick/darwin.bash b/src/wg-quick/darwin.bash
> index 1b7fe5e..0467f0e 100755
> --- a/src/wg-quick/darwin.bash
> +++ b/src/wg-quick/darwin.bash
> @@ -177,7 +177,7 @@ set_mtu() {
> cmd ifconfig "$REAL_INTERFACE" mtu "$MTU"
> return
> fi
> - while read -r destination _ _ _ _ netif _; do
> + while read -r destination _ _ netif _; do
Should this be changed for the other invocations of `netstat -nr -f ...`
in the code? It's a bit confusing because in del_route(), it looks like
the first invocation (for inet) is aware that it's the 6th parameter,
while the second invocation (for inet6) seems to stick with this
presumption that it's the 4th. So what's going on here?
Consulting the source from Apple, it looks like the 4th param is indeed
the right one?
https://github.com/apple-oss-distributions/network_cmds/blob/97e27e6244c16d399bfeb254315ddc5828711c56/netstat.tproj/route.c#L328
What circumstances cause this to change? v4 vs v6? Something else?
I'd like to get to the bottom of this before applying this patch. When
you submit a v2, please include your explanation as part of the commit
message.
Thanks,
Jason
next prev parent reply other threads:[~2026-05-04 11:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 14:22 [PATCH] wg-quick: fix darwin MTU detection Florian Uekermann
2026-05-04 11:55 ` Jason A. Donenfeld [this message]
2026-05-05 16:47 ` Florian Uekermann
2026-05-06 21:28 ` Jason A. Donenfeld
2026-05-08 13:42 ` Florian Uekermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afiJFxeMxJw-n9-G@zx2c4.com \
--to=jason@zx2c4.com \
--cc=carl@obscura.net \
--cc=florian@uekermann.me \
--cc=jonas@chaincode.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox