Skip to content

if_nametoindex(...) fails on windows #100

@agnat

Description

@agnat

This is a follow-up to #99.

@y-lohse reported:

C:\Users\caldera\Documents\jdf\node_modules\mdns\lib\network_interface.js:36
      index = dns_sd.if_nametoindex(networkInterface);
                     ^
Error: failed to convert interface alias to luid
    at Error (native)
    at Object.interfaceIndex (C:\Users\caldera\Documents\jdf\node_modules\mdns\l
ib\network_interface.js:36:22)
    at new Browser (C:\Users\caldera\Documents\jdf\node_modules\mdns\lib\browser
.js:15:23)
    at Object.create [as createBrowser] (C:\Users\caldera\Documents\jdf\node_mod
ules\mdns\lib\browser.js:104:10)
    at exports.local advertisement invisible on external interfaces (C:\Users\ca
ldera\Documents\jdf\node_modules\mdns\tests\test_functional.js:377:30)

The interface name involved is Connexion au réseau local 3. It could be a unicode (normalization) issue (Note the accent) or a change in node/libuv. I'll try to review the code path involved but I can't do any actual testing, because I don't have the operating system in question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions