View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0005300 | AI War 1 / Classic | Bug - Other | Dec 10, 2011 1:32 am | Dec 10, 2011 8:05 pm | |
Reporter | Deozaan | Assigned To | Chris_McElligottPark | ||
Status | acknowledged | Resolution | open | ||
Product Version | 5.020 | ||||
Summary | 0005300: Game uses wrong network adapter when hosting. | ||||
Description | My PC has multiple network adapters including a VPN (Hamachi) and a virtual network adapter that VirtualBox uses. For some reason AI War decides to use the virtual network adapter's IP address as the default adapter to host multiplayer games on instead of my LAN adapter that is actually connected to the internet. Windows 7 has options to select the default order in which network adapters should be used, but for some reason AI War ignores this and I have to manually disable the virtual network adapter in order to get AI War to use my actual physical network adapter when hosting. This all would have been a lot easier to diagnose in the first place if AI War would at least tell me the Local IP address the game is being hosted under. And by that I mean the LAN IP (typically 192.168.x.xxx). I only found out by starting another copy of AI War on the same computer and trying to join my own game. The auto LAN search displayed the IP address of my virtual adapter. If I had tried to connect from any other computer but this one, none would have been able to find the game on the LAN since it was using the virtual adapter. | ||||
Tags | No tags attached. | ||||
Internal Weight | |||||
|
Thanks for the details. I don't know that this is something that we can fix, though, as selecting a network adapter is not something our code does -- we pass that off to the lidgrin network library, which then makes calls into mono, which then makes calls into the windows stack. The lidgrin library is open source and I've been through it quite a bit without running into this. I, too, have multiple network drivers. In my case I have four virtuals (though none are virtualbox) and three physical including a sometimes-tethered phone. My experience has been that the "local ip" as advertised in the find LAN games thread is often wrong when there are tons of adapters, but that if I type in the ip directly it connects just fine. Did you try doing the direct ip connect from another computer with the virtualbox adapter online? There's a good chance that might work. My other suggestion was to be to change your adapter order in windows, but you've already done that. Beyond the above, disabling the virtualbox adapter would be the only other thing that I can think of, since I believe the selection of the adapter is going on in mono or windows. Or more accurately, when hosting a server on a port I think that is global for all adapters,which is why a direct ip connection usually works in a case like this. Hope that helps! |
|
My friend did try direct IP connect. He tried my Hamachi IP, he tried my actual IP, and he tried a domain name that resolves to my IP via DynDNS. None of them worked. I also noticed that when the game was using my virtual adapter, canyouseeme.org was saying that the port was not open--or rather, that nothing was listening on that port. Also, it wasn't until my virtual adapter was disabled that I even got the prompt from Windows Firewall to allow AI War connections through. |
|
Yikes, that definitely stinks. I just took a pass through the networking code since I'm actually sitting at my desk now, though, and there's definitely nothing exposed from the lidgren library to our code about which adapter is even being used. All we specify is the ports, etc, and it does the rest in a rather black-box fashion. The lidgren library is open source, though, so I cracked that open to see what it's doing. Looks like it gets the list from windows internally, and then just chooses the first one that windows returns that is operation, that isn't loopback or unknown interface type, and which supports IPv4. Presumably that would wind up being the same order that windows actually is running them in, but I guess not in your case for whatever reason. This is all buried pretty deep in someone else's library, though, so I'm hesitant to try to bring that up to the level of the UI or its likely to introduce a lot of new problems. For now I'd suggest the workaround you already found of disabling the virtualbox adapter when playing; I know that's ideal, but in the short term I think that's the best I can do. |
|
my 2 cents im betting that the virtualbox actually overrides windows settings. and is configurable to prevent this issue but you need to find where. a lot of those programs assume they are being used for specific purposes ususally to reroute internet actions and so jump the windows defaults. so try poking thru the virtualbox settings for priority settings. |
Date Modified | Username | Field | Change |
---|---|---|---|
Dec 10, 2011 1:32 am | Deozaan | New Issue | |
Dec 10, 2011 1:32 am | Deozaan | File Added: Network Adapters.png | |
Dec 10, 2011 8:42 am | Chris_McElligottPark | Note Added: 0017767 | |
Dec 10, 2011 4:17 pm | Deozaan | Note Added: 0017769 | |
Dec 10, 2011 4:26 pm | Chris_McElligottPark | Note Added: 0017770 | |
Dec 10, 2011 4:26 pm | Chris_McElligottPark | Assigned To | => Chris_McElligottPark |
Dec 10, 2011 4:26 pm | Chris_McElligottPark | Status | new => acknowledged |
Dec 10, 2011 8:05 pm | motai | Note Added: 0017771 |