Could not identify WSL2 Network Interface

Sysprogs forums Forums VisualGDB Could not identify WSL2 Network Interface

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  support 1 week, 5 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34988

    codefrog
    Participant

    VisualGDB stopped working last night, literally overnight.

    Attempting to build an existing project, or create a new project, I get an error box “Could not identify the WSL2 network interface. No network interfaces with the (WSL) tag found.”

    ifconfig reports this as one of the adapters

    Ethernet adapter vEthernet (WSL (Hyper-V firewall)):

    Connection-specific DNS Suffix . :
    Link-local IPv6 Address . . . . . : fe80::7cf3:1b6:5265:a75b%23
    IPv4 Address. . . . . . . . . . . : 172.17.240.1
    Subnet Mask . . . . . . . . . . . : 255.255.240.0
    Default Gateway . . . . . . . . . :

    I suspect that last night a Windows Update changed the default tag of the WSL vEthernet Adapter from “(WSL)” to “(WSL (Hyper-V firewall))” and that VisualGDB 5.9 / 6.0b3 is not able to cope with that.

    * Is there an immediate fix for VisualGDB?
    * Is there a workaround to change Windows’ name of the adapter?
    * Should I be looking at rolling back the windows update?

    thanks

    #34989

    codefrog
    Participant

    Suuuuuper hacky workaround:

    C:\Program Files (x86)\Sysprogs\VisualGDB\VisualGDBCore.dll  contains the wide-string which is used to match the vEthernet adapter tag : "(WSL)"

    in wide character format at  hex address 0xA388DA

    00A388D0 00 31 00 36 00 7D 00 00 0D 20 00 28 00 57 00 53 .1.6.}... .(.W.S
    00A388E0 00 4C 00 29 00 00 13 45 00 6D 00 70 00 74 00 79 .L.)...E.m.p.t.y

    I changed the trailing ( to a space : “(WSL)” -> “(WSL ”

    00A388D0 00 31 00 36 00 7D 00 00 0D 20 00 28 00 57 00 53 .1.6.}... .(.W.S
    00A388E0 00 4C 00 20 00 00 13 45 00 6D 00 70 00 74 00 79 .L. ...E.m.p.t.y

    …and now it works.

    I assume that the code is searching a list of adapters for one whose name starts with (WSL)

    But Microsoft helpfully renamed from “(WSL)” to “(WSL (Hyper-V firewall))” and the “(WSL)” string search fails.

     

     

     

     

     

     

    #34990

    codefrog
    Participant

    And actually changing it from “(WSL)” to “(WSL”  – truncating it to 4 characters – would have been even better (maybe?) so it would match either old or new  format.

     

    #34994

    support
    Keymaster

    Hi,

    Thanks very much for pointing it out. We usually try to keep regular expressions and search strings in a separate file (%VISUALGDB_DIR%\Rules\RegularExpressions.xml) to facilitate exactly this kind of hotpatching, but the “(WSL)” rule wasn’t stored there yet.

    Feel free to try this build: VisualGDB-6.0.4.5016.msi. We have updated the rule to match both new and old name, moved it to RegularExpression.xml (RegularExpressionCollection/Other/WSLInterfaceName), so it can be easily edited in case it changes again.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.