return 0;
}
+ /*
+ * Length == 0 means it exists, but there's no realm.
+ * Don't proxy it.
+ */
+ if (realmpair->length == 0) {
+ return 0;
+ }
+
realmname = (char *)realmpair->strvalue;
/*
}
/*
+ * Remember that we sent the request to a Realm.
+ */
+ pairadd(&request->packet->vps,
+ pairmake("Realm", realm->realm, T_OP_EQ));
+
+
+ /*
+ * Maybe they're proxying it to a LOCAL realm, in which
+ * case do nothing.
+ */
+ if ((realm->ipaddr = htonl(0x7f000001)) &&
+ (realm->auth_port == auth_port) &&
+ (realm->acct_port == acct_port)) {
+ return 0;
+ }
+
+ /*
* Copy the request, then look up
* name and plain-text password in the copy.
*
}
/*
- * Remember that we sent the request to a Realm.
- */
- pairadd(&request->packet->vps,
- pairmake("Realm", realm->realm, T_OP_EQ));
-
- /*
* Now build a new RADIUS_PACKET and send it.
*
* FIXME: it could be that the id wraps around too fast if