diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-07-16 16:05:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-16 16:05:32 +0100 |
| commit | 45e6b2e83ba7a29d68f09c4d9d7cbf15fc755db0 (patch) | |
| tree | 00d13f5f0760da06256dd3e880109b540fc06afc /src | |
| parent | a2ca9b1cf96db9fb9ed9fffe9c02248b0d59c7bd (diff) | |
| parent | d666d28e2e9a3456e3cb5cd6362ba5d83f1efdd8 (diff) | |
| download | vyos-1x-45e6b2e83ba7a29d68f09c4d9d7cbf15fc755db0.tar.gz vyos-1x-45e6b2e83ba7a29d68f09c4d9d7cbf15fc755db0.zip | |
Merge pull request #5326 from natali-rs1985/T8921
wireguard: T8921: Fix false port-conflict error on qos dependent re-verify
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/interfaces_wireguard.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces_wireguard.py b/src/conf_mode/interfaces_wireguard.py index 44ee70d27..850c66a29 100755 --- a/src/conf_mode/interfaces_wireguard.py +++ b/src/conf_mode/interfaces_wireguard.py @@ -26,6 +26,7 @@ from vyos.configdict import is_vrf_changed from vyos.configdict import is_source_interface from vyos.configdep import set_dependents from vyos.configdep import call_dependents +from vyos.configdep import called_as_dependent from vyos.configverify import verify_vrf from vyos.configverify import verify_address from vyos.configverify import verify_bridge_delete @@ -114,7 +115,14 @@ def verify(wireguard): if 'private_key' not in wireguard: raise ConfigError('Wireguard private-key not defined') - if 'port' in wireguard and 'port_changed' in wireguard: + # T8921: Skip the port-availability check on a qos.py-triggered + # dependent re-run: by then this interface already holds the port + # itself, so the check would always false-positive as busy. + if ( + 'port' in wireguard + and 'port_changed' in wireguard + and not called_as_dependent() + ): listen_port = int(wireguard['port']) if check_port_availability(None, listen_port, protocol='udp') is not True: raise ConfigError(f'UDP port {listen_port} is busy or unavailable and ' |
