Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Match localnetwork is not supported on Windows (no getifaddrs in win32compat)

Open
#2,440 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c

Research direction

Review check_match_ifaddrs() in readconf.c and the BindInterface path in sshconnect.c, then inspect contrib/win32/openssh/config.h.vs and contrib/win32/win32compat/. Run the Windows unit test mentioned in the issue; done means localnetwork matching and BindInterface work on Windows, with the build verified for x64 and ARM64.

Written by the indexing model from the issue text.

Description

Area-ssh Issue-Upstream Parity
Summary

The ssh_config Match 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).

Dominant language
No language data
Stars
8.3k
Forks
820
Avg merge
12m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/Win32-OpenSSH

All issues in PowerShell/Win32-OpenSSH

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.