My port of the project many things.

compmike19
Posts: 115
Joined: Wed Jan 23, 2013 11:14 pm

Re: My port of the project many things.

Post by compmike19 » Sat May 25, 2013 10:50 pm

Updated r3408

New:

Hairpin issue fixed zone_settings.sql now contains IPs for both LAN and WAN users.
it is set for a LAN network of 10.1.10.* can be changed for different LANs, account IDs and character IDs of WAN users are over 40000, instructions in included text file to change your SQL dumps for existing characters or modify the starting number of WAN users.

Hairpinning is no longer necessary, instructions for just this are in the text file included.
Attachments
Hairpin patch stuff.txt
(13.42 KiB) Downloaded 230 times
Compmikes r3408.patch
(13.09 MiB) Downloaded 211 times

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: My port of the project many things.

Post by xelloss » Sun May 26, 2013 7:19 am

These latest changes on your patches with hairpinning seem to have broken things for me. Basically, I'm now having the problem that hairpinning usually causes - I can no longer get into the game. I get up to "Downloading Data" and hit a FFXI-3001 error after a few moments. The lobby server is working flawlessly ( I can see it throwing the messages for LAN and WAN IPs and they are correct, as well as seeing the client IP address - also correct ), but for some reason it cannot get to the game server ( it is running, standing by and waiting and running guild / weather updates ). No error messages are thrown in any of the server windows. I did a complete revert, updated to r3408, applied the patch, and compiled. So nothing was done manually except to configure the database password and the LAN IP mask setting in login_darkstar.config ( 192.168.10.* ).

compmike19
Posts: 115
Joined: Wed Jan 23, 2013 11:14 pm

Re: My port of the project many things.

Post by compmike19 » Sun May 26, 2013 2:12 pm

Are you sure your internal IP is 192.168.10.* usually with Linksys it's 192.168.1.* or sometimes 192.168.0.*. Also if you are logging in LAN side make sure your account ID and character ID in the database are below 40000, or above that for WAN users. Then how do you login? I use ffxi boot mod 3, ran from the command line now I login like this pol.exe --server 10.1.10.45 --user xxxx --pass xxxx make sure you are no longer using the hairpin switch and you are entering your internal IP as the server's address.

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: My port of the project many things.

Post by xelloss » Sun May 26, 2013 8:20 pm

I don't use a Linksys setup. I have a hardware server setup for connection / routing and properly adhere to the old IPv4 addressing setups which dictate that a 192.168.0.0/16 address setup should be used in private networks requiring the lower end number of addresses. I utilise multiple IP subnets, but all of them are on the 192.168.0.0/16 schema. The FFXI server specifically is running on the 192.168.10.* subnet. The account and character ID are the original, 1000 and 21828. I utilise Ashita Boot.exe as my loader, with the xml pointed at <setting name="boot_command">--server 192.168.10.149 --user 'myusername' --password 'mypassword'</setting>. I was never operating with hairpinning active to begin with since everything is run on my private server network. The DSConnect-server window properly reports everything going on with the login, it's just once I select my character to login I get the infamous Downloading Data... and then the FFXI-3001 error ingame.

The DSGame-server window reported full bootup, and it has been running the entire time. I have multiple Debug "Player playtime..." and "UpdateGuilds..." messages. I'm not sure if it matters but this latest build is not reporting any weather updates, I know that it used to do that. Without being able to get ingame though, I have no idea if weather is changing. Below are the two logs:

Code: Select all

[1;32m[Status][0m Memory manager initialised: [1;37mlog/DSP.leaks[0m
[1;37m[Info][0m DarkStar - onetimexi - SVN Revision: [1;37mUnknown[0m.
[26/May 05:11][1;37m[Info][0m Console Silent Setting: 0
[26/May 05:11][1;32m[Status][0m The login-server-auth is [1;32mready[0m (Server is listening on the port 54231).

[26/May 05:11][1;32m[Status][0m The login-server-lobbydata is [1;32mready[0m (Server is listening on the port 54230).

[26/May 05:11][1;32m[Status][0m The login-server-lobbyview is [1;32mready[0m (Server is listening on the port 54001).

[26/May 05:11][1;32m[Status][0m The login-server is [1;32mready[0m to work...
[26/May 05:11][1;37m[Info][0m login_parse:[1;37m<username>[0m was connected
[26/May 05:11][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<26>[0m from ip:<192.168.10.149>
[26/May 05:11][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<1f>[0m from ip:<192.168.10.149>
[26/May 05:11][1;36m[Debug][0m lobbydata_parse:Incoming Packet:[1;37m<a1>[0m from ip:<192.168.10.149>
[26/May 05:11][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<24>[0m from ip:<192.168.10.149>
[26/May 05:11][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<7>[0m from ip:<192.168.10.149>
[26/May 05:11][1;36m[Debug][0m lobbydata_parse:Incoming Packet:[1;37m<a2>[0m from ip:<192.168.10.149>
[26/May 05:11][1;37m[Info][0m lobbydata_parse: zoneid:(241),zoneport:(54230) for char:(21828)
[26/May 05:11][1;37m[Info][0m lobbydata_parse: WAN IP:(mypublicip)
[26/May 05:11][1;37m[Info][0m lobbydata_parse: LAN IP:(192.168.10.149)
[26/May 05:11][1;32m[Status][0m lobbydata_parse: client 192.168.10.149 finished work with [1;32mlobbyview[0m
[26/May 05:14][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<26>[0m from ip:<192.168.10.149>
[26/May 05:14][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<1f>[0m from ip:<192.168.10.149>
[26/May 05:14][1;36m[Debug][0m lobbydata_parse:Incoming Packet:[1;37m<a1>[0m from ip:<192.168.10.149>
[26/May 05:14][1;36m[Debug][0m lobbyview_parse:Incoming Packet:[1;37m<24>[0m from ip:<192.168.10.149>
[26/May 05:14][1;37m[Info][0m [1;37mlobbyview_parse[0m: [1;37musername[0m shutdown the socket
[26/May 05:14][1;37m[Info][0m lobbydata_parse: [1;37musername[0m shutdown the socket
[26/May 05:14][1;37m[Info][0m lobbydata_parse: [1;37musername[0m's login_session_data is deleted
[26/May 13:10][1;37m[Info][0m Pinging SQL server to keep connection alive...

Code: Select all

[05:05:48][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[1;32m[Status][0m Memory manager initialised: [1;37mlog/DSP.leaks[0m
[1;37m[Info][0m DarkStar - onetimexi - SVN Revision: [1;37mUnknown[0m.
[1;32m[Status][0m do_init: begin server initialization...
[05:11:11][1;37m[Info][0m Console Silent Setting: 0 			 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: map_config is reading 		 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m luautils::init:lua initializing... 		 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m cmdhandler::init: initializing...		 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: sqlhandle is allocating 		 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: zlib is reading 			 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: loading items 			 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: loading spells 			 - [1;32m[OK][0m
[05:11:11][1;32m[Status][0m do_init: loading zones 			 - [1;32m[OK][0m
[05:11:42][1;32m[Status][0m do_init: server is binding with port 54230 	 - [1;32m[OK][0m
[05:11:42][1;32m[Status][0m The map-server is [1;32mready[0m to work...
 =======================================================================
[05:11:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[05:21:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[05:31:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[05:41:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[05:51:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[06:01:42][1;36m[Debug][0m [1;36mPlayer playtime saving finished
[0m[06:04:49][1;36m[Debug][0m [1;36mUpdateGuildsStock is finished
...

Edit - Just for S&G, I changed the LANIP to 127.0.0.1, I could still get to and through the character selection screen but experienced the same issue with the Downloading Data... timeout after the lobby server's job is done. I wouldn't have thought this should work based on my understanding of the way the code works, given that I didn't change the IPMask setting from 192.168.10.*. I also saw no difference using 192.168.*. Isn't this mask setting in the conf file supposed to prevent that? Granted, the server is on the same computer I run the game on because that makes building it easier, so maybe using the loopback address doesn't cause an issue.

compmike19
Posts: 115
Joined: Wed Jan 23, 2013 11:14 pm

Re: My port of the project many things.

Post by compmike19 » Mon May 27, 2013 1:18 am

The IP Mask setting is used for a comparison when telling the game which error message to send from the lobby and what starting IDs you get on new character creation. All other functions after lobby use IDs to determines which function to use getLANIP or getWANIP. I'm not sure why it would hang on you, have your tried a new character and seen if that would load through? I disabled the update weather console info last update, about to do the same for guild stock and save playtime. About the only thing I could suggest is putting in a few break points where it pulls on zone in or transfer from lobby to the map server and seeing what values it's pulling, maybe add a debug ShowInfo message where it's sending you reserve packets for ZoneIP and ZonePort after the wildcmp("192.168.10.*",ip2str(sd->client_add,NULL))) to see if its giving you LANIP or WANIP. Have your tried putting the same values for both IP fields in the zone settings sql see if that will let you in? And as always the last resort would be to undo the hairpin stuff listed in the text file.

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: My port of the project many things.

Post by xelloss » Mon May 27, 2013 6:36 am

LANIP / WANIP - Results

127.0.0.1 / 127.0.0.1 - OK
127.0.0.1 / 192.168.10.149 - OK
192.168.10.149 / 192.168.10.149 - OK
192.168.10.149 / PublicIP - NG
PublicIP / PublicIP - NG
PublicIP / 192.168.10.149 - OK


So it seems like the changes always are using the WANIP rather than LANIP to connect, and this doesn't work ( either because my firewall is blocking the ports or because it doesn't like going outside and then back in; I haven't had time to play with the firewall yet ). All the changes I make show up in lobbyserver's messages, but I can only get into the game from the lobby if the WANIP is loopback or the 192.168.10.149 setting. The PublicIP is correct as well; in truth though, it shouldn't matter right? If I attempt to login from a LAN address, aren't the changes supposed to use the LANIP setting?

compmike19
Posts: 115
Joined: Wed Jan 23, 2013 11:14 pm

Re: My port of the project many things.

Post by compmike19 » Mon May 27, 2013 3:24 pm

Updated r3416

Fix:

Change to Search server IP in lobby can now search again - I now have testers again to find my mistakes :p


Xelloss:

in lobby.cpp this is where it tells the map server the initial zone in IP (IP changed for your config) you can try a ShowInfo like this to tell which is being executed

if(wildcmp("192.168.10.*",ip2str(sd->client_addr,NULL)))
{
WBUFL(ReservePacket,(0x38)) = ZoneLANIP; // map-server ip
WBUFW(ReservePacket,(0x3C)) = ZonePort; // map-server port
WBUFL(ReservePacket,(0x40)) = sd->servip; // search-server ip
//WBUFW(ReservePacket,(0x44)) = SearchPort; // search-server port
ShowInfo("Using LANIP Setting");
}
else
{
WBUFL(ReservePacket,(0x38)) = ZoneWANIP; // map-server ip
WBUFW(ReservePacket,(0x3C)) = ZonePort; // map-server port
WBUFL(ReservePacket,(0x40)) = sd->servip; // search-server ip
//WBUFW(ReservePacket,(0x44)) = SearchPort; // search-server port
ShowInfo("Using WANIP Setting");
}
Attachments
Compmikes r3416.patch
(13.09 MiB) Downloaded 189 times

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: My port of the project many things.

Post by xelloss » Mon May 27, 2013 9:33 pm

That code is actually my issue. It doesn't say in the text file to change

Code: Select all

if(wildcmp("10.1.10.*",ip2str(sd->client_addr,NULL)))
In the patch version, this is your IP. Because it isn't my IP, it is using the WAN. Changing it to 192.168.* or 192.168.10.* fixes the issue and allows LANIP and WANIP to be their respective addresses in SQL. Looking through the "Hairpin patch stuff.txt" file included above, this is the only entry I see where the IP is hardcoded, everywhere else it is

Code: Select all

if(wildcmp(login_config.lan_ipmask,ip2str(sd->client_addr,NULL)))
Changing the line so that rather than a hardcoded IP address it instead uses the variable "login_config.lan_ipmask" also fixes the issue ( and should prevent others from having a problem with it ).

compmike19
Posts: 115
Joined: Wed Jan 23, 2013 11:14 pm

Re: My port of the project many things.

Post by compmike19 » Tue May 28, 2013 5:32 pm

Updated r3417

Fix:

Added key items for SoA maps and added them for starting players that us the ALL MAPS setting.

Thanks to xelloss, changed the 1 IP instance to login_config.lan_ipmask in the lobby to prevent others from having that issue.

Updated item_weapons.sql to be in numerical order and added most of the missing weapon entries. Changed the negative delay on bows and ammunition to the correct one.
Attachments
Compmikes r3417.patch
(13.07 MiB) Downloaded 203 times

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: My port of the project many things.

Post by kjLotus » Tue May 28, 2013 5:51 pm

compmike19 wrote:Changed the negative delay on bows and ammunition to the correct one.
they are supposed to be negative

Post Reply