Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #001046

  • 1 - Low

  • Invalid

Issue Confirmations

  • Yes (0)No (0)
Photo

Subnet Loading Can't Handle Dns Names

Posted by Hercules Bot on 24 February 2008 - 05:35 PM

Originally posted by theultramage
http://www.eathena.w...er&showbug=1046

CODE
        if( strcmpi(w1, "subnet") == 0 )
        {
            subnet[subnet_count].mask = str2ip(w2);
            subnet[subnet_count].char_ip = str2ip(w3);
            subnet[subnet_count].map_ip = str2ip(w4);
str2ip expects an ip addres in dotted notation, so it doesn't do any dns resolution; this means that the subnet config can't be used in a dynamic ip address situation.

Oh, and for some reason, when I was testing one linux server, which didn't have any matching subnet entries,
CODE
int lan_subnetcheck(uint32 ip)
{
    int i;
    ARR_FIND( 0, subnet_count, i, (subnet[i].char_ip & subnet[i].mask) == (ip & subnet[i].mask) );
    return ( i < subnet_count ) ? subnet[i].char_ip : 0;
}
...
    subnet_char_ip = lan_subnetcheck(ipl); // Advanced subnet check [LuzZza]
was assigning '1' to the subnet_char_ip variable, instead of 0. I have no idea what that was about. It went away if I disabled -O2.

This post has been edited by theultramage: Feb 24 2008, 10:08 AM

Originally posted by Ind
not a actual bug but a unsupported feature, invalid.