Issue information

Issue ID
#1046
Status
Invalid
Severity
Low
Started
Hercules Elf Bot
Feb 24, 2008 17:35
Last Post
Hercules Elf Bot
Apr 19, 2012 15:31
Confirmation
N/A

Hercules Elf Bot - Feb 24, 2008 17:35

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&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

Hercules Elf Bot - Jan 5, 2012 3:34

Originally posted by [b]Ind[/b]
not a actual bug but a unsupported feature, invalid.