diff options
| author | 2026-05-06 23:21:24 +0200 | |
|---|---|---|
| committer | 2026-05-06 23:21:24 +0200 | |
| commit | a998407747005ea7e4e0258d96f105c97241e1d3 (patch) | |
| tree | f97e732ce1a3a1750aac0bc332e85599e6a23cbd /contrib/external-tests/rust | |
| parent | ipc: freebsd: add allowed-ip flags support for FreeBSD (diff) | |
| download | wireguard-tools-master.tar.xz wireguard-tools-master.zip | |
Looking at the source [1], it appears that the interface is always the
4th argument, regardless of the family:
C1. if (fam != old_fam) // FALSE
P1. p_sockaddr(params, &addr.u_sa, &mask.u_sa, rtm->rtm_flags,
WID_DST(addr.u_sa.sa_family));
P2. p_sockaddr(params, rti_info[RTAX_GATEWAY], NULL, RTF_HOST,
WID_GW(addr.u_sa.sa_family));
C2. if (params->lflag && (rtm->rtm_addrs & RTA_IFA)) // FALSE
P3. p_flags(rtm->rtm_flags, "%-10.10s ");
C3. if (params->lflag) // FALSE
P4. printf("%*.*s", WID_IF(addr.u_sa.sa_family),
WID_IF(addr.u_sa.sa_family), ifname);
Because C1, C2, and C3 evaluate to false, interface is always in the 4th
argument.
[1] https://github.com/apple-oss-distributions/network_cmds/blob/97e27e6244c16d399bfeb254315ddc5828711c56/netstat.tproj/route.c#L328
Reported-by: Florian Uekermann <florian@uekermann.me>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'contrib/external-tests/rust')
0 files changed, 0 insertions, 0 deletions
