diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-26 21:48:34 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-26 21:48:34 +0200 |
commit | 9def20e8d74475a5fe3e4844c13e988e03f4c363 (patch) | |
tree | 37f169666f38349ad9756a5379ebfaa5aab2c94a /src | |
parent | 214af997817f1856c8297a33b0b6ac3f7fb628b3 (diff) | |
download | vyos-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-x | src/conf_mode/interface-openvpn.py | 7 |
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 |