freeradius: fallback to default vlan whem proxying to federez
This commit is contained in:
parent
ddd8c6dcc0
commit
2f4c6a53d8
3 changed files with 15 additions and 13 deletions
|
@ -18,7 +18,7 @@ linelog linelog_inner_postauth {
|
||||||
reference = {{ 'messages.%{%{reply:Packet-Type}:-default}' | enquote }}
|
reference = {{ 'messages.%{%{reply:Packet-Type}:-default}' | enquote }}
|
||||||
|
|
||||||
messages {
|
messages {
|
||||||
Access-Accept = {{ '${...linelog_inner_prefix} accepted "%{jsonquote:%{User-Name}}" (VLAN %{reply:Tunnel-Private-Group-Id})' | enquote }}
|
Access-Accept = {{ '${...linelog_inner_prefix} accepted "%{jsonquote:%{User-Name}}" (VLAN %{reply:Tunnel-Private-Group-Id:-unknown})' | enquote }}
|
||||||
Access-Reject = {{ '${...linelog_inner_prefix} rejected "%{jsonquote:%{User-Name}}" (%{%{Module-Failure-Message}:-unknown})' | enquote }}
|
Access-Reject = {{ '${...linelog_inner_prefix} rejected "%{jsonquote:%{User-Name}}" (%{%{Module-Failure-Message}:-unknown})' | enquote }}
|
||||||
default = {{ '${...linelog_inner_prefix} unknown packet type %{Packet-Type}' | enquote }}
|
default = {{ '${...linelog_inner_prefix} unknown packet type %{Packet-Type}' | enquote }}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ linelog linelog_outer_postauth {
|
||||||
reference = {{ 'messages.%{%{reply:Packet-Type}:-default}' | enquote }}
|
reference = {{ 'messages.%{%{reply:Packet-Type}:-default}' | enquote }}
|
||||||
|
|
||||||
messages {
|
messages {
|
||||||
Access-Accept = {{ '${...linelog_outer_prefix} accepted "%{jsonquote:%{User-Name}}" (VLAN %{reply:Tunnel-Private-Group-Id})' | enquote }}
|
Access-Accept = {{ '${...linelog_outer_prefix} accepted "%{jsonquote:%{User-Name}}" (VLAN %{reply:Tunnel-Private-Group-Id:-unknown})' | enquote }}
|
||||||
Access-Reject = {{ '${...linelog_outer_prefix} rejected "%{jsonquote:%{User-Name}}" (%{%{Module-Failure-Message}:-unknown})' | enquote }}
|
Access-Reject = {{ '${...linelog_outer_prefix} rejected "%{jsonquote:%{User-Name}}" (%{%{Module-Failure-Message}:-unknown})' | enquote }}
|
||||||
default = {{ '${...linelog_outer_prefix} unknown packet type %{Packet-Type}' | enquote }}
|
default = {{ '${...linelog_outer_prefix} unknown packet type %{Packet-Type}' | enquote }}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,18 +38,10 @@ server inner-aurore {
|
||||||
}
|
}
|
||||||
|
|
||||||
post-auth {
|
post-auth {
|
||||||
update outer.session-state {
|
|
||||||
Tunnel-Type := VLAN
|
|
||||||
Tunnel-Medium-Type := IEEE-802
|
|
||||||
}
|
|
||||||
if (&reply:Tunnel-Private-Group-ID) {
|
if (&reply:Tunnel-Private-Group-ID) {
|
||||||
update outer.session-state {
|
update outer.session-state {
|
||||||
Tunnel-Private-Group-ID := &reply:Tunnel-Private-Group-ID
|
Tunnel-Private-Group-ID := &reply:Tunnel-Private-Group-ID
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
update outer.session-state {
|
|
||||||
Tunnel-Private-Group-ID := {{ radiusd__guest_vlan | int }}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
linelog_inner_postauth
|
linelog_inner_postauth
|
||||||
Post-Auth-Type reject {
|
Post-Auth-Type reject {
|
||||||
|
|
|
@ -55,11 +55,21 @@ server outer-aurore {
|
||||||
&& &request:User-Name \
|
&& &request:User-Name \
|
||||||
&& (&reply:User-Name == &request:User-Name)) {
|
&& (&reply:User-Name == &request:User-Name)) {
|
||||||
update reply {
|
update reply {
|
||||||
&User-Name !* ANY
|
User-Name !* ANY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update {
|
update reply {
|
||||||
reply: += &session-state:
|
Tunnel-Medium-Type := IEEE-802
|
||||||
|
Tunnel-Type := VLAN
|
||||||
|
}
|
||||||
|
if (&session-state:Tunnel-Private-Group-ID) {
|
||||||
|
update reply {
|
||||||
|
Tunnel-Private-Group-ID := &session-state:Tunnel-Private-Group-ID
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
update reply {
|
||||||
|
Tunnel-Private-Group-ID := {{ radiusd__guest_vlan | int }}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Post-Auth-Type reject {
|
Post-Auth-Type reject {
|
||||||
attr_filter.access_reject
|
attr_filter.access_reject
|
||||||
|
|
Loading…
Reference in a new issue