You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Match localnetwork is not supported on Windows (no getifaddrs in win32compat) #2440
The ssh_configMatch localnetwork criterion is not supported on Windows. It never matches, and with -v logs:
match localnetwork: not supported on this platform
Version
OpenSSH_for_Windows_10.0p2 (and earlier).
Cause
check_match_ifaddrs() in readconf.c is gated on HAVE_IFADDRS_H, which the Windows build (contrib/win32/openssh/config.h.vs) does not define, and contrib/win32/win32compat/ provides no getifaddrs(). So the #else branch ("not supported on this platform") is compiled in. The same gate disables the getifaddrs() path used by BindInterface in sshconnect.c.
Repro
ssh_config:
Match localnetwork 127.0.0.0/8
Compression yes
ssh -G -F <cfg> somehost -> compression stays no.
Fix
Implemented in PowerShell/openssh-portable#859: a getifaddrs()/freeifaddrs() shim over the Win32 GetAdaptersAddresses() API, HAVE_IFADDRS_H defined, build wiring, and a unit test. Built and verified on Windows x64 (also cross-compiles for ARM64).
Activity