Commit ce84d060 authored by Zenon Mousmoulas's avatar Zenon Mousmoulas

Servdata consumer templates: in freeradius-proxy.tpl either all realm

proxyto servers are auth+acct, or auth and acct should be configured
separately
parent b2f36fc9
...@@ -66,8 +66,12 @@ realm_servers = {} ...@@ -66,8 +66,12 @@ realm_servers = {}
for t in ['auth', 'acct', 'auth+acct']: for t in ['auth', 'acct', 'auth+acct']:
realm_servers[t] = deduplicated_list([s for s in inst['realms'][realm]['proxy_to'] realm_servers[t] = deduplicated_list([s for s in inst['realms'][realm]['proxy_to']
if servers[s]['rad_pkt_type'] == t]) if servers[s]['rad_pkt_type'] == t])
if len(realm_servers['auth+acct']) != len(inst['realms'][realm]['proxy_to']):
realm_servers['auth'] += realm_servers['auth+acct']
realm_servers['acct'] += realm_servers['auth+acct']
realm_servers['auth+acct'] = []
%>\ %>\
% if len(realm_servers['auth+acct']) == len(inst['realms'][realm]['proxy_to']): % if len(realm_servers['auth+acct']) > 0:
home_server_pool ${realm | realm_disarm} { home_server_pool ${realm | realm_disarm} {
type = fail-over type = fail-over
% for srv in realm_servers['auth+acct']: % for srv in realm_servers['auth+acct']:
...@@ -92,10 +96,9 @@ home_server_pool ${realm | realm_disarm}_acct { ...@@ -92,10 +96,9 @@ home_server_pool ${realm | realm_disarm}_acct {
} }
% endif % endif
% endif % endif
% if len(realm_servers['auth+acct']) == len(inst['realms'][realm]['proxy_to']) \ % if len(realm_servers['auth+acct']) > 0 or len(realm_servers['auth']) > 0:
or len(realm_servers['auth']) > 0:
realm ${realm | realm_regex} { realm ${realm | realm_regex} {
% if len(realm_servers['auth+acct']) == len(inst['realms'][realm]['proxy_to']): % if len(realm_servers['auth+acct']) > 0:
pool = ${realm | realm_disarm} pool = ${realm | realm_disarm}
% else: % else:
auth_pool = ${realm | realm_disarm}_auth auth_pool = ${realm | realm_disarm}_auth
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment