1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

wintun: Explain rationale behind case-insensitive interface names

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2019-02-07 19:42:59 +01:00
parent f7276ed522
commit ef48d4fa95

View File

@ -52,7 +52,11 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
return nil, err
}
// TODO: If we're certain we want case-insensitive name comparison, please document the rationale.
// Windows requires each interface to have a different name. When
// enforcing this, Windows treats interface names case-insensitive. If an
// interface "FooBar" exists and this function reports there is no
// interface "foobar", an attempt to create a new interface and name it
// "foobar" would cause conflict with "FooBar".
ifname = strings.ToLower(ifname)
// Iterate.