Show
Ignore:
Timestamp:
12/19/04 14:33:27 (8 years ago)
Author:
alexcv
Message:

Auth server firewall rule tweak

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog/src/fw_iptables.c

    r302 r303  
    164164    for (auth_server = config->auth_servers; auth_server != NULL; 
    165165                    auth_server = auth_server->next) { 
    166         iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->authserv_hostname); 
     166        if (auth_server->last_ip == NULL || 
     167                          strcmp(auth_server->last_ip, "0.0.0.0") == 0) { 
     168            iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->authserv_hostname); 
     169        } else { 
     170            iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->last_ip); 
     171        } 
    167172    } 
    168173