mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
a few small fixes
This commit is contained in:
parent
0a99779c59
commit
68bab01fa2
3 changed files with 4 additions and 4 deletions
|
@ -203,9 +203,7 @@ def post_auth(data):
|
||||||
if switch:
|
if switch:
|
||||||
# For logging
|
# For logging
|
||||||
sw_name = switch["name"] or "?"
|
sw_name = switch["name"] or "?"
|
||||||
room = "Unknown port"
|
room = port["room"] or "Unknown room" if port else "Unknown port"
|
||||||
if port:
|
|
||||||
room = port["room"] or "Unknown room"
|
|
||||||
|
|
||||||
out = decide_vlan_switch(data_from_api, mac, nas_port)
|
out = decide_vlan_switch(data_from_api, mac, nas_port)
|
||||||
reason, vlan_id, decision, attributes = out
|
reason, vlan_id, decision, attributes = out
|
||||||
|
@ -379,7 +377,7 @@ def decide_vlan_switch(data_from_api, user_mac, nas_port):
|
||||||
# If a vlan is precised in port config, we use it in place of VLAN_OK
|
# If a vlan is precised in port config, we use it in place of VLAN_OK
|
||||||
if port_profile["vlan_untagged"]:
|
if port_profile["vlan_untagged"]:
|
||||||
DECISION_VLAN = int(port_profile["vlan_untagged"]["vlan_id"])
|
DECISION_VLAN = int(port_profile["vlan_untagged"]["vlan_id"])
|
||||||
extra_log = "Force sur vlan " + str(DECISION_VLAN)
|
extra_log = "Force sur vlan %s" % str(DECISION_VLAN)
|
||||||
attributes = ()
|
attributes = ()
|
||||||
else:
|
else:
|
||||||
DECISION_VLAN = radius_option["vlan_decision_ok"]["vlan_id"]
|
DECISION_VLAN = radius_option["vlan_decision_ok"]["vlan_id"]
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# Copyright © 2017 Gabriel Détraz
|
# Copyright © 2017 Gabriel Détraz
|
||||||
# Copyright © 2017 Lara Kermarec
|
# Copyright © 2017 Lara Kermarec
|
||||||
# Copyright © 2017 Augustin Lemesle
|
# Copyright © 2017 Augustin Lemesle
|
||||||
|
# Copyright © 2020 Corentin Canebier
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#
|
#
|
||||||
# Copyright © 2018 Gabriel Détraz
|
# Copyright © 2018 Gabriel Détraz
|
||||||
# Copyright © 2017 Charlie Jacomme
|
# Copyright © 2017 Charlie Jacomme
|
||||||
|
# Copyright © 2020 Corentin Canebier
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
Loading…
Reference in a new issue