From ab4735480d62a3608ef21e9821c5d7865cb20a8a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 8 Jun 2022 20:03:55 +0200 Subject: arp: T4397: bugfix on address iteration - ARP is IPv4 only --- src/migration-scripts/system/23-to-24 | 4 ++++ 1 file changed, 4 insertions(+) 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'] -- cgit v1.2.3