From c87a5a1e1f52cddf113f427ea902f45a2e2a8445 Mon Sep 17 00:00:00 2001
From: Jernej Jakob <jernej.jakob@gmail.com>
Date: Wed, 22 Apr 2020 12:41:07 +0200
Subject: interfaces: T2362: add node to delete the default IPv6 link-local
 address

---
 python/vyos/configdict.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'python')

diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 9ea89194f..2ce8a795f 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -210,8 +210,12 @@ def vlan_to_dict(conf):
     eff_addr = conf.return_effective_values('ipv6 address eui64')
     vlan['ipv6_eui64_prefix_remove'] = list_diff(eff_addr, vlan['ipv6_eui64_prefix'])
 
-    # add the link-local by default to make IPv6 work
-    vlan['ipv6_eui64_prefix'].append('fe80::/64')
+    # Remove the default link-local address if set.
+    if conf.exists('ipv6 address no-default-link-local'):
+        vlan['ipv6_eui64_prefix_remove'].append('fe80::/64')
+    else:
+        # add the link-local by default to make IPv6 work
+        vlan['ipv6_eui64_prefix'].append('fe80::/64')
 
     # Disable IPv6 forwarding on this interface
     if conf.exists('ipv6 disable-forwarding'):
-- 
cgit v1.2.3