Changeset 1373 for trunk/wifidog/src/fw_iptables.c
- Timestamp:
- 09/30/08 05:27:40 (5 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog/src/fw_iptables.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/src/fw_iptables.c
r1305 r1373 49 49 #include "client_list.h" 50 50 51 static int iptables_do_command(c har *format, ...);52 static char *iptables_compile(c har *, char *,t_firewall_rule *);53 static void iptables_load_ruleset(c har *, char *,char *);51 static int iptables_do_command(const char *format, ...); 52 static char *iptables_compile(const char *, const char *, const t_firewall_rule *); 53 static void iptables_load_ruleset(const char *, const char *, const char *); 54 54 55 55 extern pthread_mutex_t client_list_mutex; … … 63 63 * */ 64 64 static int 65 iptables_do_command(c har *format, ...)65 iptables_do_command(const char *format, ...) 66 66 { 67 67 va_list vlist; … … 81 81 82 82 rc = execute(cmd, fw_quiet); 83 84 if (rc!=0) 85 debug(LOG_ERR, "iptables comand tailed: %s", cmd); 83 86 84 87 free(cmd); … … 96 99 */ 97 100 static char * 98 iptables_compile(c har * table, char *chain,t_firewall_rule *rule)101 iptables_compile(const char * table, const char *chain, const t_firewall_rule *rule) 99 102 { 100 103 char command[MAX_BUF], … … 140 143 */ 141 144 static void 142 iptables_load_ruleset(c har * table, char *ruleset,char *chain)145 iptables_load_ruleset(const char * table, const char *ruleset, const char *chain) 143 146 { 144 147 t_firewall_rule *rule; … … 167 170 iptables_fw_set_authservers(void) 168 171 { 169 s_config *config;172 const s_config *config; 170 173 t_auth_serv *auth_server; 171 174 … … 186 189 iptables_fw_init(void) 187 190 { 188 s_config *config;189 char * gw_interface = NULL;190 char * gw_address = NULL;191 char * ext_interface = NULL;192 int gw_port = 0;193 t_trusted_mac *p;191 const s_config *config; 192 char * gw_interface = NULL; 193 char * gw_address = NULL; 194 char * ext_interface = NULL; 195 int gw_port = 0; 196 t_trusted_mac *p; 194 197 195 fw_quiet = 0;198 fw_quiet = 0; 196 199 197 200 LOCK_CONFIG(); … … 400 403 int 401 404 iptables_fw_destroy_mention( 402 c har * table,403 c har * chain,404 c har * mention405 const char * table, 406 const char * chain, 407 const char * mention 405 408 ) { 406 409 FILE *p = NULL; … … 451 454 /** Set if a specific client has access through the firewall */ 452 455 int 453 iptables_fw_access(fw_access_t type, c har *ip,char *mac, int tag)456 iptables_fw_access(fw_access_t type, const char *ip, const char *mac, int tag) 454 457 { 455 458 int rc;
