RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

2.0 and vista

noobie

Wanderer
you cannot convert IPv6 to IPv4.

I dont have runuo codes right now, so I cannot check the issue you are talking about.
but why server is sending its own ip to the client? the client is already well aware of that ip therefore it is connected to the server. are you sure about this?

anyway, since it is on the server side, it could be handled.


if you could paste the code you are talking about, I might help..
 

mordero

Knight
OK the solution!!!!!!!! (Part 1)
After much work, and much help from Zippy, Jeff, and Malaperth, we have come up with a solution!

***Removed unneeded mod**

You need a custom ServerList.cs in the distro scripts. You need to specify an IP address manually.
For me, it was:
Code:
[COLOR=black][SIZE=2]public [/SIZE][SIZE=2]static [/SIZE][SIZE=2]readonly [/SIZE][SIZE=2]string[/SIZE][SIZE=2] Address = [/SIZE][SIZE=2]"192.168.1.65"[/SIZE][SIZE=2];[/SIZE][/COLOR]

However, I am only accessing this server from within my router, so youll need to do whatever it is to make it accessable from outside and in.

See Part 2 for the rest of the solution (as only doing this step would allow connections from XP but not vista, i believe)
 

mordero

Knight
noobie;653691 said:
you cannot convert IPv6 to IPv4.

I dont have runuo codes right now, so I cannot check the issue you are talking about.
but why server is sending its own ip to the client? the client is already well aware of that ip therefore it is connected to the server. are you sure about this?

anyway, since it is on the server side, it could be handled.


if you could paste the code you are talking about, I might help..
Currently the client does not support IPv6, but my previous solution will get rid of the need for now. The sever was sending its own IP first of all for encryption, which doesnt matter but the second time was because the login servers for OSI are different from the playable servers, so it must send the actual game server IP to the client.**

**Thanks Zippy
 

mordero

Knight
Solution Part 2!
I forgot to apply the changes that noobie pointed out when testing part 1 of the solution. So, look at the solution and then do this:

In Listen.cs in the core

Look for the Listener method and change the corresponding line to look like this
Code:
[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]

then in the Bind method, change the Socket s line to this
Code:
[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE]
[SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]


That SHOULD make it work for you on vista (I have Vista Ultimate, so test it out on others too please). However, this does not check to make sure you have IPv6 enabled or anything, so dont try running this in Windows XP cause i dont know what it would do.
 

Erica

Knight
mordero;653712 said:
Solution Part 2!
I forgot to apply the changes that noobie pointed out when testing part 1 of the solution. So, look at the solution and then do this:

In Listen.cs in the core

Look for the Listener method and change the corresponding line to look like this
Code:
[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]

then in the Bind method, change the Socket s line to this
Code:
[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE]
[SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]


That SHOULD make it work for you on vista (I have Vista Ultimate, so test it out on others too please). However, this does not check to make sure you have IPv6 enabled or anything, so dont try running this in Windows XP cause i dont know what it would do.

Ok hehe then make a RunUO exe for vista and we will try it out svn 159 lol. just joking but would be an idea lol tho.
 

Erica

Knight
Just so you know Windows xp wont be sold no more Windows Vista will be the ones in stores so if you got a old computer with xp ,95, 98 you will only be able to upgrade them with windows vista meaning i am sure that the RunUO Team will come with a solution for the Windows Vista . GoodBye XP was fun.
 

mordero

Knight
Well, Ive modded the core to support both XP and Vista now, so there would be no need to change anything and recompile, but the real problem is IPv6 which the client doesnt support yet. Once it does support it, it will be a lot easier to fix the whole problem, I think. But youll still be able to find XP in certain places, Im sure. Anywho, once Vista becomes more wide spread, Im sure the RunUO devs will fix it, its in the bug tracker and Zippy knows about whats going on with it.
 

big_cat

Wanderer
Well so how did u fix it? I have no probs editing core, but not quite sure what to edit, so any Ideas would be greatly appreciated
 

Erica

Knight
Does your console show this with what you provided on top for fix like this
Code:
World: Loading...done (80679 items, 79 mobiles) (2.76 seconds)
Reports: Stats: Loading...done
Reports: Staff: Loading...done
Address: 127.0.0.1:2595
Address: fe80::1c5e:abf5:7159:4c3d%7:2595
Address: fe80::200:5efe:69.14x.xx.xxx%10:2595
Address: 2002:4592:257e::4592:257e:2595
Address: 69.14x.xx.xxx:2595
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Invalid password for 'test'
Client: ::ffff:127.0.0.1: Disconnected. [0 Online]
Client: ::ffff:127.0.0.1: Connected. [1 Online]
Login: ::ffff:127.0.0.1: Valid credentials for 'test'
Login: ::ffff:127.0.0.1: Account 'test' at character list
 

Erica

Knight
and did i put this code right
Code:
public Listener( int port )
		{
			m_ThisPort = port;
			m_Disposed = false;
			m_Accepted = new Queue<Socket>();
			m_AcceptedSyncRoot = ((ICollection)m_Accepted).SyncRoot;
			m_OnAccept = new AsyncCallback( OnAccept );

			m_Listener = Bind( IPAddress.IPv6Any, port );
and heres the other part
Code:
private Socket Bind( IPAddress ip, int port )
		{
			IPEndPoint ipep = new IPEndPoint( ip, port );

			Socket s = new Socket( AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp );
                  s.SetSocketOption(SocketOptionLevel.IPv6, (SocketOptionName)27, 0);
is this right cause i logged on Windows Vista and the top is what you see on console when im in game logged .
 

mordero

Knight
other than the invalid passwords, that looks like mine.

And you need to make sure you have an IP specified in you ServerList.cs in the distro scripts.
 

Darrell

Wanderer
mordero;653712 said:
Solution Part 2!
I forgot to apply the changes that noobie pointed out when testing part 1 of the solution. So, look at the solution and then do this:

In Listen.cs in the core

Look for the Listener method and change the corresponding line to look like this
Code:
[SIZE=2]m_Listener = Bind([/SIZE][SIZE=2][COLOR=#2b91af]IPAddress[/COLOR][/SIZE][SIZE=2].IPv6Any, port);[/SIZE]

then in the Bind method, change the Socket s line to this
Code:
[SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2] s = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]Socket[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2b91af]AddressFamily[/COLOR][/SIZE][SIZE=2].InterNetworkV6, [/SIZE][SIZE=2][COLOR=#2b91af]SocketType[/COLOR][/SIZE][SIZE=2].Stream, [/SIZE][SIZE=2][COLOR=#2b91af]ProtocolType[/COLOR][/SIZE][SIZE=2].Tcp);[/SIZE]
[SIZE=2]s.SetSocketOption([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionLevel[/COLOR][/SIZE][SIZE=2].IPv6, ([/SIZE][SIZE=2][COLOR=#2b91af]SocketOptionName[/COLOR][/SIZE][SIZE=2])27, 0);[/SIZE]


That SHOULD make it work for you on vista (I have Vista Ultimate, so test it out on others too please). However, this does not check to make sure you have IPv6 enabled or anything, so dont try running this in Windows XP cause i dont know what it would do.




what is the name of this file i cannot find it anywhere ? :(
 

DragonBoy

Wanderer
Darrell;653843 said:
what is the name of this file i cannot find it anywhere ? :(

Its in the Core

Anyone who still has the issue after applying the fix, like myself, might want to modify Serverlist.cs so it uses the IPv4 localhost instead of the IPv6 localhost which seems to be used by default. Which makes it sound like at least on Vista your localhost is the ipv6 not the IPv4 by default.

I found this out by debugging the core, and I noticed while looking at the Address that was being used within various methods, that it was an ipv6 AddressFamily. Infact I question if the fix is even required, and will be doing some research into this fact later tonight. Again if you have an unmodified Serverlist, and you experience this crash, modify it so it "must" use an IPv4 and it should solve your problems.

Infact I believe in the other thread and this thread, where anybody said it was working without any problems on Vista, this was exactly the case. By default it has never been required to do this because the only possible choices to bind to, where infact IPv4 addresses. One real possible solution is to create an collection of Addresses and remove each Address that AddressFamily is an IPv6 family.

After I posted this, I decided to go to the first page, and I noticed this was the first part of the solution. The solution that appears to effect people on Vista are people trying to connect to themselfs on the same computer, although I can only speak for myself, thus my statement why I question if doing a modification to the Socket is even required.

I decided to leave my original response, since it does explain what I believe the correct behavior is, and perhaps a solution to future people having the problem by using a Collection of Addresses and not adding IPv6 Addresses.
 

Erica

Knight
Oh almost forgot to tell you Thanks for the fix for Windows Vista that code works great i havent had np at all. I'm sure the RunUO Team is going to have a fix for those crashes for Windows Vista . Thank You Again mordero
 
Top