From 583e9d907236a4a98fe40e97a378c1fb655f8a95 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 26 Mar 2020 07:31:46 +0100 Subject: router-advert: T2162: bugfix migrating link-mtu nodes with 0 value ... those nodes mean link-mtu advertisement is disabled in radvd and thus we delete the node completely as it's useless. --- src/migration-scripts/interfaces/5-to-6 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/migration-scripts/interfaces/5-to-6') diff --git a/src/migration-scripts/interfaces/5-to-6 b/src/migration-scripts/interfaces/5-to-6 index 9dbfd30e1..85a1994c6 100755 --- a/src/migration-scripts/interfaces/5-to-6 +++ b/src/migration-scripts/interfaces/5-to-6 @@ -75,6 +75,14 @@ def copy_rtradv(c, old_base, interface): if tmp == 'false': c.set(new_base + ['no-send-advert']) + # link-mtu advertisement was formerly disabled by setting its value to 0 + # ... this makes less sense - if it should not be send, just do not + # configure it + if c.exists(new_base + ['link-mtu']): + tmp = c.return_value(new_base + ['link-mtu']) + if tmp == '0': + c.delete(new_base + ['link-mtu']) + if __name__ == '__main__': if (len(sys.argv) < 1): print("Must specify file name!") -- cgit v1.2.3