diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/protocols_bfd.py | 11 | ||||
-rwxr-xr-x | src/helpers/validate-value.py | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/conf_mode/protocols_bfd.py b/src/conf_mode/protocols_bfd.py index 9ca194edd..58f5b5a0e 100755 --- a/src/conf_mode/protocols_bfd.py +++ b/src/conf_mode/protocols_bfd.py @@ -163,10 +163,15 @@ def verify(bfd): conf = Config() for peer in bfd['new_peers']: - # IPv6 peers require an explicit local address/interface combination - if vyos.validate.is_ipv6(peer['remote']): + # IPv6 link local peers require an explicit local address/interface + if vyos.validate.is_ipv6_link_local(peer['remote']): if not (peer['src_if'] and peer['src_addr']): - raise ConfigError('BFD IPv6 peers require explicit local address and interface setting') + raise ConfigError('BFD IPv6 link-local peers require explicit local address and interface setting') + + # IPv6 peers require an explicit local address + if vyos.validate.is_ipv6(peer['remote']): + if not peer['src_addr']: + raise ConfigError('BFD IPv6 peers require explicit local address setting') # multihop require source address if peer['multihop'] and not peer['src_addr']: diff --git a/src/helpers/validate-value.py b/src/helpers/validate-value.py index 36f996d38..7e16cfb4e 100755 --- a/src/helpers/validate-value.py +++ b/src/helpers/validate-value.py @@ -28,7 +28,7 @@ except Exception as exn: try: for cmd in args.exec: - cmd = "{0} {1}".format(cmd, args.value) + cmd = "{0} \'{1}\'".format(cmd, args.value) if debug: print(cmd) res = os.system(cmd) |