diff options
author | hagbard <vyosdev@derith.de> | 2018-11-02 12:15:34 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2018-11-02 12:15:34 -0700 |
commit | 2ad8fa385cefa1acbe75b8ca22a4183b00edf7de (patch) | |
tree | 58713fb1cd2ba0f09b34947aeff98af6ae25b802 | |
parent | c4c183a16fe2ddc612ed947fc5513c87f30c7c27 (diff) | |
download | vyos-1x-2ad8fa385cefa1acbe75b8ca22a4183b00edf7de.tar.gz vyos-1x-2ad8fa385cefa1acbe75b8ca22a4183b00edf7de.zip |
T949: config issue when creating multiple wg interfaces at the same time.
-rwxr-xr-x | src/conf_mode/wireguard.py | 11 |
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: |