* BEFORE playing games with the attributes.
*/
vp = pairfind(request->config_items, PW_POST_PROXY_TYPE);
+
+ /*
+ * If we have a proxy_reply, and it was a reject, setup
+ * post-proxy-type Reject
+ */
+ if (!vp && request->proxy_reply &&
+ request->proxy_reply->code == PW_AUTHENTICATION_REJECT) {
+ DICT_VALUE *dval;
+
+ dval = dict_valbyname(PW_POST_PROXY_TYPE, "Reject");
+ if (!dval) return 0;
+
+ vp = radius_paircreate(request, &request->config_items,
+ PW_POST_PROXY_TYPE, PW_TYPE_INTEGER);
+
+ vp->vp_integer = dval->value;
+ }
+
if (vp) {
RDEBUG2(" Found Post-Proxy-Type %s", vp->vp_strvalue);
post_proxy_type = vp->vp_integer;