cli/wireguard: add import functionality for WireGuard
Support importing ".conf" files as `wg-quick up` supports it.
`wg-quick` parses several options under "[Interface]" and
passes the remainder to `wg setconf`.
The PreUp/PreDown/PostUp/PostDown options are of course not supported.
"Table" for the moment behaves different.
(cherry picked from commit a3a8583c31
)
This commit is contained in:
@@ -672,6 +672,8 @@ nm_utils_parse_inaddr_prefix_bin (int addr_family,
|
||||
return FALSE;
|
||||
|
||||
if (slash) {
|
||||
/* For IPv4, `ip addr add` supports the prefix-length as a netmask. We don't
|
||||
* do that. */
|
||||
prefix = _nm_utils_ascii_str_to_int64 (slash + 1, 10,
|
||||
0,
|
||||
addr_family == AF_INET ? 32 : 128,
|
||||
|
Reference in New Issue
Block a user