Changeset 285
- Timestamp:
- 11/21/04 15:55:20 (4 years ago)
- Files:
-
- branches/WIFIDOG_1_0_X/wifidog/ChangeLog (modified) (1 diff)
- branches/WIFIDOG_1_0_X/wifidog/src/fw_iptables.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/WIFIDOG_1_0_X/wifidog/ChangeLog
r283 r285 3 3 * src/fw_iptables.c: changed call to iptables to use IP address instead of 4 4 host name, in case resolution fails. 5 * src/fw_iptables.c: we were using wrong IP addresses. woops. 5 6 6 7 2004-11-18 Philippe April <philippe@philippeapril.com> branches/WIFIDOG_1_0_X/wifidog/src/fw_iptables.c
r284 r285 35 35 #include <string.h> 36 36 #include <pthread.h> 37 #include <netinet/in.h> 37 38 38 39 #include "conf.h" … … 92 93 for (auth_server = config->auth_servers; auth_server != NULL; 93 94 auth_server = auth_server->next) { 94 if (auth_server->last_ip ) {95 iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", inet_ntoa(auth_server->last_ip ));95 if (auth_server->last_ip && strcmp(inet_ntoa(auth_server->last_ip->s_addr), "0.0.0.0") != 0) { 96 iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", inet_ntoa(auth_server->last_ip->s_addr)); 96 97 } else { 97 98 iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->authserv_hostname); … … 235 236 } 236 237 iptables_do_command("-t mangle -X " TABLE_WIFIDOG_INCOMING); 238 239 iptables_do_command("-t mangle -X " TABLE_WIFIDOG_AUTHSERVERS); 237 240 238 241 return 1;
