[isf-wifidog] Including mac address in gateway redirect to login page

Andrew Hodel andrewhodel at gmail.com
Sam 23 Mai 00:18:45 EDT 2009


I am rewriting a much simpler auth server from scratch for use with
the wifidog gateway that accomplishes 3 simple goals:

1.  Allow user to login with credentials if he has them
2.  Allow user to validate his mac address for a predefined period of
time by entering a code
3.  Allow user to roam between nodes and automatically be logged in if
his mac matches an authenticated token

The rewrite is completely operational and working with the v1 wifidog
protocol, however in order to accomplish goals #2 and #3 I must have
the initial redirect from the wifidog gateway to the auth server login
page include the mac address of the client.  The gateway server
already does this on auth requests, I just need to include it as a GET
variable in the login redirect.

I am quite sure the gateway code would need to be modified in http.c here:

else {
101                 /* Re-direct them to auth server */
102                 safe_asprintf(&urlFragment,
"%sgw_address=%s&gw_port=%d&gw_id=%s&url=%s",
103                         auth_server->authserv_login_script_path_fragment,
104                         config->gw_address,
105                         config->gw_port,
106                         config->gw_id,
107                         url);
108                 debug(LOG_INFO, "Captured %s requesting [%s] and
re-directing them to login page", r->clientAddr, url);
109                 http_send_redirect_to_auth(r, urlFragment,
"Redirect to login page");
110                 free(urlFragment);
111         }

Can anyone explain exactly what I should modify/add in order to
include the mac in the HTTP redirect?



Kind Regards,
Andrew Hodel


Plus d'informations sur la liste de diffusion WiFiDog