Changeset 310

Show
Ignore:
Timestamp:
06/06/07 18:42:30 (1 year ago)
Author:
florida
Message:

Ajout des corrections des tickets 324 et 266 (voir trac wifidog)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wifidog/wifidog-client/src/fw_iptables.c

    r308 r310  
    309309            /* TCPMSS rule for PPPoE */ 
    310310                        iptables_do_command("-t filter -A " TABLE_WIFIDOG_WIFI_TO_INTERNET " -m state --state INVALID -j DROP"); 
    311                         iptables_do_command("-t filter -A " TABLE_WIFIDOG_WIFI_TO_INTERNET " -m state --state RELATED,ESTABLISHED -j ACCEPT"); 
     311 
     312                        /* XXX: Why this? it means that connections setup after authentication  
     313                         stay open even after the connection is done... 
     314                         iptables_do_command("-t filter -A " TABLE_WIFIDOG_WIFI_TO_INTERNET " -m state --state RELATED,ESTABLISHED -j ACCEPT");*/ 
     315 
     316 
    312317            if (ext_interface != NULL) { 
    313318                            iptables_do_command("-t filter -A " TABLE_WIFIDOG_WIFI_TO_INTERNET " -i %s -m state --state NEW,INVALID -j DROP", ext_interface); 
  • wifidog/wifidog-client/src/http.c

    r309 r310  
    7979         * if the internet/auth server is down so it's not a huge loss, but still. 
    8080         */ 
    81         snprintf(tmp_url, (sizeof(tmp_url) - 1), "http://%s%s", 
    82                         r->request.host, 
    83                         r->request.path); 
     81        snprintf(tmp_url, (sizeof(tmp_url) - 1), "http://%s%s%s%s", 
     82                        r->request.host, 
     83                        r->request.path, 
     84                        r->request.query[0] ? "?" : "", 
     85                        r->request.query); 
    8486        url = httpdUrlEncode(tmp_url); 
    8587 
  • wifidog/wifidog-client/src/wdctl_thread.c

    r219 r310  
    123123 
    124124        while (1) { 
    125                 memset(&sa_un, 0, sizeof(sa_un)); 
     125                len = sizeof(sa_un); 
     126                memset(&sa_un, 0, len); 
    126127                if ((fd = accept(sock, (struct sockaddr *)&sa_un, &len)) == -1){ 
    127128                        debug(LOG_ERR, "Accept failed on control socket: %s", 
     
    295296                /* Wait for the child to connect to our socket :*/ 
    296297                debug(LOG_DEBUG, "Waiting for child to connect on internal socket"); 
     298                len = sizeof(sa_un); 
    297299                if ((fd = accept(sock, (struct sockaddr *)&sa_un, &len)) == -1){ 
    298300                        debug(LOG_ERR, "Accept failed on internal socket: %s", strerror(errno));