#define MD5_HASH_SIZE 16
+#define MSDNS 1
+
static char *config_file = NULL;
static int add_avp(char **);
static struct avpopt {
int mppe_enc_policy = 0;
int mppe_enc_types = 0;
#endif
+#ifdef MSDNS
+ ipcp_options *wo = &ipcp_wantoptions[0];
+ ipcp_options *ao = &ipcp_allowoptions[0];
+ int got_msdns_1 = 0;
+ int got_msdns_2 = 0;
+ int got_wins_1 = 0;
+ int got_wins_2 = 0;
+#endif
/* Send RADIUS attributes to anyone else who might be interested */
if (radius_attributes_hook) {
/* Session timeout */
maxconnect = vp->lvalue;
break;
+ case PW_FILTER_ID:
+ /* packet filter, will be handled via ip-(up|down) script */
+ script_setenv("RADIUS_FILTER_ID", vp->strvalue, 1);
+ break;
+ case PW_FRAMED_ROUTE:
+ /* route, will be handled via ip-(up|down) script */
+ script_setenv("RADIUS_FRAMED_ROUTE", vp->strvalue, 1);
+ break;
+ case PW_IDLE_TIMEOUT:
+ /* idle parameter */
+ idle_time_limit = vp->lvalue;
+ break;
#ifdef MAXOCTETS
case PW_SESSION_OCTETS_LIMIT:
/* Session traffic limit */
rstate.ip_addr = remote;
}
break;
+ case PW_NAS_IP_ADDRESS:
+ wo->ouraddr = htonl(vp->lvalue);
+ break;
case PW_CLASS:
/* Save Class attribute to pass it in accounting request */
if (vp->lvalue <= MAXCLASSLEN) {
}
-#ifdef CHAPMS
} else if (vp->vendorcode == VENDOR_MICROSOFT) {
+#ifdef CHAPMS
switch (vp->attribute) {
case PW_MS_CHAP2_SUCCESS:
if ((vp->lvalue != 43) || strncmp(vp->strvalue + 1, "S=", 2)) {
break;
#endif /* MPPE */
-#if 0
+#ifdef MSDNS
case PW_MS_PRIMARY_DNS_SERVER:
+ ao->dnsaddr[0] = htonl(vp->lvalue);
+ got_msdns_1 = 1;
+ if (!got_msdns_2)
+ ao->dnsaddr[1] = ao->dnsaddr[0];
+ break;
case PW_MS_SECONDARY_DNS_SERVER:
+ ao->dnsaddr[1] = htonl(vp->lvalue);
+ got_msdns_2 = 1;
+ if (!got_msdns_1)
+ ao->dnsaddr[0] = ao->dnsaddr[1];
+ break;
case PW_MS_PRIMARY_NBNS_SERVER:
+ ao->winsaddr[0] = htonl(vp->lvalue);
+ got_wins_1 = 1;
+ if (!got_wins_2)
+ ao->winsaddr[1] = ao->winsaddr[0];
+ break;
case PW_MS_SECONDARY_NBNS_SERVER:
+ ao->winsaddr[1] = htonl(vp->lvalue);
+ got_wins_2 = 1;
+ if (!got_wins_1)
+ ao->winsaddr[0] = ao->winsaddr[1];
break;
-#endif
+#endif /* MSDNS */
}
#endif /* CHAPMS */
}