summaryrefslogtreecommitdiff
path: root/src/migration-scripts/system/23-to-24
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-06-08 20:03:55 +0200
committerChristian Poessinger <christian@poessinger.com>2022-06-08 20:03:55 +0200
commitab4735480d62a3608ef21e9821c5d7865cb20a8a (patch)
tree6226468f48e02b48cb90c1715736d8e7fa910964 /src/migration-scripts/system/23-to-24
parentcfd958c08d2b20313dd51efc3d17695711c45dc4 (diff)
downloadvyos-1x-ab4735480d62a3608ef21e9821c5d7865cb20a8a.tar.gz
vyos-1x-ab4735480d62a3608ef21e9821c5d7865cb20a8a.zip
arp: T4397: bugfix on address iteration - ARP is IPv4 only
Diffstat (limited to 'src/migration-scripts/system/23-to-24')
-rwxr-xr-xsrc/migration-scripts/system/23-to-244
1 files changed, 4 insertions, 0 deletions
diff --git a/src/migration-scripts/system/23-to-24 b/src/migration-scripts/system/23-to-24
index 5ea71d51a..97fe82462 100755
--- a/src/migration-scripts/system/23-to-24
+++ b/src/migration-scripts/system/23-to-24
@@ -20,6 +20,7 @@ from ipaddress import ip_interface
from ipaddress import ip_address
from sys import exit, argv
from vyos.configtree import ConfigTree
+from vyos.template import is_ipv4
if (len(argv) < 1):
print("Must specify file name!")
@@ -37,6 +38,9 @@ def fixup_cli(config, path, interface):
if config.exists(path + ['address']):
for address in config.return_values(path + ['address']):
tmp = ip_interface(address)
+ # ARP is only available for IPv4 ;-)
+ if not is_ipv4(tmp):
+ continue
if ip_address(host) in tmp.network.hosts():
mac = config.return_value(tmp_base + [host, 'hwaddr'])
iface_path = ['protocols', 'static', 'arp', 'interface']