summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-31 12:35:36 +0100
committerChristian Poessinger <christian@poessinger.com>2019-12-31 12:35:36 +0100
commitf0007b0703c130464d8d558e7b39374c417d179f (patch)
treecc17bca4cd0dbde8d64a7fff0b8b094157d12873
parentbaca347ce831747f87f5ae8729ead8c1257d4ab2 (diff)
downloadvyos-1x-f0007b0703c130464d8d558e7b39374c417d179f.tar.gz
vyos-1x-f0007b0703c130464d8d558e7b39374c417d179f.zip
ifconfig: geneve: always place interface in A/D state
-rw-r--r--python/vyos/ifconfig.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index b28e7af3d..f6b3cbb46 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -1679,12 +1679,14 @@ class GeneveIf(Interface):
def __init__(self, ifname, config=''):
if config:
self._ifname = ifname
-
if not os.path.exists('/sys/class/net/{}'.format(self._ifname)):
cmd = 'ip link add name {} type geneve id {} remote {}' \
.format(self._ifname, config['vni'], config['remote'])
self._cmd(cmd)
+ # interface is always A/D down. It needs to be enabled explicitly
+ self.set_state('down')
+
super().__init__(ifname, type='geneve')
@staticmethod