diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-01-20 11:22:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 11:22:54 +0800 |
commit | 09c2b6f9e2c0abd10ef76947c71874128c27af50 (patch) | |
tree | faae62eedae048456ab9ab721ec55272aefb2ba1 /src | |
parent | 742da889afa4375d5b6cb98dada7f2d3ec2f0326 (diff) | |
parent | 17dd50751d72079ff67c67b3b4143ec234793955 (diff) | |
download | vyos-1x-09c2b6f9e2c0abd10ef76947c71874128c27af50.tar.gz vyos-1x-09c2b6f9e2c0abd10ef76947c71874128c27af50.zip |
Merge pull request #199 from bmhughes/fix-ipv6-bfd-verification
bfd: T1949: fix verification logic for IPv6 BFD peers
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/protocols_bfd.py | 11 |
1 files changed, 8 insertions, 3 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']: |