summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-26 21:48:34 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-26 21:48:34 +0200
commit9def20e8d74475a5fe3e4844c13e988e03f4c363 (patch)
tree37f169666f38349ad9756a5379ebfaa5aab2c94a /src
parent214af997817f1856c8297a33b0b6ac3f7fb628b3 (diff)
downloadvyos-1x-9def20e8d74475a5fe3e4844c13e988e03f4c363.tar.gz
vyos-1x-9def20e8d74475a5fe3e4844c13e988e03f4c363.zip
openvpn: T1691: interface is not always created - take care when setting alias
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interface-openvpn.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/interface-openvpn.py b/src/conf_mode/interface-openvpn.py
index c91bc3900..57b07e187 100755
--- a/src/conf_mode/interface-openvpn.py
+++ b/src/conf_mode/interface-openvpn.py
@@ -916,7 +916,12 @@ def apply(openvpn):
# sleep 250ms
sleep(0.250)
- Interface(openvpn['intf']).set_alias(openvpn['description'])
+ try:
+ # we need to catch the exception if the interface is not up due to
+ # reason stated above
+ Interface(openvpn['intf']).set_alias(openvpn['description'])
+ except:
+ pass
return None