Changeset 276
- Timestamp:
- 11/18/04 14:22:57 (9 years ago)
- Location:
- trunk/wifidog
- Files:
-
- 3 modified
-
ChangeLog (modified) (1 diff)
-
src/fw_iptables.c (modified) (3 diffs)
-
src/fw_iptables.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/ChangeLog
r274 r276 1 1 # $Header$ 2 3 2004-11-18 Alexandre Carmel-Veilleux <acv@acv.ca> 4 * src/fw_iptables.[ch]: Merged in Phil's patch. 2 5 3 6 2004-11-17 Alexandre Carmel-Veilleux <acv@acv.ca> -
trunk/wifidog/src/fw_iptables.c
r256 r276 84 84 fw_quiet = 0; 85 85 86 iptables_do_command("-t nat -N " TABLE_WIFIDOG_VALIDATE);87 iptables_do_command("-t nat -A " TABLE_WIFIDOG_VALIDATE " -d %s -j ACCEPT", config->gw_address);88 89 86 LOCK_CONFIG(); 90 87 88 iptables_do_command("-t nat -N " TABLE_WIFIDOG_AUTHSERVERS); 91 89 for (auth_server = config->auth_servers; auth_server != NULL; 92 90 auth_server = auth_server->next) { 93 iptables_do_command("-t nat -A " TABLE_WIFIDOG_ VALIDATE" -d %s -j ACCEPT", auth_server->authserv_hostname);91 iptables_do_command("-t nat -A " TABLE_WIFIDOG_AUTHSERVERS " -d %s -j ACCEPT", auth_server->authserv_hostname); 94 92 } 95 93 96 94 UNLOCK_CONFIG(); 95 96 iptables_do_command("-t nat -N " TABLE_WIFIDOG_VALIDATE); 97 iptables_do_command("-t nat -A " TABLE_WIFIDOG_VALIDATE " -j " TABLE_WIFIDOG_AUTHSERVERS); 98 iptables_do_command("-t nat -A " TABLE_WIFIDOG_VALIDATE " -d %s -j ACCEPT", config->gw_address); 97 99 98 100 /** Insert global rules BEFORE the "defaults" */ … … 112 114 113 115 iptables_do_command("-t nat -N " TABLE_WIFIDOG_UNKNOWN); 116 iptables_do_command("-t nat -A " TABLE_WIFIDOG_UNKNOWN " -j " TABLE_WIFIDOG_AUTHSERVERS); 114 117 iptables_do_command("-t nat -A " TABLE_WIFIDOG_UNKNOWN " -d %s -j ACCEPT", config->gw_address); 115 116 LOCK_CONFIG();117 118 for (auth_server = config->auth_servers; auth_server != NULL;119 auth_server = auth_server->next) {120 iptables_do_command("-t nat -A " TABLE_WIFIDOG_UNKNOWN " -d %s -j ACCEPT", auth_server->authserv_hostname);121 }122 123 UNLOCK_CONFIG();124 118 125 119 /** Insert global rules BEFORE the "defaults" */ … … 171 165 iptables_do_command("-t mangle -F " TABLE_WIFIDOG_INCOMING); 172 166 167 iptables_do_command("-t nat -F " TABLE_WIFIDOG_AUTHSERVERS); 173 168 iptables_do_command("-t nat -F " TABLE_WIFIDOG_VALIDATE); 174 169 iptables_do_command("-t nat -F " TABLE_WIFIDOG_UNKNOWN); -
trunk/wifidog/src/fw_iptables.h
r170 r276 35 35 #define TABLE_WIFIDOG_OUTGOING "WiFiDog_Outgoing" 36 36 #define TABLE_WIFIDOG_INCOMING "WiFiDog_Incoming" 37 #define TABLE_WIFIDOG_AUTHSERVERS "WiFiDog_AuthServers" 37 38 #define TABLE_WIFIDOG_VALIDATE "WiFiDog_Validate" 38 39 #define TABLE_WIFIDOG_KNOWN "WiFiDog_Known"
