summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-03-24 12:13:01 +0200
committerGitHub <noreply@github.com>2024-03-24 12:13:01 +0200
commit3e418913f8855d4ce8b90bb9a43019d5ef1742f2 (patch)
tree81a03c00a8e615c35ee0d02007e82b6bfaddcd09 /python
parent6ad88061271b118dc4d22fe816f8b393f3220115 (diff)
parentc104f9aea60416dbff3bf8de994921069ee6a928 (diff)
downloadvyos-1x-3e418913f8855d4ce8b90bb9a43019d5ef1742f2.tar.gz
vyos-1x-3e418913f8855d4ce8b90bb9a43019d5ef1742f2.zip
Merge pull request #3163 from vyos/mergify/bp/sagitta/pr-3157
vti: T6085: bring VTI interfaces up only when the IPsec tunnel is up (backport #3157)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig/vti.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/vti.py b/python/vyos/ifconfig/vti.py
index 9ebbeb9ed..9511386f4 100644
--- a/python/vyos/ifconfig/vti.py
+++ b/python/vyos/ifconfig/vti.py
@@ -1,4 +1,4 @@
-# Copyright 2021-2022 VyOS maintainers and contributors <maintainers@vyos.io>
+# Copyright 2021-2024 VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -52,8 +52,14 @@ class VTIIf(Interface):
cmd += f' {iproute2_key} {tmp}'
self._cmd(cmd.format(**self.config))
+
+ # interface is always A/D down. It needs to be enabled explicitly
self.set_interface('admin_state', 'down')
+ def set_admin_state(self, state):
+ """ Handled outside by /etc/ipsec.d/vti-up-down """
+ pass
+
def get_mac(self):
""" Get a synthetic MAC address. """
return self.get_mac_synthetic()