mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 19:50:07 +01:00
libnm-core: ensure a IP tunnel connection specifies a remote IP
The IP of the remote endpoint is always required.
This commit is contained in:
parent
75127b1348
commit
5aea82d383
1 changed files with 10 additions and 1 deletions
|
|
@ -345,7 +345,16 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->remote && !nm_utils_ipaddr_valid (family, priv->remote)) {
|
if (!priv->remote) {
|
||||||
|
g_set_error_literal (error,
|
||||||
|
NM_CONNECTION_ERROR,
|
||||||
|
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||||
|
_("property is missing"));
|
||||||
|
g_prefix_error (error, "%s.%s: ", NM_SETTING_IP_TUNNEL_SETTING_NAME, NM_SETTING_IP_TUNNEL_REMOTE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nm_utils_ipaddr_valid (family, priv->remote)) {
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
NM_CONNECTION_ERROR,
|
NM_CONNECTION_ERROR,
|
||||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue