* Also, if there's no User-Name attribute, we can't
* proxy it, either.
*/
+#ifdef WITH_PROXY
if ((request->proxy != NULL) ||
(request->username == NULL)) {
RDEBUG2("Proxy reply, or no User-Name. Ignoring.");
return RLM_MODULE_OK;
}
+#endif
/*
* Check for 'Realm' attribute. If it exists, then we've proxied
* it already ( via another rlm_realm instance ) and should return.
*/
- if (pairfind(request->packet->vps, PW_REALM) != NULL ) {
+ if (pairfind(request->packet->vps, PW_REALM, 0) != NULL ) {
RDEBUG2("Request already proxied. Ignoring.");
return RLM_MODULE_OK;
}
*/
if (request->username->attribute != PW_STRIPPED_USER_NAME) {
vp = radius_paircreate(request, &request->packet->vps,
- PW_STRIPPED_USER_NAME,
+ PW_STRIPPED_USER_NAME, 0,
PW_TYPE_STRING);
RDEBUG2("Adding Stripped-User-Name = \"%s\"", username);
} else {
break;
}
+#ifdef WITH_PROXY
RDEBUG2("Proxying request from user %s to realm %s",
username, realm->name);
* that has already proxied the request, we don't need to do
* it again.
*/
- vp = pairfind(request->packet->vps, PW_FREERADIUS_PROXIED_TO);
+ vp = pairfind(request->packet->vps, PW_FREERADIUS_PROXIED_TO, 0);
if (vp && (request->packet->src_ipaddr.af == AF_INET)) {
int i;
fr_ipaddr_t my_ipaddr;
}
}
+#endif
/*
* We got this far, which means we have a realm, set returnrealm
*/
*returnrealm = realm;
+
return RLM_MODULE_UPDATED;
}