Changeset 81
- Timestamp:
- 04/17/04 15:03:54 (9 years ago)
- Location:
- trunk/wifidog
- Files:
-
- 2 modified
-
ChangeLog (modified) (3 diffs)
-
src/firewall.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/ChangeLog
r80 r81 1 # $Header$ 2 3 2004-04-16 Alexandre Carmel-Veilleux <acv@acv.ca> 4 * Updated documentation in firewall.c 5 1 6 2004-04-17 Philippe April <papril777@yahoo.com> 2 7 * Fixed path returning to gateway in phpauth/login/index.php … … 6 11 7 12 2004-04-16 Philippe April <papril777@yahoo.com> 8 * Fixed CRLF/formatting in phpauth/login/index.php9 * Added some documentation for firewall.c, commandline.c10 * Removed an unnecessary line dist_sysconf_DATA from Makefile.am13 * Fixed CRLF/formatting in phpauth/login/index.php 14 * Added some documentation for firewall.c, commandline.c 15 * Removed an unnecessary line dist_sysconf_DATA from Makefile.am 11 16 12 17 2004-04-15 Alexandre Carmel-Veilleux <acv@acv.ca> … … 67 72 68 73 2004-03-13 Philippe April <papril777@yahoo.com> 69 * Modified the way firewall scripts are called so we can configure 70 them in the config file (a bit more modular than it was) 71 * Added simple linked list to keep track of clients and to 72 keep a counter of the utilization and send it to the auth 73 server 74 * Fixed CRLF/formatting in phpauth/auth/index.php 75 * Hacked phpauth/auth/index.php to handle very basic utilization tracking 74 * Modified the way firewall scripts are called so we can configure 75 them in the config file (a bit more modular than it was) 76 * Added simple linked list to keep track of clients and to 77 keep a counter of the utilization and send it to the auth server 78 * Fixed CRLF/formatting in phpauth/auth/index.php 79 * Hacked phpauth/auth/index.php to handle very basic utilization tracking 76 80 77 81 2004-03-12 Philippe April <papril777@yahoo.com> 78 * Changed all perror()s into debug()s and added 79 errno.h to common.h 82 * Changed all perror()s into debug()s and added errno.h to common.h 80 83 81 84 2004-03-10 Philippe April <papril777@yahoo.com> 82 * Small fix to firewall.c so we don't define variables after83 the function has started (so it builds on gcc-2.95)85 * Small fix to firewall.c so we don't define variables after 86 the function has started (so it builds on gcc-2.95) 84 87 85 88 2004-03-09 Philippe April <papril777@yahoo.com> 86 * Major changes:not forking anymore for new connections, now using87 select() instead. It will allow us to efficiently use a linked list to track88 users and other things. It introduces some bugs and design issues but will89 be better in the end.89 * Major changes, not forking anymore for new connections, now using 90 select() instead. It will allow us to efficiently use a linked list to track 91 users and other things. It introduces some bugs and design issues but will 92 be better in the end. 90 93 91 94 2004-03-09 Philippe April <papril777@yahoo.com> 92 * Small fix in the default.php login page93 * exit() where the program was supposed to exit but wasn't when the94 firewall could not be setup95 * Small fix in the default.php login page 96 * exit() where the program was supposed to exit but wasn't when the 97 firewall could not be setup 95 98 96 99 2004-03-09 Alexandre Carmel-Veilleux <acv@acv.ca> -
trunk/wifidog/src/firewall.c
r75 r81 242 242 if (rc == 4 && rc != EOF) { 243 243 244 /* TODO If the client is not active for x245 * seconds timeout the client and destroy token.246 * Maybe this should be done on the auth247 * server */248 249 244 pthread_mutex_lock(&nodes_mutex); 250 245 … … 252 247 253 248 if (p1->counter == counter) { 249 /* expire clients for inactivity */ 254 250 debug(D_LOG_DEBUG, "Client %s was " 255 251 "inactive", ip); … … 313 309 } 314 310 311 /** 312 * @brief Initializes the list of connected clients (node) 313 */ 315 314 void 316 315 node_init(void) … … 320 319 } 321 320 321 /** 322 * @brief Adds a new node to the connections list 323 * 324 * Based on the parameters it receives, this function creates a new entry 325 * in the connections list. All the memory allocation is done here. 326 */ 322 327 t_node * 323 328 node_add(char *ip, char *mac, char *token, long int counter, int active) … … 361 366 } 362 367 368 /** 369 * @brief Finds a specific node by its IP 370 */ 363 371 t_node * 364 372 node_find_by_ip(char *ip) … … 376 384 } 377 385 386 /** 387 * @brief Finds a specific node by its token 388 */ 378 389 t_node * 379 390 node_find_by_token(char *token) … … 391 402 } 392 403 404 /** 405 * @brief Frees the memory used by a t_node structure 406 * 407 * This function frees the memory used by the t_node structure in the 408 * proper order. It also calls the free_userrights() function to free 409 * the memory used by the rights structure for the node. 410 */ 393 411 void 394 412 free_node(t_node *node) … … 410 428 } 411 429 430 /** 431 * @brief Deletes a node from the connections list 432 * 433 * Removes the specified node from the connections list and then calls 434 * the function to free the memory used by the node. 435 */ 412 436 void 413 437 node_delete(t_node *node) … … 430 454 } 431 455 456 /** 457 * @brief Check the rights for a client 458 * 459 * This function validates that a client hasn't met one of the conditions 460 * for the termination of his connection. Right now, we only check to see 461 * for a time-out. More checks could be added here. 462 */ 432 463 int 433 464 check_userrights(t_node *node)
