Changeset 1432
- Timestamp:
- 11/25/09 14:00:21 (2 years ago)
- Files:
-
- 1 modified
-
trunk/wifidog/src/http.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/src/http.c
r1373 r1432 64 64 http_callback_404(httpd *webserver, request *r) 65 65 { 66 char tmp_url[MAX_BUF], 67 *url; 66 char tmp_url[MAX_BUF], 67 *url, 68 *mac; 68 69 s_config *config = config_get_config(); 69 70 t_auth_serv *auth_server = get_auth_server(); … … 116 117 config->gw_id, 117 118 url); 119 120 if (!(mac = arp_get(r->clientAddr))) { 121 /* We could not get their MAC address */ 122 debug(LOG_INFO, "Failed to retrieve MAC address for ip %s, so not putting in the login request", r->clientAddr); 123 } else { 124 debug(LOG_INFO, "Got client MAC address for ip %s: %s", r->clientAddr, mac); 125 safe_asprintf(&urlFragment, "%s&mac=%s", urlFragment, mac); 126 } 127 118 128 debug(LOG_INFO, "Captured %s requesting [%s] and re-directing them to login page", r->clientAddr, url); 119 129 http_send_redirect_to_auth(r, urlFragment, "Redirect to login page");
