connection: Support connection.ip-ping-addresses
We have encountered multiple incidents where users face connectivity issues after booting, particularly due to hardware like switches that do not pass traffic for a few seconds after startup. And services such as NFS fail to mount because they try to initiate before the network is fully reachable. Therefore, we are supporting `connection.ip-ping-addresses` and `connection.ip-ping-timeout` to allow administrators to configure the network to verify connectivity to a specific target(such as a service like NFS) instead of relying on gateway reachability, which may not always be relevant in certain network configurations. Resolves: https://issues.redhat.com/browse/RHEL-21160 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2034 https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1797
This commit is contained in:
@@ -868,6 +868,10 @@ ipv6.ip6-privacy=0
|
||||
<term><varname>connection.down-on-poweroff</varname></term>
|
||||
<listitem><para>Whether the connection will be brought down before the system is powered off.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>connection.ip-ping-addresses-require-all</varname></term>
|
||||
<listitem><para>Whether it is sufficient for any ping check to succeed among the list of target addresses, or if all ping checks must succeed for the entire list of target addresses.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>connection.mud-url</varname></term>
|
||||
<listitem><para>If unspecified, MUD URL defaults to <literal>"none"</literal>.</para></listitem>
|
||||
|
@@ -697,16 +697,6 @@ typedef struct _NMDevicePrivate {
|
||||
bool previous_mode_has : 1;
|
||||
} addrgenmode6_data;
|
||||
|
||||
struct {
|
||||
NMLogDomain log_domain;
|
||||
guint timeout;
|
||||
guint watch;
|
||||
GPid pid;
|
||||
char *binary;
|
||||
char *address;
|
||||
guint deadline;
|
||||
} gw_ping;
|
||||
|
||||
/* Firewall */
|
||||
FirewallState fw_state : 4;
|
||||
NMFirewalldManager *fw_mgr;
|
||||
@@ -784,6 +774,8 @@ typedef struct _NMDevicePrivate {
|
||||
|
||||
GVariant *ports_variant; /* Array of port devices D-Bus path */
|
||||
char *prop_ip_iface; /* IP interface D-Bus property */
|
||||
GList *ping_operations;
|
||||
GSource *ping_timeout;
|
||||
} NMDevicePrivate;
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE(NMDevice, nm_device, NM_TYPE_DBUS_OBJECT)
|
||||
@@ -2107,6 +2099,30 @@ _prop_get_ipvx_dhcp_send_hostname(NMDevice *self, int addr_family)
|
||||
return send_hostname_v2;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_prop_get_connection_ip_ping_addresses_require_all(NMDevice *self, NMSettingConnection *s_con)
|
||||
{
|
||||
NMTernary ip_ping_addresses_require_all;
|
||||
const char *s;
|
||||
|
||||
ip_ping_addresses_require_all = nm_setting_connection_get_ip_ping_addresses_require_all(s_con);
|
||||
|
||||
if (ip_ping_addresses_require_all != NM_TERNARY_DEFAULT) {
|
||||
return ip_ping_addresses_require_all;
|
||||
} else {
|
||||
s = nm_config_data_get_connection_default(
|
||||
NM_CONFIG_GET_DATA,
|
||||
NM_CON_DEFAULT("connection.ip-ping-addresses-require-all"),
|
||||
self);
|
||||
|
||||
if (s) {
|
||||
return _nm_utils_ascii_str_to_bool(s, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
_prop_get_connection_mud_url(NMDevice *self, NMSettingConnection *s_con)
|
||||
{
|
||||
@@ -14796,6 +14812,37 @@ _dispatcher_complete_proceed_state(NMDispatcherCallId *call_id, gpointer user_da
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
NMLogDomain log_domain;
|
||||
NMDevice *device;
|
||||
gboolean ping_addresses_require_all;
|
||||
GSource *watch;
|
||||
GPid pid;
|
||||
char *binary;
|
||||
char *address;
|
||||
guint deadline;
|
||||
} PingOperation;
|
||||
|
||||
static PingOperation *
|
||||
ping_operation_new(NMDevice *self,
|
||||
NMLogDomain log_domain,
|
||||
const char *address,
|
||||
const char *ping_binary,
|
||||
guint ping_timeout,
|
||||
gboolean ip_ping_addresses_require_all)
|
||||
{
|
||||
PingOperation *ping_op = g_new0(PingOperation, 1);
|
||||
|
||||
ping_op->device = self;
|
||||
ping_op->log_domain = log_domain;
|
||||
ping_op->address = g_strdup(address);
|
||||
ping_op->binary = g_strdup(ping_binary);
|
||||
ping_op->deadline = ping_timeout + 10;
|
||||
ping_op->ping_addresses_require_all = ip_ping_addresses_require_all;
|
||||
|
||||
return ping_op;
|
||||
}
|
||||
|
||||
static void
|
||||
ip_check_pre_up(NMDevice *self)
|
||||
{
|
||||
@@ -14818,49 +14865,50 @@ ip_check_pre_up(NMDevice *self)
|
||||
}
|
||||
|
||||
static void
|
||||
ip_check_gw_ping_cleanup(NMDevice *self)
|
||||
cleanup_ping_operation(PingOperation *ping_op)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
if (ping_op->watch) {
|
||||
nm_clear_g_source_inst(&ping_op->watch);
|
||||
}
|
||||
|
||||
nm_clear_g_source(&priv->gw_ping.watch);
|
||||
nm_clear_g_source(&priv->gw_ping.timeout);
|
||||
|
||||
if (priv->gw_ping.pid) {
|
||||
nm_utils_kill_child_async(priv->gw_ping.pid,
|
||||
if (ping_op->pid) {
|
||||
nm_utils_kill_child_async(ping_op->pid,
|
||||
SIGTERM,
|
||||
priv->gw_ping.log_domain,
|
||||
ping_op->log_domain,
|
||||
"ping",
|
||||
1000,
|
||||
NULL,
|
||||
NULL);
|
||||
priv->gw_ping.pid = 0;
|
||||
ping_op->pid = 0;
|
||||
}
|
||||
|
||||
nm_clear_g_free(&priv->gw_ping.binary);
|
||||
nm_clear_g_free(&priv->gw_ping.address);
|
||||
nm_clear_g_free(&ping_op->binary);
|
||||
nm_clear_g_free(&ping_op->address);
|
||||
|
||||
g_free(ping_op);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
spawn_ping(NMDevice *self)
|
||||
spawn_ping_for_operation(NMDevice *self, PingOperation *ping_op)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
gs_free char *str_timeout = NULL;
|
||||
gs_free char *tmp_str = NULL;
|
||||
const char *args[] = {priv->gw_ping.binary,
|
||||
const char *args[] = {ping_op->binary,
|
||||
"-I",
|
||||
nm_device_get_ip_iface(self),
|
||||
"-c",
|
||||
"1",
|
||||
"-w",
|
||||
NULL,
|
||||
priv->gw_ping.address,
|
||||
ping_op->address,
|
||||
NULL};
|
||||
gs_free_error GError *error = NULL;
|
||||
gboolean ret;
|
||||
|
||||
args[6] = str_timeout = g_strdup_printf("%u", priv->gw_ping.deadline);
|
||||
tmp_str = g_strjoinv(" ", (char **) args);
|
||||
_LOGD(priv->gw_ping.log_domain, "ping: running '%s'", tmp_str);
|
||||
args[6] = str_timeout = g_strdup_printf("%u", ping_op->deadline);
|
||||
|
||||
tmp_str = g_strjoinv(" ", (char **) args);
|
||||
_LOGD(ping_op->log_domain, "ping: running '%s'", tmp_str);
|
||||
|
||||
ret = g_spawn_async("/",
|
||||
(char **) args,
|
||||
@@ -14868,14 +14916,13 @@ spawn_ping(NMDevice *self)
|
||||
G_SPAWN_DO_NOT_REAP_CHILD,
|
||||
NULL,
|
||||
NULL,
|
||||
&priv->gw_ping.pid,
|
||||
&ping_op->pid,
|
||||
&error);
|
||||
|
||||
if (!ret) {
|
||||
_LOGW(priv->gw_ping.log_domain,
|
||||
"ping: could not spawn %s: %s",
|
||||
priv->gw_ping.binary,
|
||||
error->message);
|
||||
if (ret) {
|
||||
ping_op->watch = nm_g_child_watch_add_source(ping_op->pid, ip_check_ping_watch_cb, ping_op);
|
||||
} else {
|
||||
_LOGD(ping_op->log_domain, "ping: could not spawn %s: %s", ping_op->binary, error->message);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -14884,16 +14931,19 @@ spawn_ping(NMDevice *self)
|
||||
static gboolean
|
||||
respawn_ping_cb(gpointer user_data)
|
||||
{
|
||||
NMDevice *self = NM_DEVICE(user_data);
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
PingOperation *ping_op = (PingOperation *) user_data;
|
||||
NMDevice *self = ping_op->device;
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
|
||||
priv->gw_ping.watch = 0;
|
||||
nm_clear_g_source_inst(&ping_op->watch);
|
||||
|
||||
if (spawn_ping(self)) {
|
||||
priv->gw_ping.watch = g_child_watch_add(priv->gw_ping.pid, ip_check_ping_watch_cb, self);
|
||||
} else {
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
ip_check_pre_up(self);
|
||||
if (!spawn_ping_for_operation(self, ping_op)) {
|
||||
cleanup_ping_operation(ping_op);
|
||||
priv->ping_operations = g_list_remove(priv->ping_operations, ping_op);
|
||||
|
||||
if (g_list_length(priv->ping_operations) == 0) {
|
||||
ip_check_pre_up(self);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -14902,34 +14952,64 @@ respawn_ping_cb(gpointer user_data)
|
||||
static void
|
||||
ip_check_ping_watch_cb(GPid pid, int status, gpointer user_data)
|
||||
{
|
||||
NMDevice *self = NM_DEVICE(user_data);
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
NMLogDomain log_domain = priv->gw_ping.log_domain;
|
||||
gboolean success = FALSE;
|
||||
PingOperation *ping_op = (PingOperation *) user_data;
|
||||
NMDevice *self = ping_op->device;
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
gboolean success = FALSE;
|
||||
|
||||
if (!priv->gw_ping.watch)
|
||||
if (!ping_op->watch)
|
||||
return;
|
||||
priv->gw_ping.watch = 0;
|
||||
priv->gw_ping.pid = 0;
|
||||
|
||||
nm_clear_g_source_inst(&ping_op->watch);
|
||||
ping_op->pid = 0;
|
||||
|
||||
if (WIFEXITED(status)) {
|
||||
if (WEXITSTATUS(status) == 0) {
|
||||
_LOGD(log_domain, "ping: gateway ping succeeded");
|
||||
_LOGD(ping_op->log_domain, "ping: ping succeeded on %s", ping_op->address);
|
||||
success = TRUE;
|
||||
} else {
|
||||
_LOGW(log_domain, "ping: gateway ping failed with error code %d", WEXITSTATUS(status));
|
||||
_LOGD(ping_op->log_domain,
|
||||
"ping: ping failed with error code %d on %s",
|
||||
WEXITSTATUS(status),
|
||||
ping_op->address);
|
||||
}
|
||||
} else
|
||||
_LOGW(log_domain, "ping: stopped unexpectedly with status %d", status);
|
||||
} else {
|
||||
_LOGD(ping_op->log_domain,
|
||||
"ping: stopped unexpectedly with status %d on %s",
|
||||
status,
|
||||
ping_op->address);
|
||||
}
|
||||
|
||||
if (success) {
|
||||
/* We've got connectivity, proceed to pre_up */
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
ip_check_pre_up(self);
|
||||
if (ping_op->ping_addresses_require_all) {
|
||||
cleanup_ping_operation(ping_op);
|
||||
priv->ping_operations = g_list_remove(priv->ping_operations, ping_op);
|
||||
if (g_list_length(priv->ping_operations) == 0) {
|
||||
_LOGD(ping_op->log_domain,
|
||||
"ping: ip-ping-addresses requires all, all ping checks on ip-ping-addresses "
|
||||
"succeeded");
|
||||
if (priv->ping_timeout)
|
||||
nm_clear_g_source_inst(&priv->ping_timeout);
|
||||
ip_check_pre_up(self);
|
||||
}
|
||||
} else {
|
||||
nm_assert(priv->ping_operations);
|
||||
|
||||
g_list_free_full(priv->ping_operations, (GDestroyNotify) cleanup_ping_operation);
|
||||
priv->ping_operations = NULL;
|
||||
|
||||
if (priv->ping_timeout)
|
||||
nm_clear_g_source_inst(&priv->ping_timeout);
|
||||
|
||||
_LOGD(ping_op->log_domain,
|
||||
"ping: ip-ping-addresses requires any, one ping check on ip-ping-addresses "
|
||||
"succeeded");
|
||||
ip_check_pre_up(self);
|
||||
}
|
||||
} else {
|
||||
/* If ping exited with an error it may have returned early,
|
||||
* wait 1 second and restart it */
|
||||
priv->gw_ping.watch = g_timeout_add_seconds(1, respawn_ping_cb, self);
|
||||
ping_op->watch = nm_g_timeout_add_seconds_source(1, respawn_ping_cb, ping_op);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14939,39 +15019,31 @@ ip_check_ping_timeout_cb(gpointer user_data)
|
||||
NMDevice *self = NM_DEVICE(user_data);
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
|
||||
priv->gw_ping.timeout = 0;
|
||||
_LOGW(LOGD_DEVICE, "ping timeout: unreachable gateway or ip-ping-addresses");
|
||||
|
||||
_LOGW(priv->gw_ping.log_domain, "ping: gateway ping timed out");
|
||||
if (priv->ping_operations) {
|
||||
g_list_free_full(priv->ping_operations, (GDestroyNotify) cleanup_ping_operation);
|
||||
priv->ping_operations = NULL;
|
||||
}
|
||||
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
if (priv->ping_timeout)
|
||||
nm_clear_g_source_inst(&priv->ping_timeout);
|
||||
ip_check_pre_up(self);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
start_ping(NMDevice *self,
|
||||
NMLogDomain log_domain,
|
||||
const char *binary,
|
||||
const char *address,
|
||||
guint timeout)
|
||||
start_ping(NMDevice *self, PingOperation *ping_op)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
|
||||
g_return_val_if_fail(priv->gw_ping.watch == 0, FALSE);
|
||||
g_return_val_if_fail(priv->gw_ping.timeout == 0, FALSE);
|
||||
|
||||
priv->gw_ping.log_domain = log_domain;
|
||||
priv->gw_ping.address = g_strdup(address);
|
||||
priv->gw_ping.binary = g_strdup(binary);
|
||||
priv->gw_ping.deadline = timeout + 10; /* the proper termination is enforced by a timer */
|
||||
|
||||
if (spawn_ping(self)) {
|
||||
priv->gw_ping.watch = g_child_watch_add(priv->gw_ping.pid, ip_check_ping_watch_cb, self);
|
||||
priv->gw_ping.timeout = g_timeout_add_seconds(timeout, ip_check_ping_timeout_cb, self);
|
||||
if (spawn_ping_for_operation(self, ping_op)) {
|
||||
priv->ping_operations = g_list_append(priv->ping_operations, ping_op);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
cleanup_ping_operation(ping_op);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -14981,18 +15053,19 @@ nm_device_start_ip_check(NMDevice *self)
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
NMConnection *connection;
|
||||
NMSettingConnection *s_con;
|
||||
guint timeout = 0;
|
||||
const char *ping_binary = NULL;
|
||||
guint gw_ping_timeout = 0;
|
||||
guint ip_ping_timeout = 0;
|
||||
const char *ping_binary = NULL;
|
||||
char buf[NM_INET_ADDRSTRLEN];
|
||||
NMLogDomain log_domain = LOGD_IP4;
|
||||
gboolean ip_ping_addresses_require_all;
|
||||
gboolean ping_started = FALSE;
|
||||
|
||||
/* Shouldn't be any active ping here, since IP_CHECK happens after the
|
||||
* first IP method completes. Any subsequently completing IP method doesn't
|
||||
* get checked.
|
||||
*/
|
||||
g_return_if_fail(!priv->gw_ping.watch);
|
||||
g_return_if_fail(!priv->gw_ping.timeout);
|
||||
g_return_if_fail(!priv->gw_ping.pid);
|
||||
g_return_if_fail(priv->ping_operations == NULL);
|
||||
g_return_if_fail(priv->ip_data_4.state == NM_DEVICE_IP_STATE_READY
|
||||
|| priv->ip_data_6.state == NM_DEVICE_IP_STATE_READY);
|
||||
|
||||
@@ -15001,10 +15074,12 @@ nm_device_start_ip_check(NMDevice *self)
|
||||
|
||||
s_con = nm_connection_get_setting_connection(connection);
|
||||
g_assert(s_con);
|
||||
timeout = nm_setting_connection_get_gateway_ping_timeout(s_con);
|
||||
gw_ping_timeout = nm_setting_connection_get_gateway_ping_timeout(s_con);
|
||||
ip_ping_addresses_require_all = _prop_get_connection_ip_ping_addresses_require_all(self, s_con);
|
||||
ip_ping_timeout = nm_setting_connection_get_ip_ping_timeout(s_con);
|
||||
|
||||
buf[0] = '\0';
|
||||
if (timeout) {
|
||||
if (gw_ping_timeout != 0 && ip_ping_timeout == 0) {
|
||||
const NMPObject *gw;
|
||||
const NML3ConfigData *l3cd;
|
||||
|
||||
@@ -15030,11 +15105,68 @@ nm_device_start_ip_check(NMDevice *self)
|
||||
}
|
||||
}
|
||||
|
||||
if (buf[0])
|
||||
start_ping(self, log_domain, ping_binary, buf, timeout);
|
||||
if (buf[0]) {
|
||||
PingOperation *ping_op = ping_operation_new(self,
|
||||
log_domain,
|
||||
buf,
|
||||
ping_binary,
|
||||
gw_ping_timeout,
|
||||
ip_ping_addresses_require_all);
|
||||
|
||||
/* If no ping was started, just advance to pre_up */
|
||||
if (!priv->gw_ping.pid)
|
||||
if (start_ping(self, ping_op))
|
||||
ping_started = TRUE;
|
||||
}
|
||||
|
||||
if (gw_ping_timeout == 0 && ip_ping_timeout != 0) {
|
||||
const NML3ConfigData *l3cd;
|
||||
guint i;
|
||||
GArray *ip_ping_addresses = _nm_setting_connection_get_ip_ping_addresses(s_con);
|
||||
const char *const *strv = nm_strvarray_get_strv_notempty(ip_ping_addresses, NULL);
|
||||
|
||||
_LOGD(LOGD_DEVICE, "starting ping ip addresses...");
|
||||
|
||||
l3cd = priv->l3cfg ? nm_l3cfg_get_combined_l3cd(priv->l3cfg, TRUE) : NULL;
|
||||
|
||||
if (l3cd) {
|
||||
for (i = 0; strv[i]; i++) {
|
||||
const char *s = strv[i];
|
||||
struct in_addr ipv4_addr;
|
||||
struct in6_addr ipv6_addr;
|
||||
|
||||
if (priv->ip_data_4.state == NM_DEVICE_IP_STATE_READY
|
||||
&& inet_pton(AF_INET, (const char *) s, &ipv4_addr)) {
|
||||
ping_binary = nm_utils_find_helper("ping", "/usr/bin/ping", NULL);
|
||||
log_domain = LOGD_IP4;
|
||||
} else if (priv->ip_data_6.state == NM_DEVICE_IP_STATE_READY
|
||||
&& inet_pton(AF_INET6, (const char *) s, &ipv6_addr)) {
|
||||
ping_binary = nm_utils_find_helper("ping6", "/usr/bin/ping6", NULL);
|
||||
log_domain = LOGD_IP6;
|
||||
} else
|
||||
continue;
|
||||
|
||||
if (s[0]) {
|
||||
PingOperation *ping_op = ping_operation_new(self,
|
||||
log_domain,
|
||||
s,
|
||||
ping_binary,
|
||||
ip_ping_timeout,
|
||||
ip_ping_addresses_require_all);
|
||||
|
||||
if (start_ping(self, ping_op))
|
||||
ping_started = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ping_started) {
|
||||
priv->ping_timeout =
|
||||
nm_g_timeout_add_seconds_source(gw_ping_timeout ? gw_ping_timeout : ip_ping_timeout,
|
||||
ip_check_ping_timeout_cb,
|
||||
self);
|
||||
}
|
||||
/* If no ping was started, just advance to pre_up. */
|
||||
else
|
||||
ip_check_pre_up(self);
|
||||
}
|
||||
|
||||
@@ -16493,7 +16625,14 @@ _cancel_activation(NMDevice *self)
|
||||
}
|
||||
|
||||
_dispatcher_cleanup(self);
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
|
||||
if (priv->ping_operations) {
|
||||
g_list_free_full(priv->ping_operations, (GDestroyNotify) cleanup_ping_operation);
|
||||
priv->ping_operations = NULL;
|
||||
}
|
||||
|
||||
if (priv->ping_timeout)
|
||||
nm_clear_g_source_inst(&priv->ping_timeout);
|
||||
|
||||
_dev_ip_state_cleanup(self, AF_INET, FALSE);
|
||||
_dev_ip_state_cleanup(self, AF_INET6, FALSE);
|
||||
@@ -17227,7 +17366,12 @@ _set_state_full(NMDevice *self, NMDeviceState state, NMDeviceStateReason reason,
|
||||
break;
|
||||
}
|
||||
case NM_DEVICE_STATE_SECONDARIES:
|
||||
ip_check_gw_ping_cleanup(self);
|
||||
if (priv->ping_operations) {
|
||||
g_list_free_full(priv->ping_operations, (GDestroyNotify) cleanup_ping_operation);
|
||||
priv->ping_operations = NULL;
|
||||
}
|
||||
if (priv->ping_timeout)
|
||||
nm_clear_g_source_inst(&priv->ping_timeout);
|
||||
_LOGD(LOGD_DEVICE, "device entered SECONDARIES state");
|
||||
break;
|
||||
default:
|
||||
|
@@ -2036,4 +2036,11 @@ global:
|
||||
nm_setting_ipvlan_mode_get_type;
|
||||
nm_setting_ipvlan_new;
|
||||
nm_setting_ip_config_get_dhcp_send_hostname_v2;
|
||||
nm_setting_connection_get_ip_ping_address;
|
||||
nm_setting_connection_get_ip_ping_timeout;
|
||||
nm_setting_connection_add_ip_ping_address;
|
||||
nm_setting_connection_remove_ip_ping_address;
|
||||
nm_setting_connection_clear_ip_ping_addresses;
|
||||
nm_setting_connection_remove_ip_ping_address_by_value;
|
||||
nm_setting_connection_get_ip_ping_addresses_require_all;
|
||||
} libnm_1_50_0;
|
||||
|
@@ -826,6 +826,18 @@
|
||||
dbus-type="s"
|
||||
gprop-type="gchararray"
|
||||
/>
|
||||
<property name="ip-ping-addresses"
|
||||
dbus-type="as"
|
||||
gprop-type="GStrv"
|
||||
/>
|
||||
<property name="ip-ping-addresses-require-all"
|
||||
dbus-type="i"
|
||||
gprop-type="gint"
|
||||
/>
|
||||
<property name="ip-ping-timeout"
|
||||
dbus-type="u"
|
||||
gprop-type="guint"
|
||||
/>
|
||||
<property name="lldp"
|
||||
dbus-type="i"
|
||||
gprop-type="gint"
|
||||
|
@@ -29,6 +29,10 @@ const char *_nm_connection_detect_bluetooth_type(NMConnection *self);
|
||||
|
||||
gboolean _nm_setting_connection_verify_secondaries(GArray *secondaries, GError **error);
|
||||
|
||||
gboolean _nm_setting_connection_verify_no_duplicate_addresses(GArray *secondaries, GError **error);
|
||||
|
||||
int _get_ip_address_family(const char *ip_address);
|
||||
|
||||
gboolean _nm_connection_verify_required_interface_name(NMConnection *connection, GError **error);
|
||||
|
||||
int _nm_setting_ovs_interface_verify_interface_type(NMSettingOvsInterface *self,
|
||||
|
@@ -959,6 +959,40 @@ out:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_nm_setting_connection_verify_no_duplicate_addresses(GArray *addresses, GError **error)
|
||||
{
|
||||
guint i, j;
|
||||
|
||||
if (addresses->len <= 1) {
|
||||
return TRUE;
|
||||
} else {
|
||||
for (i = 0; i < addresses->len - 1; i++) {
|
||||
for (j = i + 1; j < addresses->len; j++) {
|
||||
if (nm_streq0(nm_g_array_index(addresses, const char *, i),
|
||||
nm_g_array_index(addresses, const char *, j)))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
_get_ip_address_family(const char *ip_address)
|
||||
{
|
||||
struct in_addr ipv4_addr;
|
||||
struct in6_addr ipv6_addr;
|
||||
|
||||
if (inet_pton(AF_INET, ip_address, &ipv4_addr))
|
||||
return AF_INET;
|
||||
else if (inet_pton(AF_INET6, ip_address, &ipv6_addr))
|
||||
return AF_INET6;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_normalize_connection_secondaries(NMConnection *self)
|
||||
{
|
||||
@@ -997,6 +1031,48 @@ _normalize_connection_secondaries(NMConnection *self)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_normalize_connection_ip_ping_addresses(NMConnection *self)
|
||||
{
|
||||
NMSettingConnection *s_con = nm_connection_get_setting_connection(self);
|
||||
GArray *addresses;
|
||||
gs_strfreev char **strv = NULL;
|
||||
guint i, j, k;
|
||||
|
||||
nm_assert(s_con);
|
||||
|
||||
addresses = _nm_setting_connection_get_ip_ping_addresses(s_con);
|
||||
if (nm_g_array_len(addresses) == 0)
|
||||
return FALSE;
|
||||
|
||||
if (_nm_setting_connection_verify_no_duplicate_addresses(addresses, NULL))
|
||||
return FALSE;
|
||||
|
||||
strv = nm_strvarray_get_strv_notempty_dup(addresses, NULL);
|
||||
|
||||
for (i = 0, j = 0; strv[i]; i++) {
|
||||
gboolean found = FALSE;
|
||||
|
||||
for (k = 0; k < j; k++) {
|
||||
if (nm_streq0(strv[i], strv[k])) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found) {
|
||||
continue;
|
||||
}
|
||||
|
||||
strv[j++] = strv[i];
|
||||
}
|
||||
strv[j] = NULL;
|
||||
|
||||
g_object_set(s_con, NM_SETTING_CONNECTION_IP_PING_ADDRESSES, strv, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_normalize_connection_type(NMConnection *self)
|
||||
{
|
||||
@@ -2049,6 +2125,7 @@ _connection_normalize(NMConnection *connection,
|
||||
was_modified |= _normalize_connection_type(connection);
|
||||
was_modified |= _normalize_connection_port_type(connection);
|
||||
was_modified |= _normalize_connection_secondaries(connection);
|
||||
was_modified |= _normalize_connection_ip_ping_addresses(connection);
|
||||
was_modified |= _normalize_connection(connection);
|
||||
was_modified |= _normalize_required_settings(connection);
|
||||
was_modified |= _normalize_invalid_port_port_settings(connection);
|
||||
|
@@ -63,6 +63,9 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMSettingConnection,
|
||||
PROP_AUTOCONNECT_PORTS,
|
||||
PROP_SECONDARIES,
|
||||
PROP_GATEWAY_PING_TIMEOUT,
|
||||
PROP_IP_PING_TIMEOUT,
|
||||
PROP_IP_PING_ADDRESSES,
|
||||
PROP_IP_PING_ADDRESSES_REQUIRE_ALL,
|
||||
PROP_METERED,
|
||||
PROP_LLDP,
|
||||
PROP_MDNS,
|
||||
@@ -91,6 +94,7 @@ typedef struct {
|
||||
guint64 timestamp;
|
||||
int autoconnect_ports;
|
||||
int down_on_poweroff;
|
||||
int ip_ping_addresses_require_all;
|
||||
int metered;
|
||||
gint32 autoconnect_priority;
|
||||
gint32 autoconnect_retries;
|
||||
@@ -104,6 +108,8 @@ typedef struct {
|
||||
gint32 wait_activation_delay;
|
||||
guint32 mptcp_flags;
|
||||
guint32 gateway_ping_timeout;
|
||||
NMValueStrv ip_ping_addresses;
|
||||
guint32 ip_ping_timeout;
|
||||
bool autoconnect;
|
||||
bool read_only;
|
||||
} NMSettingConnectionPrivate;
|
||||
@@ -1037,6 +1043,172 @@ nm_setting_connection_get_gateway_ping_timeout(NMSettingConnection *setting)
|
||||
return NM_SETTING_CONNECTION_GET_PRIVATE(setting)->gateway_ping_timeout;
|
||||
}
|
||||
|
||||
GArray *
|
||||
_nm_setting_connection_get_ip_ping_addresses(NMSettingConnection *setting)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), NULL);
|
||||
|
||||
return NM_SETTING_CONNECTION_GET_PRIVATE(setting)->ip_ping_addresses.arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_get_ip_ping_address:
|
||||
* @setting: the #NMSettingConnection
|
||||
* @idx: the zero-based index of the ip-ping-addresses entry.
|
||||
*
|
||||
* Returns: the ip address string at index @idx or
|
||||
* %NULL if @idx is the number of ip-ping-addresses.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
const char *
|
||||
nm_setting_connection_get_ip_ping_address(NMSettingConnection *setting, guint32 idx)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), NULL);
|
||||
|
||||
return nm_strvarray_get_idxnull_or_greturn(
|
||||
NM_SETTING_CONNECTION_GET_PRIVATE(setting)->ip_ping_addresses.arr,
|
||||
idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_add_ip_ping_address:
|
||||
* @setting: the #NMSettingConnection
|
||||
* @address: the IP address string to add
|
||||
*
|
||||
* Adds a new IP address string to the ip-ping-addresses.
|
||||
*
|
||||
* Returns: %TRUE if the new IP address was added; %FALSE if the IP address
|
||||
* was already present
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
gboolean
|
||||
nm_setting_connection_add_ip_ping_address(NMSettingConnection *setting, const char *address)
|
||||
{
|
||||
NMSettingConnectionPrivate *priv;
|
||||
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), FALSE);
|
||||
g_return_val_if_fail(address, FALSE);
|
||||
|
||||
priv = NM_SETTING_CONNECTION_GET_PRIVATE(setting);
|
||||
|
||||
if (!nm_strvarray_ensure_and_add_unique(&priv->ip_ping_addresses.arr, address))
|
||||
return FALSE;
|
||||
|
||||
_notify(setting, PROP_IP_PING_ADDRESSES);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_remove_ip_ping_address:
|
||||
* @setting: the #NMSettingConnection
|
||||
* @idx: index number of the IP address
|
||||
*
|
||||
* Removes the IP address at index @idx.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
void
|
||||
nm_setting_connection_remove_ip_ping_address(NMSettingConnection *setting, guint32 idx)
|
||||
{
|
||||
NMSettingConnectionPrivate *priv;
|
||||
|
||||
g_return_if_fail(NM_IS_SETTING_CONNECTION(setting));
|
||||
|
||||
priv = NM_SETTING_CONNECTION_GET_PRIVATE(setting);
|
||||
|
||||
g_return_if_fail(idx < nm_g_array_len(priv->ip_ping_addresses.arr));
|
||||
|
||||
nm_strvarray_remove_index(priv->ip_ping_addresses.arr, idx);
|
||||
_notify(setting, PROP_IP_PING_ADDRESSES);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_remove_ip_ping_address_by_value:
|
||||
* @setting: the #NMSettingConnection
|
||||
* @address: the IP address to remove
|
||||
*
|
||||
* Removes the IP address @address from ip-ping-addresses.
|
||||
*
|
||||
* Returns: %TRUE if the IP address was found and removed; %FALSE if it was not.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
gboolean
|
||||
nm_setting_connection_remove_ip_ping_address_by_value(NMSettingConnection *setting,
|
||||
const char *address)
|
||||
{
|
||||
NMSettingConnectionPrivate *priv;
|
||||
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), FALSE);
|
||||
g_return_val_if_fail(address, FALSE);
|
||||
|
||||
priv = NM_SETTING_CONNECTION_GET_PRIVATE(setting);
|
||||
|
||||
if (!nm_strvarray_remove_first(priv->ip_ping_addresses.arr, address))
|
||||
return FALSE;
|
||||
|
||||
_notify(setting, PROP_IP_PING_ADDRESSES);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_clear_ip_ping_addresses:
|
||||
* @setting: the #NMSettingConnection
|
||||
*
|
||||
* Removes all configured ip-ping-addresses.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
void
|
||||
nm_setting_connection_clear_ip_ping_addresses(NMSettingConnection *setting)
|
||||
{
|
||||
NMSettingConnectionPrivate *priv;
|
||||
|
||||
g_return_if_fail(NM_IS_SETTING_CONNECTION(setting));
|
||||
|
||||
priv = NM_SETTING_CONNECTION_GET_PRIVATE(setting);
|
||||
|
||||
if (nm_strvarray_clear(&priv->ip_ping_addresses.arr))
|
||||
_notify(setting, PROP_IP_PING_ADDRESSES);
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_get_ip_ping_timeout:
|
||||
* @setting: the #NMSettingConnection
|
||||
*
|
||||
* Returns: the value contained in the #NMSettingConnection:ip-ping-timeout
|
||||
* property.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
guint32
|
||||
nm_setting_connection_get_ip_ping_timeout(NMSettingConnection *setting)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), 0);
|
||||
|
||||
return NM_SETTING_CONNECTION_GET_PRIVATE(setting)->ip_ping_timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_get_ip_ping_addresses_require_all:
|
||||
* @setting: the #NMSettingConnection
|
||||
*
|
||||
* Returns the #NMSettingConnection:ip-ping-addresses-require-all property of the connection.
|
||||
*
|
||||
* Returns: whether all the ip ping addresses pass the connectivity check.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
NMTernary
|
||||
nm_setting_connection_get_ip_ping_addresses_require_all(NMSettingConnection *setting)
|
||||
{
|
||||
g_return_val_if_fail(NM_IS_SETTING_CONNECTION(setting), NM_TERNARY_DEFAULT);
|
||||
|
||||
return NM_SETTING_CONNECTION_GET_PRIVATE(setting)->ip_ping_addresses_require_all;
|
||||
}
|
||||
|
||||
/**
|
||||
* nm_setting_connection_get_metered:
|
||||
* @setting: the #NMSettingConnection
|
||||
@@ -1610,6 +1782,176 @@ after_interface_name:
|
||||
}
|
||||
}
|
||||
|
||||
if (priv->ip_ping_timeout != 0
|
||||
&& (!priv->ip_ping_addresses.arr || priv->ip_ping_addresses.arr->len == 0)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("can only be set if %s.%s is set"),
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (priv->ip_ping_addresses.arr && priv->ip_ping_addresses.arr->len > 0) {
|
||||
guint i;
|
||||
|
||||
if (priv->ip_ping_timeout == 0) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("can only be set if %s.%s is set"),
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_TIMEOUT);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (priv->gateway_ping_timeout != 0 && priv->ip_ping_timeout != 0) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("is incompatible with '%s'"),
|
||||
NM_SETTING_CONNECTION_IP_PING_TIMEOUT);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < priv->ip_ping_addresses.arr->len; i++) {
|
||||
const char *address = nm_g_array_index(priv->ip_ping_addresses.arr, const char *, i);
|
||||
int addr_family = _get_ip_address_family(address);
|
||||
|
||||
if (addr_family == AF_INET) {
|
||||
NMSettingIPConfig *s_ip4;
|
||||
|
||||
if (connection) {
|
||||
s_ip4 = nm_connection_get_setting_ip4_config(connection);
|
||||
|
||||
if (s_ip4) {
|
||||
const char *method = nm_setting_ip_config_get_method(s_ip4);
|
||||
if (nm_streq0(method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv4 address '%s', %s.%s cannot be 'disabled'"),
|
||||
address,
|
||||
NM_SETTING_IP4_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_METHOD);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
if (nm_setting_ip_config_get_may_fail(s_ip4)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv4 address '%s', %s.%s cannot be 'true'"),
|
||||
address,
|
||||
NM_SETTING_IP4_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_MAY_FAIL);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv4 address '%s', %s.%s must be set to 'false' "
|
||||
"explicitly"),
|
||||
address,
|
||||
NM_SETTING_IP4_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_MAY_FAIL);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
} else if (addr_family == AF_INET6) {
|
||||
NMSettingIPConfig *s_ip6;
|
||||
|
||||
if (connection) {
|
||||
s_ip6 = nm_connection_get_setting_ip6_config(connection);
|
||||
if (s_ip6) {
|
||||
const char *method = nm_setting_ip_config_get_method(s_ip6);
|
||||
if (NM_IN_STRSET(method,
|
||||
NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
|
||||
NM_SETTING_IP6_CONFIG_METHOD_DISABLED)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv6 address '%s', %s.%s cannot be '%s'"),
|
||||
address,
|
||||
NM_SETTING_IP6_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_METHOD,
|
||||
method);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
if (nm_setting_ip_config_get_may_fail(s_ip6)) {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv6 address '%s', %s.%s cannot be 'true'"),
|
||||
address,
|
||||
NM_SETTING_IP6_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_MAY_FAIL);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("contains IPv6 address '%s', %s.%s must be set to 'false' "
|
||||
"explicitly"),
|
||||
address,
|
||||
NM_SETTING_IP6_CONFIG_SETTING_NAME,
|
||||
NM_SETTING_IP_CONFIG_MAY_FAIL);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
g_set_error(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("has an invalid IP address '%s'"),
|
||||
address);
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */
|
||||
|
||||
if (!priv->uuid) {
|
||||
@@ -1711,6 +2053,20 @@ after_interface_name:
|
||||
if (!_nm_setting_connection_verify_secondaries(priv->secondaries.arr, error))
|
||||
return NM_SETTING_VERIFY_NORMALIZABLE;
|
||||
|
||||
if (priv->ip_ping_addresses.arr && priv->ip_ping_addresses.arr->len > 0
|
||||
&& !_nm_setting_connection_verify_no_duplicate_addresses(priv->ip_ping_addresses.arr,
|
||||
error)) {
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
NM_CONNECTION_ERROR_INVALID_PROPERTY,
|
||||
_("has duplicate addresses"));
|
||||
g_prefix_error(error,
|
||||
"%s.%s: ",
|
||||
NM_SETTING_CONNECTION_SETTING_NAME,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES);
|
||||
return NM_SETTING_VERIFY_NORMALIZABLE;
|
||||
}
|
||||
|
||||
if (priv->read_only) {
|
||||
g_set_error_literal(error,
|
||||
NM_CONNECTION_ERROR,
|
||||
@@ -2754,6 +3110,70 @@ nm_setting_connection_class_init(NMSettingConnectionClass *klass)
|
||||
NMSettingConnectionPrivate,
|
||||
secondaries);
|
||||
|
||||
/**
|
||||
* NMSettingConnection:ip-ping-addresses:
|
||||
*
|
||||
* The property specifies a list of target IP addresses for pinging.
|
||||
* When multiple targets are set, NetworkManager will start multiple ping processes
|
||||
* in parallel. This property can only be set if connection.ip-ping-timeout is
|
||||
* set. The ip-ping-timeout is used to delay the success of IP addressing until
|
||||
* either the specified timeout (in seconds) is reached, or an target IP address replies
|
||||
* to a ping. Configuring #NMSettingConnection:ip-ping-addresses may delay reaching the
|
||||
* systemd's network-online.target due to waiting for the ping operations to complete or timeout.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
_nm_setting_property_define_direct_strv(properties_override,
|
||||
obj_properties,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES,
|
||||
PROP_IP_PING_ADDRESSES,
|
||||
NM_SETTING_PARAM_FUZZY_IGNORE,
|
||||
NULL,
|
||||
NMSettingConnectionPrivate,
|
||||
ip_ping_addresses);
|
||||
|
||||
/**
|
||||
* NMSettingConnection:ip-ping-addresses-require-all:
|
||||
*
|
||||
* The property determines whether it is sufficient for any ping check
|
||||
* to succeed among #NMSettingConnection:ip-ping-addresses, or if all
|
||||
* ping checks must succeed for #NMSettingConnection:ip-ping-addresses.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
_nm_setting_property_define_direct_enum(properties_override,
|
||||
obj_properties,
|
||||
NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL,
|
||||
PROP_IP_PING_ADDRESSES_REQUIRE_ALL,
|
||||
NM_TYPE_TERNARY,
|
||||
NM_TERNARY_DEFAULT,
|
||||
NM_SETTING_PARAM_NONE,
|
||||
NULL,
|
||||
NMSettingConnectionPrivate,
|
||||
ip_ping_addresses_require_all);
|
||||
|
||||
/**
|
||||
* NMSettingConnection:ip-ping-timeout:
|
||||
*
|
||||
* If greater than zero, delay success of IP addressing until either the specified
|
||||
* timeout (in seconds) is reached, or a target IP address replies to a ping. The
|
||||
* property specifies the timeout for the #NMSettingConnection:ip-ping-addresses.
|
||||
* This property is incompatible with #NMSettingConnection:gateway-ping-timeout,
|
||||
* you cannot set these two properties at the same time.
|
||||
*
|
||||
* Since: 1.52
|
||||
**/
|
||||
_nm_setting_property_define_direct_uint32(properties_override,
|
||||
obj_properties,
|
||||
NM_SETTING_CONNECTION_IP_PING_TIMEOUT,
|
||||
PROP_IP_PING_TIMEOUT,
|
||||
0,
|
||||
600,
|
||||
0,
|
||||
NM_SETTING_PARAM_NONE,
|
||||
NMSettingConnectionPrivate,
|
||||
ip_ping_timeout);
|
||||
|
||||
/**
|
||||
* NMSettingConnection:gateway-ping-timeout:
|
||||
*
|
||||
|
@@ -4037,6 +4037,9 @@ test_connection_diff_a_only(void)
|
||||
{NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_DOWN_ON_POWEROFF, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_IP_PING_TIMEOUT, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_IP_PING_ADDRESSES, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL, NM_SETTING_DIFF_RESULT_IN_A},
|
||||
{NULL, NM_SETTING_DIFF_RESULT_UNKNOWN}}},
|
||||
{NM_SETTING_WIRED_SETTING_NAME,
|
||||
{
|
||||
|
@@ -548,6 +548,8 @@ GPtrArray *_nm_setting_bridge_port_get_vlans(NMSettingBridgePort *setting);
|
||||
|
||||
GArray *_nm_setting_connection_get_secondaries(NMSettingConnection *setting);
|
||||
|
||||
GArray *_nm_setting_connection_get_ip_ping_addresses(NMSettingConnection *setting);
|
||||
|
||||
gboolean nm_setting_connection_permissions_user_allowed_by_uid(NMSettingConnection *setting,
|
||||
gulong uid);
|
||||
|
||||
|
@@ -33,38 +33,41 @@ G_BEGIN_DECLS
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MAX 999
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT 0
|
||||
|
||||
#define NM_SETTING_CONNECTION_ID "id"
|
||||
#define NM_SETTING_CONNECTION_UUID "uuid"
|
||||
#define NM_SETTING_CONNECTION_STABLE_ID "stable-id"
|
||||
#define NM_SETTING_CONNECTION_INTERFACE_NAME "interface-name"
|
||||
#define NM_SETTING_CONNECTION_TYPE "type"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries"
|
||||
#define NM_SETTING_CONNECTION_MULTI_CONNECT "multi-connect"
|
||||
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
|
||||
#define NM_SETTING_CONNECTION_READ_ONLY "read-only"
|
||||
#define NM_SETTING_CONNECTION_PERMISSIONS "permissions"
|
||||
#define NM_SETTING_CONNECTION_ZONE "zone"
|
||||
#define NM_SETTING_CONNECTION_MASTER "master"
|
||||
#define NM_SETTING_CONNECTION_CONTROLLER "controller"
|
||||
#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type"
|
||||
#define NM_SETTING_CONNECTION_PORT_TYPE "port-type"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES "autoconnect-slaves"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PORTS "autoconnect-ports"
|
||||
#define NM_SETTING_CONNECTION_SECONDARIES "secondaries"
|
||||
#define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT "gateway-ping-timeout"
|
||||
#define NM_SETTING_CONNECTION_METERED "metered"
|
||||
#define NM_SETTING_CONNECTION_LLDP "lldp"
|
||||
#define NM_SETTING_CONNECTION_AUTH_RETRIES "auth-retries"
|
||||
#define NM_SETTING_CONNECTION_MDNS "mdns"
|
||||
#define NM_SETTING_CONNECTION_LLMNR "llmnr"
|
||||
#define NM_SETTING_CONNECTION_DNS_OVER_TLS "dns-over-tls"
|
||||
#define NM_SETTING_CONNECTION_MPTCP_FLAGS "mptcp-flags"
|
||||
#define NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT "wait-device-timeout"
|
||||
#define NM_SETTING_CONNECTION_MUD_URL "mud-url"
|
||||
#define NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY "wait-activation-delay"
|
||||
#define NM_SETTING_CONNECTION_DOWN_ON_POWEROFF "down-on-poweroff"
|
||||
#define NM_SETTING_CONNECTION_ID "id"
|
||||
#define NM_SETTING_CONNECTION_UUID "uuid"
|
||||
#define NM_SETTING_CONNECTION_STABLE_ID "stable-id"
|
||||
#define NM_SETTING_CONNECTION_INTERFACE_NAME "interface-name"
|
||||
#define NM_SETTING_CONNECTION_TYPE "type"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT "autoconnect"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries"
|
||||
#define NM_SETTING_CONNECTION_MULTI_CONNECT "multi-connect"
|
||||
#define NM_SETTING_CONNECTION_TIMESTAMP "timestamp"
|
||||
#define NM_SETTING_CONNECTION_READ_ONLY "read-only"
|
||||
#define NM_SETTING_CONNECTION_PERMISSIONS "permissions"
|
||||
#define NM_SETTING_CONNECTION_ZONE "zone"
|
||||
#define NM_SETTING_CONNECTION_MASTER "master"
|
||||
#define NM_SETTING_CONNECTION_CONTROLLER "controller"
|
||||
#define NM_SETTING_CONNECTION_SLAVE_TYPE "slave-type"
|
||||
#define NM_SETTING_CONNECTION_PORT_TYPE "port-type"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES "autoconnect-slaves"
|
||||
#define NM_SETTING_CONNECTION_AUTOCONNECT_PORTS "autoconnect-ports"
|
||||
#define NM_SETTING_CONNECTION_SECONDARIES "secondaries"
|
||||
#define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT "gateway-ping-timeout"
|
||||
#define NM_SETTING_CONNECTION_METERED "metered"
|
||||
#define NM_SETTING_CONNECTION_LLDP "lldp"
|
||||
#define NM_SETTING_CONNECTION_AUTH_RETRIES "auth-retries"
|
||||
#define NM_SETTING_CONNECTION_MDNS "mdns"
|
||||
#define NM_SETTING_CONNECTION_LLMNR "llmnr"
|
||||
#define NM_SETTING_CONNECTION_DNS_OVER_TLS "dns-over-tls"
|
||||
#define NM_SETTING_CONNECTION_MPTCP_FLAGS "mptcp-flags"
|
||||
#define NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT "wait-device-timeout"
|
||||
#define NM_SETTING_CONNECTION_MUD_URL "mud-url"
|
||||
#define NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY "wait-activation-delay"
|
||||
#define NM_SETTING_CONNECTION_DOWN_ON_POWEROFF "down-on-poweroff"
|
||||
#define NM_SETTING_CONNECTION_IP_PING_TIMEOUT "ip-ping-timeout"
|
||||
#define NM_SETTING_CONNECTION_IP_PING_ADDRESSES "ip-ping-addresses"
|
||||
#define NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL "ip-ping-addresses-require-all"
|
||||
|
||||
/* Types for property values */
|
||||
/**
|
||||
@@ -279,6 +282,28 @@ nm_setting_connection_get_down_on_poweroff(NMSettingConnection *setting);
|
||||
NM_AVAILABLE_IN_1_26
|
||||
const char *nm_setting_connection_get_mud_url(NMSettingConnection *setting);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
guint32 nm_setting_connection_get_ip_ping_timeout(NMSettingConnection *setting);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
const char *nm_setting_connection_get_ip_ping_address(NMSettingConnection *setting, guint32 idx);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
gboolean nm_setting_connection_add_ip_ping_address(NMSettingConnection *setting,
|
||||
const char *address);
|
||||
NM_AVAILABLE_IN_1_52
|
||||
void nm_setting_connection_remove_ip_ping_address(NMSettingConnection *setting, guint32 idx);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
gboolean nm_setting_connection_remove_ip_ping_address_by_value(NMSettingConnection *setting,
|
||||
const char *address);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
void nm_setting_connection_clear_ip_ping_addresses(NMSettingConnection *setting);
|
||||
|
||||
NM_AVAILABLE_IN_1_52
|
||||
NMTernary nm_setting_connection_get_ip_ping_addresses_require_all(NMSettingConnection *setting);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NM_SETTING_CONNECTION_H__ */
|
||||
|
@@ -5661,6 +5661,39 @@ static const NMMetaPropertyInfo *const property_infos_CONNECTION[] = {
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT,
|
||||
.property_type = &_pt_gobject_int,
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_IP_PING_TIMEOUT,
|
||||
.property_type = &_pt_gobject_int,
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_IP_PING_ADDRESSES,
|
||||
.property_type = &_pt_multilist,
|
||||
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
|
||||
PROPERTY_TYP_DATA_SUBTYPE (multilist,
|
||||
.add_fcn = MULTILIST_ADD_FCN (NMSettingConnection, nm_setting_connection_add_ip_ping_address),
|
||||
.remove_by_idx_fcn_u32 = MULTILIST_REMOVE_BY_IDX_FCN_U32 (NMSettingConnection, nm_setting_connection_remove_ip_ping_address),
|
||||
.remove_by_value_fcn = MULTILIST_REMOVE_BY_VALUE_FCN (NMSettingConnection, nm_setting_connection_remove_ip_ping_address_by_value),
|
||||
.clear_all_fcn = OBJLIST_CLEAR_ALL_FCN (NMSettingConnection, nm_setting_connection_clear_ip_ping_addresses),
|
||||
.strsplit_with_spaces = TRUE,
|
||||
),
|
||||
.list_items_doc_format = NM_META_PROPERTY_TYPE_FORMAT_IPV4_IPV6,
|
||||
),
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL,
|
||||
.property_type = &_pt_gobject_enum,
|
||||
.property_typ_data = DEFINE_PROPERTY_TYP_DATA (
|
||||
PROPERTY_TYP_DATA_SUBTYPE (gobject_enum,
|
||||
.value_infos = ENUM_VALUE_INFOS(
|
||||
{
|
||||
.value = 0,
|
||||
.nick = "no",
|
||||
},
|
||||
{
|
||||
.value = 1,
|
||||
.nick = "yes",
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
PROPERTY_INFO_WITH_DESC (NM_SETTING_CONNECTION_METERED,
|
||||
.describe_message =
|
||||
N_("Enter a value which indicates whether the connection is subject to a data\n"
|
||||
|
@@ -197,6 +197,7 @@ typedef enum _nm_packed {
|
||||
NM_META_PROPERTY_TYPE_FORMAT_MAC,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_IPV4,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_IPV6,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_IPV4_IPV6,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_MTU,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_BYTES,
|
||||
NM_META_PROPERTY_TYPE_FORMAT_PATH,
|
||||
|
@@ -12,6 +12,9 @@
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT N_("If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_ID N_("A human readable unique identifier for the connection, like \"Work Wi-Fi\" or \"T-Mobile 3G\".")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_INTERFACE_NAME N_("The name of the network interface this connection is bound to. If not set, then the connection can be attached to any interface of the appropriate type (subject to restrictions imposed by other settings). For software devices this specifies the name of the created device. For connection types where interface names cannot easily be made persistent (e.g. mobile broadband or USB Ethernet), this property should not be used. Setting this property restricts the interfaces a connection can be used with, and if interface names change or are reordered the connection may be applied to the wrong interface.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_IP_PING_ADDRESSES N_("The property specifies a list of target IP addresses for pinging. When multiple targets are set, NetworkManager will start multiple ping processes in parallel. This property can only be set if connection.ip-ping-timeout is set. The ip-ping-timeout is used to delay the success of IP addressing until either the specified timeout (in seconds) is reached, or an target IP address replies to a ping. Configuring \"ip-ping-addresses\" may delay reaching the systemd's network-online.target due to waiting for the ping operations to complete or timeout.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_IP_PING_ADDRESSES_REQUIRE_ALL N_("The property determines whether it is sufficient for any ping check to succeed among \"ip-ping-addresses\", or if all ping checks must succeed for \"ip-ping-addresses\".")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_IP_PING_TIMEOUT N_("If greater than zero, delay success of IP addressing until either the specified timeout (in seconds) is reached, or a target IP address replies to a ping. The property specifies the timeout for the \"ip-ping-addresses\". This property is incompatible with \"gateway-ping-timeout\", you cannot set these two properties at the same time.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLDP N_("Whether LLDP is enabled for the connection.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_LLMNR N_("Whether Link-Local Multicast Name Resolution (LLMNR) is enabled for the connection. LLMNR is a protocol based on the Domain Name System (DNS) packet format that allows both IPv4 and IPv6 hosts to perform name resolution for hosts on the same local link. The permitted values are: \"yes\" (2) register hostname and resolving for the connection, \"no\" (0) disable LLMNR for the interface, \"resolve\" (1) do not register hostname but allow resolving of LLMNR host names If unspecified, \"default\" ultimately depends on the DNS plugin (which for systemd-resolved currently means \"yes\"). This feature requires a plugin which supports LLMNR. Otherwise, the setting has no effect. One such plugin is dns-systemd-resolved.")
|
||||
#define DESCRIBE_DOC_NM_SETTING_CONNECTION_MASTER N_("Interface name of the controller device or UUID of the controller connection. Deprecated 1.46. Use \"controller\" instead, this is just an alias.")
|
||||
|
@@ -158,6 +158,8 @@ get_multilist_format(const NMMetaPropertyInfo *prop_info)
|
||||
return g_strdup("list of IPv4 addresses");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_IPV6:
|
||||
return g_strdup("list of IPv6 addresses");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_IPV4_IPV6:
|
||||
return g_strdup("list of IPv4 or IPv6 addresses");
|
||||
default:
|
||||
prop_abort(prop_info, "unsupported item format (%d)", item_fmt);
|
||||
break;
|
||||
@@ -198,6 +200,8 @@ get_property_format(const NMMetaPropertyInfo *prop_info)
|
||||
return g_strdup("IPv4 address");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_IPV6:
|
||||
return g_strdup("IPv6 address");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_IPV4_IPV6:
|
||||
return g_strdup("IPv4 or IPv6 address");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_BYTES:
|
||||
return g_strdup("bytes");
|
||||
case NM_META_PROPERTY_TYPE_FORMAT_PATH:
|
||||
|
@@ -702,6 +702,17 @@
|
||||
nmcli-description="If greater than zero, delay success of IP addressing until either the timeout is reached, or an IP gateway replies to a ping."
|
||||
format="integer"
|
||||
values="0 - 600" />
|
||||
<property name="ip-ping-timeout"
|
||||
nmcli-description="If greater than zero, delay success of IP addressing until either the specified timeout (in seconds) is reached, or a target IP address replies to a ping. The property specifies the timeout for the "ip-ping-addresses". This property is incompatible with "gateway-ping-timeout", you cannot set these two properties at the same time."
|
||||
format="integer"
|
||||
values="0 - 600" />
|
||||
<property name="ip-ping-addresses"
|
||||
nmcli-description="The property specifies a list of target IP addresses for pinging. When multiple targets are set, NetworkManager will start multiple ping processes in parallel. This property can only be set if connection.ip-ping-timeout is set. The ip-ping-timeout is used to delay the success of IP addressing until either the specified timeout (in seconds) is reached, or an target IP address replies to a ping. Configuring "ip-ping-addresses" may delay reaching the systemd's network-online.target due to waiting for the ping operations to complete or timeout."
|
||||
format="list of IPv4 or IPv6 addresses" />
|
||||
<property name="ip-ping-addresses-require-all"
|
||||
nmcli-description="The property determines whether it is sufficient for any ping check to succeed among "ip-ping-addresses", or if all ping checks must succeed for "ip-ping-addresses"."
|
||||
format="choice (NMTernary)"
|
||||
values="default (-1), false/no (0), true/yes (1)" />
|
||||
<property name="metered"
|
||||
nmcli-description="Whether the connection is metered. When updating this property on a currently activated connection, the change takes effect immediately."
|
||||
format="ternary"
|
||||
|
@@ -502,12 +502,12 @@ NAME UUID TYPE DEVICE
|
||||
con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
|
||||
|
||||
<<<
|
||||
size: 1565
|
||||
size: 1704
|
||||
location: src/tests/client/test-client.py:test_002()/23
|
||||
cmd: $NMCLI c s con-1
|
||||
lang: C
|
||||
returncode: 0
|
||||
stdout: 1437 bytes
|
||||
stdout: 1576 bytes
|
||||
>>>
|
||||
connection.id: con-1
|
||||
connection.uuid: 5fcfd6d7-1e63-3332-8826-a7eda103792d
|
||||
@@ -531,6 +531,9 @@ connection.autoconnect-ports: -1 (default)
|
||||
connection.down-on-poweroff: -1 (default)
|
||||
connection.secondaries: --
|
||||
connection.gateway-ping-timeout: 0
|
||||
connection.ip-ping-timeout: 0
|
||||
connection.ip-ping-addresses: --
|
||||
connection.ip-ping-addresses-require-all:-1 (default)
|
||||
connection.metered: unknown
|
||||
connection.lldp: default
|
||||
connection.mdns: -1 (default)
|
||||
@@ -541,12 +544,12 @@ connection.wait-device-timeout: -1
|
||||
connection.wait-activation-delay: -1
|
||||
|
||||
<<<
|
||||
size: 1576
|
||||
size: 1715
|
||||
location: src/tests/client/test-client.py:test_002()/24
|
||||
cmd: $NMCLI c s con-1
|
||||
lang: pl_PL.UTF-8
|
||||
returncode: 0
|
||||
stdout: 1438 bytes
|
||||
stdout: 1577 bytes
|
||||
>>>
|
||||
connection.id: con-1
|
||||
connection.uuid: 5fcfd6d7-1e63-3332-8826-a7eda103792d
|
||||
@@ -570,6 +573,9 @@ connection.autoconnect-ports: -1 (default)
|
||||
connection.down-on-poweroff: -1 (default)
|
||||
connection.secondaries: --
|
||||
connection.gateway-ping-timeout: 0
|
||||
connection.ip-ping-timeout: 0
|
||||
connection.ip-ping-addresses: --
|
||||
connection.ip-ping-addresses-require-all:-1 (default)
|
||||
connection.metered: nieznane
|
||||
connection.lldp: default
|
||||
connection.mdns: -1 (default)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user