libnm: change nm_wireguard_peer_set_endpoint() API to allow validation

This is an API break since 1.16-rc1.

Similar to previous commit.

(cherry picked from commit 8ae9aa2428)
This commit is contained in:
Thomas Haller
2019-03-01 15:52:19 +01:00
parent 6452d2d0e5
commit f617d5e8b4
5 changed files with 38 additions and 16 deletions

View File

@@ -369,7 +369,7 @@ def do_set(nm_client, conn, argv):
idx += 2
continue
if peer and argv[idx] == 'endpoint':
peer.set_endpoint(argv_get_one(argv, idx + 1, None, idx))
peer.set_endpoint(argv_get_one(argv, idx + 1, None, idx), True)
idx += 2
continue
if peer and argv[idx] == 'persistent-keepalive':