From f0007b0703c130464d8d558e7b39374c417d179f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 31 Dec 2019 12:35:36 +0100 Subject: ifconfig: geneve: always place interface in A/D state --- python/vyos/ifconfig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python') 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 -- cgit v1.2.3