diff --git a/feeds/ucentral/uspot/files/usr/share/uspot/portal.uc b/feeds/ucentral/uspot/files/usr/share/uspot/portal.uc index 7df2ecd1c..a29ed8bb4 100644 --- a/feeds/ucentral/uspot/files/usr/share/uspot/portal.uc +++ b/feeds/ucentral/uspot/files/usr/share/uspot/portal.uc @@ -230,6 +230,7 @@ return { calling_station: ctx.format_mac, nas_ip: ctx.env.SERVER_ADDR, nas_id: ctx.config.nasid, + nas_port_type: 19, // wireless }; if (ctx.config.location_name) diff --git a/feeds/ucentral/uspot/src/radius.c b/feeds/ucentral/uspot/src/radius.c index 547b03e05..7f15cd353 100644 --- a/feeds/ucentral/uspot/src/radius.c +++ b/feeds/ucentral/uspot/src/radius.c @@ -45,6 +45,7 @@ enum { RADIUS_PROXY_STATE_ACCT, RADIUS_PROXY_STATE_AUTH, RADIUS_LOCATION_NAME, + RADIUS_NAS_PORT_TYPE, __RADIUS_MAX, }; @@ -77,6 +78,7 @@ static const struct blobmsg_policy radius_policy[__RADIUS_MAX] = { [RADIUS_PROXY_STATE_AUTH] = { .name = "auth_proxy", .type = BLOBMSG_TYPE_STRING }, [RADIUS_PROXY_STATE_ACCT] = { .name = "acct_proxy", .type = BLOBMSG_TYPE_STRING }, [RADIUS_LOCATION_NAME] = { .name = "location_name", .type = BLOBMSG_TYPE_STRING }, + [RADIUS_NAS_PORT_TYPE] = { .name = "nas_port_type", .type = BLOBMSG_TYPE_INT32 }, }; static struct blob_buf b = {}; @@ -126,6 +128,7 @@ static const struct { [RADIUS_PROXY_STATE_AUTH] = { .attrid = PW_PROXY_STATE, }, [RADIUS_PROXY_STATE_ACCT] = { .attrid = PW_PROXY_STATE, }, [RADIUS_LOCATION_NAME] = { .attrid = ATTR_WBAL_WISPR_LOCATION_NAME, .vendorspec = VENDORSPEC_WBAL, }, + [RADIUS_NAS_PORT_TYPE] = { .attrid = PW_NAS_PORT_TYPE, }, }; /** @@ -312,11 +315,6 @@ radius(void) } } - val = 19; - if (rc_avpair_add(rh, &send, PW_NAS_PORT_TYPE, &val, 4, 0) == NULL) - goto fail; - - rc_apply_config(rh); if (tb[RADIUS_ACCT] && blobmsg_get_bool(tb[RADIUS_ACCT])) { if (rc_acct(rh, 0, send) == OK_RC) return result(rh, 1, NULL);