summaryrefslogtreecommitdiff
path: root/src/conf_mode/wireguard.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-05 01:10:36 +0100
committerDaniil Baturin <daniil@baturin.org>2018-11-05 01:10:36 +0100
commit7713fb958f606672804789ff431aa1f691ef4a46 (patch)
treec19972185118dfa2c8d2f76974a86e1d44feb7d5 /src/conf_mode/wireguard.py
parentaf3a5142dce9fb3d6f3fecdbccfd1cae23b31c62 (diff)
parentd6c39f624a2ced96015d1e915d90e80acda3babb (diff)
downloadvyos-1x-7713fb958f606672804789ff431aa1f691ef4a46.tar.gz
vyos-1x-7713fb958f606672804789ff431aa1f691ef4a46.zip
Merge branch 'current' of https://github.com/vyos/vyos-1x into current
Diffstat (limited to 'src/conf_mode/wireguard.py')
-rwxr-xr-xsrc/conf_mode/wireguard.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/conf_mode/wireguard.py b/src/conf_mode/wireguard.py
index c6440ad81..3c8ade1db 100755
--- a/src/conf_mode/wireguard.py
+++ b/src/conf_mode/wireguard.py
@@ -295,18 +295,13 @@ def configure_interface(c, intf):
os.remove(psk_file)
def add_addr(intf, addr):
+ # see https://phabricator.vyos.net/T949
ret = subprocess.call(['ip a a dev ' + intf + ' ' + addr + ' &>/dev/null'], shell=True)
- if ret != 0:
- raise ConfigError('Can\'t set IP ' + addr + ' on ' + intf)
- else:
- sl.syslog(sl.LOG_NOTICE, "ip a a dev " + intf + " " + addr)
+ sl.syslog(sl.LOG_NOTICE, "ip a a dev " + intf + " " + addr)
def del_addr(intf, addr):
ret = subprocess.call(['ip a d dev ' + intf + ' ' + addr + ' &>/dev/null'], shell=True)
- if ret != 0:
- raise ConfigError('Can\'t delete IP ' + addr + ' on ' + intf)
- else:
- sl.syslog(sl.LOG_NOTICE, "ip a d dev " + intf + " " + addr)
+ sl.syslog(sl.LOG_NOTICE, "ip a d dev " + intf + " " + addr)
if __name__ == '__main__':
try: