summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-11-19 22:01:49 +0100
committerChristian Breunig <christian@breunig.cc>2025-11-19 22:05:39 +0100
commitdbff37e91d2168a296509428e40e974479b40d80 (patch)
tree8b9e8e734922c66ba7f464eba59d0b7b052308f3
parente6a97d165236a9606d013c8066671a295b036f36 (diff)
downloadvyos-1x-dbff37e91d2168a296509428e40e974479b40d80.tar.gz
vyos-1x-dbff37e91d2168a296509428e40e974479b40d80.zip
login: T8024: show user warning for unconfigured TACACS source-address
Add a commit-time check and warning to the user if the TACACS source-address is not configured on the system or the given VRF.
-rwxr-xr-xsrc/conf_mode/system_login.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/system_login.py b/src/conf_mode/system_login.py
index 369232f34..2692f427f 100755
--- a/src/conf_mode/system_login.py
+++ b/src/conf_mode/system_login.py
@@ -247,6 +247,11 @@ def verify(login):
verify_vrf(login['tacacs'])
+ if tmp := dict_search('tacacs.source_address', login):
+ tacacs_vrf = dict_search('tacacs.vrf', login)
+ if not is_addr_assigned(tmp, vrf=tacacs_vrf):
+ Warning(f'Specified TACACS source-address "{tmp}" is not assigned!')
+
if 'max_login_session' in login and 'timeout' not in login:
raise ConfigError('"login timeout" must be configured!')