Feature improvements
Bug fixes
+ * Fix issue where field nas_type would not be accessible via
+ the %{client:} xlat, for clients loaded from SQL.
FreeRADIUS 3.0.10 Mon 05 Oct 2015 15:00:00 EDT urgency=medium
Feature improvements
cp = cf_pair_find(request->client->cs, fmt);
if (!cp || !(value = cf_pair_value(cp))) {
- if (strcmp(fmt, "shortname") == 0) {
- strlcpy(out, request->client->shortname, outlen);
- return strlen(out);
+ if (strcmp(fmt, "shortname") == 0 && request->client->shortname) {
+ value = request->client->shortname;
+ }
+ else if (strcmp(fmt, "nas_type") == 0 && request->client->nas_type) {
+ value = request->client->nas_type;
+ } else {
+ *out = '\0';
+ return 0;
}
- *out = '\0';
- return 0;
}
strlcpy(out, value, outlen);