Skip to content

JDK v21 on Windows: network interface binding names are different, could do with a warning at least #381

Description

@justparking

For example, using -? with JDK 8 on Windows:

// Available network interfaces:
// (use --interface ... [--interface ...] to enable opt-in interface binding)
"networkInterfaces": [
    "lo",  // Software Loopback Interface 1
    "wlan0",  // Intel(R) Wireless-AC 9560 160MHz
    "eth5",  // Realtek USB GbE Family Controller #5
    "eth9"  // Realtek USB GbE Family Controller
]

With JDK 21:

// Available network interfaces:
// (use --interface ... [--interface ...] to enable opt-in interface binding)
"networkInterfaces": [
    "loopback_0",  // Software Loopback Interface 1
    "wireless_32768"  // Intel(R) Wireless-AC 9560 160MHz
    "ethernet_32775",  // Realtek USB GbE Family Controller
    "ethernet_32780",  // Realtek USB GbE Family Controller #5
]

This is only a concern on Windows-based multihomed hosts where selective interface binding is done.

AI informs me that since JDK21, a different Windows API is used which gives more stable names compared to the synthesized named that were used prior.

I'm not sure if there are any workarounds that could smooth or automate safe upgrades to the use of JDK21 and later but at the very least, a warning should be logged to the global logging window when an interface name is not matched otherwise the nodel instance will be left not advertising any nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    changeA modification to existing behaviourconcernSomething that may need attention but isn't urgentinconvenienceA minor inconvenience, not blockingminorLow priority or minimal impact

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions