mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 02:04:17 +00:00
all: fix minor typos
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/565
This commit is contained in:
parent
4c52c69d66
commit
4e33f8cd89
|
@ -287,7 +287,7 @@ matches_arg (NmCli *nmc,
|
||||||
|
|
||||||
if (arg) {
|
if (arg) {
|
||||||
/* If there's a "=" separator, replace it with NUL so that matches()
|
/* If there's a "=" separator, replace it with NUL so that matches()
|
||||||
* works and consider the part after it to be the arguemnt's value. */
|
* works and consider the part after it to be the argument's value. */
|
||||||
s = strchr (opt, '=');
|
s = strchr (opt, '=');
|
||||||
if (s) {
|
if (s) {
|
||||||
opt = nm_strndup_a (300, opt, s - opt, &opt_free);
|
opt = nm_strndup_a (300, opt, s - opt, &opt_free);
|
||||||
|
|
|
@ -371,7 +371,7 @@ _poll_cancelled_cb (GObject *object, gpointer user_data)
|
||||||
* @sleep_timeout_ms: if > 0, then we wait after a probe finished this timeout
|
* @sleep_timeout_ms: if > 0, then we wait after a probe finished this timeout
|
||||||
* before the next. Together with @ratelimit_timeout_ms this determines how
|
* before the next. Together with @ratelimit_timeout_ms this determines how
|
||||||
* frequently we probe.
|
* frequently we probe.
|
||||||
* @probe_start_fcn: used to start a (asynchrnous) probe. A probe must be completed
|
* @probe_start_fcn: used to start a (asynchronous) probe. A probe must be completed
|
||||||
* by calling the provided callback. While a probe is in progress, we will not
|
* by calling the provided callback. While a probe is in progress, we will not
|
||||||
* start another. This function is already invoked the first time synchronously,
|
* start another. This function is already invoked the first time synchronously,
|
||||||
* during nmcs_utils_poll().
|
* during nmcs_utils_poll().
|
||||||
|
|
|
@ -834,7 +834,7 @@ _get_fcn_gobject_impl (const NMMetaPropertyInfo *property_info,
|
||||||
G_TYPE_HASH_TABLE);
|
G_TYPE_HASH_TABLE);
|
||||||
|
|
||||||
if (glib_handles_str_transform) {
|
if (glib_handles_str_transform) {
|
||||||
/* We rely on the type convertion of the gobject property to string. */
|
/* We rely on the type conversion of the gobject property to string. */
|
||||||
g_value_init (&val, G_TYPE_STRING);
|
g_value_init (&val, G_TYPE_STRING);
|
||||||
} else
|
} else
|
||||||
g_value_init (&val, gtype_prop);
|
g_value_init (&val, gtype_prop);
|
||||||
|
@ -3279,7 +3279,7 @@ _set_fcn_objlist (ARGS_SET_FCN)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < nstrv; i++) {
|
for (i = 0; i < nstrv; i++) {
|
||||||
/* FIXME: there is the problem here that set_fcn() might succed on the first item
|
/* FIXME: there is the problem here that set_fcn() might succeed on the first item
|
||||||
* (modifying it), and fail to parse the second one.
|
* (modifying it), and fail to parse the second one.
|
||||||
*
|
*
|
||||||
* Optimally, we would first parse all input strings before starting the
|
* Optimally, we would first parse all input strings before starting the
|
||||||
|
|
|
@ -287,7 +287,7 @@ nmt_newt_form_iterate (NmtNewtForm *form)
|
||||||
|
|
||||||
if (es.reason == NEWT_EXIT_COMPONENT) {
|
if (es.reason == NEWT_EXIT_COMPONENT) {
|
||||||
/* The user hit Return/Space on a component; update the form focus
|
/* The user hit Return/Space on a component; update the form focus
|
||||||
* to point that that component, and activate it.
|
* to point that component, and activate it.
|
||||||
*/
|
*/
|
||||||
focus = nmt_newt_widget_find_component (priv->content, es.u.co);
|
focus = nmt_newt_widget_find_component (priv->content, es.u.co);
|
||||||
if (focus) {
|
if (focus) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ enum {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NmtNewtTextboxFlags:
|
* NmtNewtTextboxFlags:
|
||||||
* @NMT_NEWT_TEXTBOX_SCROLLABLE: the textbox should be scollable.
|
* @NMT_NEWT_TEXTBOX_SCROLLABLE: the textbox should be scrollable.
|
||||||
* @NMT_NEWT_TEXTBOX_SET_BACKGROUND: the textbox should have a
|
* @NMT_NEWT_TEXTBOX_SET_BACKGROUND: the textbox should have a
|
||||||
* white background
|
* white background
|
||||||
*
|
*
|
||||||
|
|
|
@ -235,7 +235,7 @@ print ("NetworkManager version " + client.get_version())]]></programlisting></in
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Instead of calling g_dbus_connection_call_sync(), use the
|
Instead of calling g_dbus_connection_call_sync(), use the
|
||||||
asynchronous g_dbus_connection_call(). If we would use a sepaate
|
asynchronous g_dbus_connection_call(). If we would use a separate
|
||||||
GMainContext for all D-Bus related calls, we could ensure that
|
GMainContext for all D-Bus related calls, we could ensure that
|
||||||
while we block for the response, we iterate the internal main context.
|
while we block for the response, we iterate the internal main context.
|
||||||
This might be nice, because all events are processed in order and
|
This might be nice, because all events are processed in order and
|
||||||
|
|
|
@ -312,7 +312,7 @@
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Reapply:
|
Reapply:
|
||||||
@connection: The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarly differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
|
@connection: The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarily differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
|
||||||
@version_id: If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply.
|
@version_id: If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply.
|
||||||
@flags: Flags which would modify the behavior of the Reapply call. There are no flags defined currently and the users should use the value of 0.
|
@flags: Flags which would modify the behavior of the Reapply call. There are no flags defined currently and the users should use the value of 0.
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
GetSecrets:
|
GetSecrets:
|
||||||
@setting_name: Name of the setting to return secrets for. If empty, all all secrets will be returned.
|
@setting_name: Name of the setting to return secrets for. If empty, all secrets will be returned.
|
||||||
@secrets: Nested settings maps containing secrets.
|
@secrets: Nested settings maps containing secrets.
|
||||||
|
|
||||||
Get the secrets belonging to this network configuration. Only secrets from
|
Get the secrets belonging to this network configuration. Only secrets from
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
"0x20" (block-autoconnect),
|
"0x20" (block-autoconnect),
|
||||||
"0x40" (no-reapply).
|
"0x40" (no-reapply).
|
||||||
Unknown flags cause the call to fail.
|
Unknown flags cause the call to fail.
|
||||||
@args: optional arguments dictionary, for extensibility. Currently, no
|
@args: optional arguments dictionary, for extentibility. Currently, no
|
||||||
arguments are accepted. Specifying unknown keys causes the call
|
arguments are accepted. Specifying unknown keys causes the call
|
||||||
to fail.
|
to fail.
|
||||||
@result: output argument, currently no results are returned.
|
@result: output argument, currently no results are returned.
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
"0x2" (in-memory),
|
"0x2" (in-memory),
|
||||||
"0x20" (block-autoconnect).
|
"0x20" (block-autoconnect).
|
||||||
Unknown flags cause the call to fail.
|
Unknown flags cause the call to fail.
|
||||||
@args: optional arguments dictionary, for extensibility. Currently, no
|
@args: optional arguments dictionary, for extentibility. Currently, no
|
||||||
arguments are accepted. Specifying unknown keys causes the call
|
arguments are accepted. Specifying unknown keys causes the call
|
||||||
to fail.
|
to fail.
|
||||||
@path: Object path of the new connection that was just added.
|
@path: Object path of the new connection that was just added.
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
Either the flags 0x1 (to-disk) or 0x2 (in-memory) must be specified.
|
Either the flags 0x1 (to-disk) or 0x2 (in-memory) must be specified.
|
||||||
The effect is whether to behave like AddConnection or AddConnectionUnsaved.
|
The effect is whether to behave like AddConnection or AddConnectionUnsaved.
|
||||||
If 0x20 (block-autoconnect) is specified, autoconnect for the new profile
|
If 0x20 (block-autoconnect) is specified, autoconnect for the new profile
|
||||||
is blocked from the beginnin. Otherwise, the profile might automatically
|
is blocked from the beginning. Otherwise, the profile might automatically
|
||||||
connect if a suitable device is around.
|
connect if a suitable device is around.
|
||||||
|
|
||||||
AddConnection2 is a extensible alternative to AddConnection, and AddConnectionUnsaved.
|
AddConnection2 is a extensible alternative to AddConnection, and AddConnectionUnsaved.
|
||||||
|
|
|
@ -523,7 +523,7 @@
|
||||||
ConnectivityCheckEnabled:
|
ConnectivityCheckEnabled:
|
||||||
|
|
||||||
Indicates whether connectivity checking is enabled. This
|
Indicates whether connectivity checking is enabled. This
|
||||||
property can also be written to to disable connectivity
|
property can also be written to disable connectivity
|
||||||
checking (as a privacy control panel might want to do).
|
checking (as a privacy control panel might want to do).
|
||||||
-->
|
-->
|
||||||
<property name="ConnectivityCheckEnabled" type="b" access="readwrite"/>
|
<property name="ConnectivityCheckEnabled" type="b" access="readwrite"/>
|
||||||
|
|
|
@ -2101,7 +2101,7 @@ _clear_secrets_by_secret_flags_cb (NMSetting *setting,
|
||||||
* @self: the #NMConnection to filter (will be modified)
|
* @self: the #NMConnection to filter (will be modified)
|
||||||
* @filter_flags: the secret flags to control whether to drop/remove
|
* @filter_flags: the secret flags to control whether to drop/remove
|
||||||
* a secret or to keep it. The meaning of the filter flags is to
|
* a secret or to keep it. The meaning of the filter flags is to
|
||||||
* preseve the secrets. The secrets that have matching (see below)
|
* preserve the secrets. The secrets that have matching (see below)
|
||||||
* flags are kept, the others are dropped.
|
* flags are kept, the others are dropped.
|
||||||
*
|
*
|
||||||
* Removes/drops secrets from @self according to @filter_flags.
|
* Removes/drops secrets from @self according to @filter_flags.
|
||||||
|
@ -2370,8 +2370,8 @@ nm_connection_for_each_setting_value (NMConnection *connection,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _nm_connection_aggregate:
|
* _nm_connection_aggregate:
|
||||||
* @connecition: the #NMConnection for which values are to be aggregated.
|
* @connection: the #NMConnection for which values are to be aggregated.
|
||||||
* @type: one of the supported aggrate types.
|
* @type: one of the supported aggregate types.
|
||||||
* @arg: the input/output argument that depends on @type.
|
* @arg: the input/output argument that depends on @type.
|
||||||
*
|
*
|
||||||
* For example, with %NM_CONNECTION_AGGREGATE_ANY_SECRETS and
|
* For example, with %NM_CONNECTION_AGGREGATE_ANY_SECRETS and
|
||||||
|
|
|
@ -1024,7 +1024,7 @@ typedef enum { /*< flags >*/
|
||||||
* @NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES: The master has any slave devices attached.
|
* @NM_ACTIVATION_STATE_FLAG_MASTER_HAS_SLAVES: The master has any slave devices attached.
|
||||||
* This only makes sense if the device is a master.
|
* This only makes sense if the device is a master.
|
||||||
* @NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY: the lifetime
|
* @NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY: the lifetime
|
||||||
* of the activation is bound to the visilibity of the connection profile,
|
* of the activation is bound to the visibility of the connection profile,
|
||||||
* which in turn depends on "connection.permissions" and whether a session
|
* which in turn depends on "connection.permissions" and whether a session
|
||||||
* for the user exists. Since: 1.16
|
* for the user exists. Since: 1.16
|
||||||
* @NM_ACTIVATION_STATE_FLAG_EXTERNAL: the active connection was generated to
|
* @NM_ACTIVATION_STATE_FLAG_EXTERNAL: the active connection was generated to
|
||||||
|
@ -1087,7 +1087,7 @@ typedef enum { /*< flags >*/
|
||||||
* as %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, with one difference: when later deleting
|
* as %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY, with one difference: when later deleting
|
||||||
* the profile, the original profile will not be deleted. Instead a nmmeta
|
* the profile, the original profile will not be deleted. Instead a nmmeta
|
||||||
* file is written to /run to indicate that the profile is gone.
|
* file is written to /run to indicate that the profile is gone.
|
||||||
* Note that if such a nmmeta tombstone file exists and hides a file in persistant
|
* Note that if such a nmmeta tombstone file exists and hides a file in persistent
|
||||||
* storage, then when re-adding the profile with the same UUID, then the original
|
* storage, then when re-adding the profile with the same UUID, then the original
|
||||||
* storage is taken over again.
|
* storage is taken over again.
|
||||||
* @NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY: this is like %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY,
|
* @NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY: this is like %NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY,
|
||||||
|
|
|
@ -526,7 +526,7 @@ _keyfile_key_encode (const char *name,
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!name[0]) {
|
if (!name[0]) {
|
||||||
/* empty keys are are backslash encoded. Note that usually
|
/* empty keys are backslash encoded. Note that usually
|
||||||
* \\00 is not a valid encode, the only exception is the empty
|
* \\00 is not a valid encode, the only exception is the empty
|
||||||
* word. */
|
* word. */
|
||||||
return "\\00";
|
return "\\00";
|
||||||
|
@ -699,7 +699,7 @@ nm_keyfile_key_decode (const char *key,
|
||||||
const char *key2;
|
const char *key2;
|
||||||
|
|
||||||
key2 = _keyfile_key_encode (name, &to_free2);
|
key2 = _keyfile_key_encode (name, &to_free2);
|
||||||
/* key2, the result of decode+encode may not be idential
|
/* key2, the result of decode+encode may not be identical
|
||||||
* to the original key. That is, decode() is a surjective
|
* to the original key. That is, decode() is a surjective
|
||||||
* function mapping different keys to the same name.
|
* function mapping different keys to the same name.
|
||||||
* However, decode() behaves injective for input that
|
* However, decode() behaves injective for input that
|
||||||
|
|
|
@ -473,7 +473,7 @@ openconnect_fix_secret_flags (NMSetting *setting)
|
||||||
/* Huge hack. There were some openconnect changes that needed to happen
|
/* Huge hack. There were some openconnect changes that needed to happen
|
||||||
* pretty late, too late to get into distros. Migration has already
|
* pretty late, too late to get into distros. Migration has already
|
||||||
* happened for many people, and their secret flags are wrong. But we
|
* happened for many people, and their secret flags are wrong. But we
|
||||||
* don't want to requrie re-migration, so we have to fix it up here. Ugh.
|
* don't want to require re-migration, so we have to fix it up here. Ugh.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!NM_IS_SETTING_VPN (setting))
|
if (!NM_IS_SETTING_VPN (setting))
|
||||||
|
@ -4335,7 +4335,7 @@ nm_keyfile_utils_create_filename (const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* nm_keyfile_utils_create_filename() must avoid anything that ignore_filename() would reject.
|
/* nm_keyfile_utils_create_filename() must avoid anything that ignore_filename() would reject.
|
||||||
* We can escape here more aggressivly then what we would read back. */
|
* We can escape here more aggressively then what we would read back. */
|
||||||
if (p[0] == '.')
|
if (p[0] == '.')
|
||||||
p[0] = ESCAPE_CHAR2;
|
p[0] = ESCAPE_CHAR2;
|
||||||
if (p[str.len - 1] == '~')
|
if (p[str.len - 1] == '~')
|
||||||
|
|
|
@ -808,7 +808,7 @@ nm_setting_connection_add_secondary (NMSettingConnection *setting,
|
||||||
* @setting: the #NMSettingConnection
|
* @setting: the #NMSettingConnection
|
||||||
* @idx: index number of the secondary connection UUID
|
* @idx: index number of the secondary connection UUID
|
||||||
*
|
*
|
||||||
* Removes the secondary coonnection UUID at index @idx.
|
* Removes the secondary connection UUID at index @idx.
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
nm_setting_connection_remove_secondary (NMSettingConnection *setting, guint32 idx)
|
nm_setting_connection_remove_secondary (NMSettingConnection *setting, guint32 idx)
|
||||||
|
@ -832,7 +832,7 @@ nm_setting_connection_remove_secondary (NMSettingConnection *setting, guint32 id
|
||||||
* @setting: the #NMSettingConnection
|
* @setting: the #NMSettingConnection
|
||||||
* @sec_uuid: the secondary connection UUID to remove
|
* @sec_uuid: the secondary connection UUID to remove
|
||||||
*
|
*
|
||||||
* Removes the secondary coonnection UUID @sec_uuid.
|
* Removes the secondary connection UUID @sec_uuid.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the secondary connection UUID was found and removed; %FALSE if it was not.
|
* Returns: %TRUE if the secondary connection UUID was found and removed; %FALSE if it was not.
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -3091,7 +3091,7 @@ nm_ip_routing_rule_from_string (const char *str,
|
||||||
* - iproute2 in may regards is flexible about the command lines. For example
|
* - iproute2 in may regards is flexible about the command lines. For example
|
||||||
* - for tables it accepts table names from /etc/iproute2/rt_tables. We only
|
* - for tables it accepts table names from /etc/iproute2/rt_tables. We only
|
||||||
* accept the special aliases "main", "local", and "default".
|
* accept the special aliases "main", "local", and "default".
|
||||||
* - key names like "preference" can be abbreviated to "prefe", we don't do that.
|
* - key names like "preference" can be abbreviated to "pref", we don't do that.
|
||||||
* - the "preference"/"priority" may be unspecified, in which kernel automatically
|
* - the "preference"/"priority" may be unspecified, in which kernel automatically
|
||||||
* chooses an unused priority (during `ip rule add`). We don't allow for that, the
|
* chooses an unused priority (during `ip rule add`). We don't allow for that, the
|
||||||
* priority must be explicitly set.
|
* priority must be explicitly set.
|
||||||
|
@ -3127,7 +3127,7 @@ nm_ip_routing_rule_from_string (const char *str,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* iproute2 matches keywords with any partial prefix. We don't allow
|
/* iproute2 matches keywords with any partial prefix. We don't allow
|
||||||
* for that flexiblity. */
|
* for that flexibility. */
|
||||||
|
|
||||||
if (NM_IN_STRSET (word0, "from")) {
|
if (NM_IN_STRSET (word0, "from")) {
|
||||||
if (!word1)
|
if (!word1)
|
||||||
|
|
|
@ -30,7 +30,7 @@ G_DEFINE_BOXED_TYPE (NMWireGuardPeer, nm_wireguard_peer, _wireguard_peer_dup, nm
|
||||||
|
|
||||||
/* NMWireGuardPeer can also track invalid allowed-ip settings, and only reject
|
/* NMWireGuardPeer can also track invalid allowed-ip settings, and only reject
|
||||||
* them later during is_valid(). Such values are marked by a leading 'X' character
|
* them later during is_valid(). Such values are marked by a leading 'X' character
|
||||||
* in the @allowed_ips. It is expected, that such values are the expception, and
|
* in the @allowed_ips. It is expected, that such values are the exception, and
|
||||||
* commonly not present. */
|
* commonly not present. */
|
||||||
#define ALLOWED_IP_INVALID_X 'X'
|
#define ALLOWED_IP_INVALID_X 'X'
|
||||||
#define ALLOWED_IP_INVALID_X_STR "X"
|
#define ALLOWED_IP_INVALID_X_STR "X"
|
||||||
|
@ -157,7 +157,7 @@ nm_wireguard_peer_ref (NMWireGuardPeer *self)
|
||||||
* @self: (allow-none): the #NMWireGuardPeer instance
|
* @self: (allow-none): the #NMWireGuardPeer instance
|
||||||
*
|
*
|
||||||
* Drop a reference to @self. If the last reference is dropped,
|
* Drop a reference to @self. If the last reference is dropped,
|
||||||
* the instance is freed and all accociate data released.
|
* the instance is freed and all associate data released.
|
||||||
*
|
*
|
||||||
* This is not thread-safe.
|
* This is not thread-safe.
|
||||||
*
|
*
|
||||||
|
|
|
@ -665,7 +665,7 @@ nm_setting_wireless_security_get_wep_key (NMSettingWirelessSecurity *setting, gu
|
||||||
* @setting: the #NMSettingWirelessSecurity
|
* @setting: the #NMSettingWirelessSecurity
|
||||||
* @idx: the index of the key (0..3 inclusive)
|
* @idx: the index of the key (0..3 inclusive)
|
||||||
* @key: the WEP key as a string, in either hexadecimal, ASCII, or passphrase
|
* @key: the WEP key as a string, in either hexadecimal, ASCII, or passphrase
|
||||||
* form as determiend by the value of the #NMSettingWirelessSecurity:wep-key-type
|
* form as determined by the value of the #NMSettingWirelessSecurity:wep-key-type
|
||||||
* property.
|
* property.
|
||||||
*
|
*
|
||||||
* Sets a WEP key in the given index.
|
* Sets a WEP key in the given index.
|
||||||
|
|
|
@ -78,7 +78,7 @@ typedef enum {
|
||||||
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT: Attempt whichever method AP supports
|
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DEFAULT: Attempt whichever method AP supports
|
||||||
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DISABLED: WPS can not be used.
|
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_DISABLED: WPS can not be used.
|
||||||
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_AUTO: Use WPS, any method
|
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_AUTO: Use WPS, any method
|
||||||
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PBC: use WPS push-buthon method
|
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PBC: use WPS push-button method
|
||||||
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PIN: use PIN method
|
* @NM_SETTING_WIRELESS_SECURITY_WPS_METHOD_PIN: use PIN method
|
||||||
*
|
*
|
||||||
* Configure the use of WPS by a connection while it activates.
|
* Configure the use of WPS by a connection while it activates.
|
||||||
|
|
|
@ -1814,7 +1814,7 @@ nm_setting_wireless_class_init (NMSettingWirelessClass *klass)
|
||||||
* interface is configured in AP mode.
|
* interface is configured in AP mode.
|
||||||
*
|
*
|
||||||
* If set to %NM_TERNARY_TRUE, devices are not able to communicate
|
* If set to %NM_TERNARY_TRUE, devices are not able to communicate
|
||||||
* with each other. The increases security because it protects
|
* with each other. This increases security because it protects
|
||||||
* devices against attacks from other clients in the network. At
|
* devices against attacks from other clients in the network. At
|
||||||
* the same time, it prevents devices to access resources on the
|
* the same time, it prevents devices to access resources on the
|
||||||
* same wireless networks as file shares, printers, etc.
|
* same wireless networks as file shares, printers, etc.
|
||||||
|
|
|
@ -2228,7 +2228,7 @@ _string_append_tc_handle (GString *string, guint32 handle)
|
||||||
*
|
*
|
||||||
* This is used to either write out the parent handle to the tc qdisc string
|
* This is used to either write out the parent handle to the tc qdisc string
|
||||||
* or to pretty-format (use symbolic name for root) the key in keyfile.
|
* or to pretty-format (use symbolic name for root) the key in keyfile.
|
||||||
* The presence of prefix determnines which one is the case.
|
* The presence of prefix determines which one is the case.
|
||||||
*
|
*
|
||||||
* Private API due to general ugliness and overall uselessness for anything
|
* Private API due to general ugliness and overall uselessness for anything
|
||||||
* sensible.
|
* sensible.
|
||||||
|
@ -4080,7 +4080,7 @@ fail:
|
||||||
* @out_length: the output length in case of success.
|
* @out_length: the output length in case of success.
|
||||||
*
|
*
|
||||||
* Parses @asc and converts it to binary form in @buffer.
|
* Parses @asc and converts it to binary form in @buffer.
|
||||||
* Bytes in @asc can be sepatared by colons (:), or hyphens (-), but not mixed.
|
* Bytes in @asc can be separated by colons (:), or hyphens (-), but not mixed.
|
||||||
*
|
*
|
||||||
* It is like nm_utils_hwaddr_aton(), but contrary to that it
|
* It is like nm_utils_hwaddr_aton(), but contrary to that it
|
||||||
* can parse addresses of any length. That is, you don't need
|
* can parse addresses of any length. That is, you don't need
|
||||||
|
@ -4107,7 +4107,7 @@ _nm_utils_hwaddr_aton (const char *asc, gpointer buffer, gsize buffer_length, gs
|
||||||
* the size of the buffer in bytes.
|
* the size of the buffer in bytes.
|
||||||
*
|
*
|
||||||
* Parses @asc and converts it to binary form in @buffer.
|
* Parses @asc and converts it to binary form in @buffer.
|
||||||
* Bytes in @asc can be sepatared by colons (:), or hyphens (-), but not mixed.
|
* Bytes in @asc can be separated by colons (:), or hyphens (-), but not mixed.
|
||||||
*
|
*
|
||||||
* Return value: @buffer, or %NULL if @asc couldn't be parsed
|
* Return value: @buffer, or %NULL if @asc couldn't be parsed
|
||||||
* or would be shorter or longer than @length.
|
* or would be shorter or longer than @length.
|
||||||
|
|
|
@ -640,7 +640,7 @@ nm_vpn_plugin_info_list_find_service_type (GSList *list, const char *name)
|
||||||
if (info)
|
if (info)
|
||||||
return g_strdup (NM_VPN_PLUGIN_INFO_GET_PRIVATE (info)->service);
|
return g_strdup (NM_VPN_PLUGIN_INFO_GET_PRIVATE (info)->service);
|
||||||
|
|
||||||
/* check the hard-coded list of short-names. They all have have the same
|
/* check the hard-coded list of short-names. They all have the same
|
||||||
* well-known prefix org.freedesktop.NetworkManager and the name. */
|
* well-known prefix org.freedesktop.NetworkManager and the name. */
|
||||||
if (nm_utils_strv_find_first ((char **) known_names, G_N_ELEMENTS (known_names), name) >= 0)
|
if (nm_utils_strv_find_first ((char **) known_names, G_N_ELEMENTS (known_names), name) >= 0)
|
||||||
return g_strdup_printf ("%s.%s", NM_DBUS_INTERFACE, name);
|
return g_strdup_printf ("%s.%s", NM_DBUS_INTERFACE, name);
|
||||||
|
|
|
@ -269,7 +269,7 @@ _do_test_nm_utils_strsplit_set_f_one (NMUtilsStrsplitSetFlags flags,
|
||||||
g_assert (!NM_FLAGS_ANY (flags, ~( NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING
|
g_assert (!NM_FLAGS_ANY (flags, ~( NM_UTILS_STRSPLIT_SET_FLAGS_ALLOW_ESCAPING
|
||||||
| NM_UTILS_STRSPLIT_SET_FLAGS_PRESERVE_EMPTY)));
|
| NM_UTILS_STRSPLIT_SET_FLAGS_PRESERVE_EMPTY)));
|
||||||
|
|
||||||
/* assert that the epected words are valid (and don't contain unescaped delimiters). */
|
/* assert that the expected words are valid (and don't contain unescaped delimiters). */
|
||||||
for (i = 0; i < words_len; i++) {
|
for (i = 0; i < words_len; i++) {
|
||||||
const char *w = exp_words[i];
|
const char *w = exp_words[i];
|
||||||
|
|
||||||
|
@ -7845,7 +7845,7 @@ _do_test_utils_str_utf8safe_unescape (const char *str, const char *expected, gsi
|
||||||
|
|
||||||
if ( expected
|
if ( expected
|
||||||
&& l == strlen (expected)) {
|
&& l == strlen (expected)) {
|
||||||
/* there are no embeeded NULs. Check that nm_utils_str_utf8safe_unescape() yields the same result. */
|
/* there are no embedded NULs. Check that nm_utils_str_utf8safe_unescape() yields the same result. */
|
||||||
s = nm_utils_str_utf8safe_unescape (str, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE, &str_free_1);
|
s = nm_utils_str_utf8safe_unescape (str, NM_UTILS_STR_UTF8_SAFE_FLAG_NONE, &str_free_1);
|
||||||
g_assert_cmpstr (s, ==, expected);
|
g_assert_cmpstr (s, ==, expected);
|
||||||
if (strchr (str, '\\')) {
|
if (strchr (str, '\\')) {
|
||||||
|
|
|
@ -3977,10 +3977,10 @@ test_setting_metadata (void)
|
||||||
|| (pt == &nm_sett_info_propert_type_plain_u && pt_2 == &nm_sett_info_propert_type_deprecated_ignore_u)
|
|| (pt == &nm_sett_info_propert_type_plain_u && pt_2 == &nm_sett_info_propert_type_deprecated_ignore_u)
|
||||||
|| (pt_2 == &nm_sett_info_propert_type_plain_u && pt == &nm_sett_info_propert_type_deprecated_ignore_u)) {
|
|| (pt_2 == &nm_sett_info_propert_type_plain_u && pt == &nm_sett_info_propert_type_deprecated_ignore_u)) {
|
||||||
/* These are known to be duplicated. This is the case for
|
/* These are known to be duplicated. This is the case for
|
||||||
* "gsm.network-type" and plain properies like "802-11-wireless-security.fils" ("i" D-Bus type)
|
* "gsm.network-type" and plain properties like "802-11-wireless-security.fils" ("i" D-Bus type)
|
||||||
* "gsm.allowed-bands" and plain properies like "802-11-olpc-mesh.channel" ("u" D-Bus type)
|
* "gsm.allowed-bands" and plain properties like "802-11-olpc-mesh.channel" ("u" D-Bus type)
|
||||||
* While the content/behaviour of the property types are identical, their purpose
|
* While the content/behaviour of the property types are identical, their purpose
|
||||||
* is different. So allowe them.
|
* is different. So allow them.
|
||||||
*/
|
*/
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2610,7 +2610,7 @@ _obj_handle_dbus_changes (NMClient *self,
|
||||||
|
|
||||||
_ASSERT_dbobj (dbobj, self);
|
_ASSERT_dbobj (dbobj, self);
|
||||||
|
|
||||||
/* In a first step we only remember all the changes that that a D-Bus message brings
|
/* In a first step we only remember all the changes that a D-Bus message brings
|
||||||
* and queue the object to process them.
|
* and queue the object to process them.
|
||||||
*
|
*
|
||||||
* Here (in step 2) we look at what changed on D-Bus and propagate those changes
|
* Here (in step 2) we look at what changed on D-Bus and propagate those changes
|
||||||
|
@ -4425,7 +4425,7 @@ nm_client_get_permission_result (NMClient *client, NMClientPermission permission
|
||||||
* means that no permissions result was yet received. All permissions
|
* means that no permissions result was yet received. All permissions
|
||||||
* are unknown. %NM_TERNARY_TRUE means that the permissions got received
|
* are unknown. %NM_TERNARY_TRUE means that the permissions got received
|
||||||
* and are cached. %%NM_TERNARY_FALSE means that permissions are cached,
|
* and are cached. %%NM_TERNARY_FALSE means that permissions are cached,
|
||||||
* but they are invalided as as "CheckPermissions" signal was received
|
* but they are invalided as "CheckPermissions" signal was received
|
||||||
* in the meantime.
|
* in the meantime.
|
||||||
*
|
*
|
||||||
* Since: 1.24
|
* Since: 1.24
|
||||||
|
@ -8356,7 +8356,7 @@ nm_client_class_init (NMClientClass *client_class)
|
||||||
* NMClient:capabilities: (type GArray(guint32))
|
* NMClient:capabilities: (type GArray(guint32))
|
||||||
*
|
*
|
||||||
* The list of capabilities numbers as guint32 or %NULL if
|
* The list of capabilities numbers as guint32 or %NULL if
|
||||||
* there are no capabitilies. The numeric value correspond
|
* there are no capabilities. The numeric value correspond
|
||||||
* to %NMCapability enum.
|
* to %NMCapability enum.
|
||||||
*
|
*
|
||||||
* Since: 1.24
|
* Since: 1.24
|
||||||
|
|
|
@ -38,7 +38,7 @@ typedef enum {
|
||||||
* for unknown D-Bus API that could just result because we run against a
|
* for unknown D-Bus API that could just result because we run against a
|
||||||
* newer NetworkManager version (such warnings are more graceful, because
|
* newer NetworkManager version (such warnings are more graceful, because
|
||||||
* we want that libnm can be forward compatible against newer servers).
|
* we want that libnm can be forward compatible against newer servers).
|
||||||
* Critial warnings should be emitted when NetworkManager exposes something
|
* Critical warnings should be emitted when NetworkManager exposes something
|
||||||
* on D-Bus that breaks the current expectations. Usually NetworkManager
|
* on D-Bus that breaks the current expectations. Usually NetworkManager
|
||||||
* should not break API, hence such issues are more severe. */
|
* should not break API, hence such issues are more severe. */
|
||||||
_NML_DBUS_LOG_LEVEL_WARN = 0x08,
|
_NML_DBUS_LOG_LEVEL_WARN = 0x08,
|
||||||
|
|
|
@ -234,7 +234,7 @@ nm_secret_agent_old_get_context_busy_watcher (NMSecretAgentOld *self)
|
||||||
* Returns: the current D-Bus name owner. While this property
|
* Returns: the current D-Bus name owner. While this property
|
||||||
* is set while registering, it really only makes sense when
|
* is set while registering, it really only makes sense when
|
||||||
* the nm_secret_agent_old_get_registered() indicates that
|
* the nm_secret_agent_old_get_registered() indicates that
|
||||||
* registration is successfull.
|
* registration is successful.
|
||||||
*
|
*
|
||||||
* Since: 1.24
|
* Since: 1.24
|
||||||
*/
|
*/
|
||||||
|
@ -1974,7 +1974,7 @@ nm_secret_agent_old_class_init (NMSecretAgentOldClass *class)
|
||||||
* In particular, if this property is %TRUE at construct time, then the
|
* In particular, if this property is %TRUE at construct time, then the
|
||||||
* agent will register itself with NetworkManager during
|
* agent will register itself with NetworkManager during
|
||||||
* construction/initialization and initialization will only complete
|
* construction/initialization and initialization will only complete
|
||||||
* after registration is completed (either successfully or unsucessfully).
|
* after registration is completed (either successfully or unsuccessfully).
|
||||||
* Since 1.24, a failure to register will no longer cause initialization
|
* Since 1.24, a failure to register will no longer cause initialization
|
||||||
* of #NMSecretAgentOld to fail.
|
* of #NMSecretAgentOld to fail.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1251,7 +1251,7 @@ enable=nm-version-min:1.2
|
||||||
|
|
||||||
# Match against the maximum allowed version. The example matches
|
# Match against the maximum allowed version. The example matches
|
||||||
# versions 1.2.0, 1.2.2, 1.2.4. Again, only the last version digit
|
# versions 1.2.0, 1.2.2, 1.2.4. Again, only the last version digit
|
||||||
# is allowed to be smaller. So this would not match match on 1.1.10.
|
# is allowed to be smaller. So this would not match on 1.1.10.
|
||||||
[.config]
|
[.config]
|
||||||
enable=nm-version-max:1.2.6
|
enable=nm-version-max:1.2.6
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
|
@ -1749,35 +1749,35 @@
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>connectivity-full</option></term>
|
<term><option>connectivity-full</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Conectivity state when Internet is reachable.</para>
|
<para>Connectivity state when Internet is reachable.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>connectivity-limited</option></term>
|
<term><option>connectivity-limited</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Conectivity state when only a local network reachable.</para>
|
<para>Connectivity state when only a local network reachable.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>connectivity-none</option></term>
|
<term><option>connectivity-none</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Conectivity state when the network is disconnected.</para>
|
<para>Connectivity state when the network is disconnected.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>connectivity-portal</option></term>
|
<term><option>connectivity-portal</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Conectivity state when a captive portal hijacked the connection.</para>
|
<para>Connectivity state when a captive portal hijacked the connection.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>connectivity-unknown</option></term>
|
<term><option>connectivity-unknown</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Conectivity state when a connectivity check didn't run.</para>
|
<para>Connectivity state when a connectivity check didn't run.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ _c_public_ uint64_t c_siphash_finalize(CSipHash *state) {
|
||||||
*
|
*
|
||||||
* CSipHash state;
|
* CSipHash state;
|
||||||
* c_siphash_init(&state, seed);
|
* c_siphash_init(&state, seed);
|
||||||
* c_siphash_apend(&state, bytes, n_bytes);
|
* c_siphash_append(&state, bytes, n_bytes);
|
||||||
* return c_siphash_finalize(&state);
|
* return c_siphash_finalize(&state);
|
||||||
*
|
*
|
||||||
* Unlike the streaming API, this is a one-shot call suitable for any data that
|
* Unlike the streaming API, this is a one-shot call suitable for any data that
|
||||||
|
|
|
@ -203,7 +203,7 @@ static void test_misc(int non_constant_expr) {
|
||||||
/*
|
/*
|
||||||
* Div Round Up: Normal division, but round up to next integer, instead
|
* Div Round Up: Normal division, but round up to next integer, instead
|
||||||
* of clipping. Also verify that it does not suffer from the integer
|
* of clipping. Also verify that it does not suffer from the integer
|
||||||
* overflow in the prevalant, alternative implementation:
|
* overflow in the prevalent, alternative implementation:
|
||||||
* [(x + y - 1) / y].
|
* [(x + y - 1) / y].
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
|
|
|
@ -682,7 +682,7 @@ _c_public_ void n_acd_probe_get_userdata(NAcdProbe *probe, void **userdatap) {
|
||||||
/**
|
/**
|
||||||
* n_acd_probe_announce() - announce the configured IP address
|
* n_acd_probe_announce() - announce the configured IP address
|
||||||
* @probe: probe to operate on
|
* @probe: probe to operate on
|
||||||
* @defend: defence policy
|
* @defend: defense policy
|
||||||
*
|
*
|
||||||
* Announce the IP address on the local link, and start defending it according
|
* Announce the IP address on the local link, and start defending it according
|
||||||
* to the given policy, which mut be one of N_ACD_DEFEND_ONCE,
|
* to the given policy, which mut be one of N_ACD_DEFEND_ONCE,
|
||||||
|
@ -691,7 +691,7 @@ _c_public_ void n_acd_probe_get_userdata(NAcdProbe *probe, void **userdatap) {
|
||||||
* This must be called in response to an N_ACD_EVENT_READY event, and only
|
* This must be called in response to an N_ACD_EVENT_READY event, and only
|
||||||
* after the given address has been configured on the given network interface.
|
* after the given address has been configured on the given network interface.
|
||||||
*
|
*
|
||||||
* Return: 0 on success, N_ACD_E_INVALID_ARGUMENT in case the defence policy
|
* Return: 0 on success, N_ACD_E_INVALID_ARGUMENT in case the defense policy
|
||||||
* is invalid, negative error code on failure.
|
* is invalid, negative error code on failure.
|
||||||
*/
|
*/
|
||||||
_c_public_ int n_acd_probe_announce(NAcdProbe *probe, unsigned int defend) {
|
_c_public_ int n_acd_probe_announce(NAcdProbe *probe, unsigned int defend) {
|
||||||
|
|
|
@ -578,11 +578,11 @@ static int n_acd_handle_timeout(NAcd *acd) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the current time once, and handle all timouts that triggered
|
* Read the current time once, and handle all timeouts that triggered
|
||||||
* before the current time. Rereading the current time in each loop
|
* before the current time. Rereading the current time in each loop
|
||||||
* might risk creating a live-lock, and the fact that we read the
|
* might risk creating a live-lock, and the fact that we read the
|
||||||
* time after reading the timer guarantees that the timeout which
|
* time after reading the timer guarantees that the timeout which
|
||||||
* woke us up is hanlded.
|
* woke us up is handled.
|
||||||
*
|
*
|
||||||
* When there are no more timeouts to handle at the given time, we
|
* When there are no more timeouts to handle at the given time, we
|
||||||
* rearm the timer to potentially wake us up again in the future.
|
* rearm the timer to potentially wake us up again in the future.
|
||||||
|
|
|
@ -191,7 +191,7 @@ static inline void test_setup(void) {
|
||||||
/*
|
/*
|
||||||
* Move into a new network and mount namespace both associated
|
* Move into a new network and mount namespace both associated
|
||||||
* with a new user namespace where the current eUID is mapped to
|
* with a new user namespace where the current eUID is mapped to
|
||||||
* 0. Then create a a private instance of /run/netns. This ensures
|
* 0. Then create a private instance of /run/netns. This ensures
|
||||||
* that any network devices or network namespaces are private to
|
* that any network devices or network namespaces are private to
|
||||||
* the test process.
|
* the test process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -55,7 +55,7 @@ void timer_rearm(Timer *timer) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A timeout value of 0 clears the timer, we sholud only set that if
|
* A timeout value of 0 clears the timer, we should only set that if
|
||||||
* no timeout exists in the tree.
|
* no timeout exists in the tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ int n_dhcp4_c_connection_dispatch_io(NDhcp4CConnection *connection,
|
||||||
/*
|
/*
|
||||||
* Remember the start time of the transaction, and the base
|
* Remember the start time of the transaction, and the base
|
||||||
* time of any relative timestamps from the pending request.
|
* time of any relative timestamps from the pending request.
|
||||||
* Thes same times applies to the response, and sholud be
|
* The same time applies to the response, and should be
|
||||||
* copied over.
|
* copied over.
|
||||||
*/
|
*/
|
||||||
message->userdata.start_time = connection->request->userdata.start_time;
|
message->userdata.start_time = connection->request->userdata.start_time;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* DHCP4 Client Leases
|
* DHCP4 Client Leases
|
||||||
*
|
*
|
||||||
* This implements the public API wrapping DHCP4 client leases. A lease object
|
* This implements the public API wrapping DHCP4 client leases. A lease object
|
||||||
* conists of the information given to us from the server, together with the
|
* consists of the information given to us from the server, together with the
|
||||||
* timestamp recording the start of the validity of the lease.
|
* timestamp recording the start of the validity of the lease.
|
||||||
*
|
*
|
||||||
* A probe may yield many OFFERS, each of which contains a lease object. One of
|
* A probe may yield many OFFERS, each of which contains a lease object. One of
|
||||||
|
@ -98,7 +98,7 @@ static int n_dhcp4_incoming_get_timeouts(NDhcp4Incoming *message, uint64_t *t1p,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* n_dhcp4_client_lease_new() - allocate new client lease object
|
* n_dhcp4_client_lease_new() - allocate new client lease object
|
||||||
* @leasep: output argumnet for new client lease object
|
* @leasep: output argument for new client lease object
|
||||||
* @message: incoming message representing the lease
|
* @message: incoming message representing the lease
|
||||||
*
|
*
|
||||||
* This creates a new client lease object. Client lease objects are simple
|
* This creates a new client lease object. Client lease objects are simple
|
||||||
|
@ -194,7 +194,7 @@ void n_dhcp4_client_lease_unlink(NDhcp4ClientLease *lease) {
|
||||||
* @lease: the lease to operate on
|
* @lease: the lease to operate on
|
||||||
* @yiaddr: return argument for the IP address
|
* @yiaddr: return argument for the IP address
|
||||||
*
|
*
|
||||||
* Gets the IP address cotained in the lease. Or INADDR_ANY if the lease
|
* Gets the IP address contained in the lease. Or INADDR_ANY if the lease
|
||||||
* does not contain an IP address.
|
* does not contain an IP address.
|
||||||
*/
|
*/
|
||||||
_c_public_ void n_dhcp4_client_lease_get_yiaddr(NDhcp4ClientLease *lease, struct in_addr *yiaddr) {
|
_c_public_ void n_dhcp4_client_lease_get_yiaddr(NDhcp4ClientLease *lease, struct in_addr *yiaddr) {
|
||||||
|
@ -208,7 +208,7 @@ _c_public_ void n_dhcp4_client_lease_get_yiaddr(NDhcp4ClientLease *lease, struct
|
||||||
* @lease: the lease to operate on
|
* @lease: the lease to operate on
|
||||||
* @siaddr: return argument for the IP address
|
* @siaddr: return argument for the IP address
|
||||||
*
|
*
|
||||||
* Gets the server IP address cotained in the lease. Or INADDR_ANY if the
|
* Gets the server IP address contained in the lease. Or INADDR_ANY if the
|
||||||
* lease does not contain an IP address.
|
* lease does not contain an IP address.
|
||||||
*/
|
*/
|
||||||
_c_public_ void n_dhcp4_client_lease_get_siaddr(NDhcp4ClientLease *lease, struct in_addr *siaddr) {
|
_c_public_ void n_dhcp4_client_lease_get_siaddr(NDhcp4ClientLease *lease, struct in_addr *siaddr) {
|
||||||
|
|
|
@ -221,7 +221,7 @@ _c_public_ void n_dhcp4_client_probe_config_set_requested_ip(NDhcp4ClientProbeCo
|
||||||
* delay is specified to be a random value in the range 1000 to 10.000 ms.
|
* delay is specified to be a random value in the range 1000 to 10.000 ms.
|
||||||
* However, there does not appear to be any particular reason to
|
* However, there does not appear to be any particular reason to
|
||||||
* unconditionally wait at least one second, so we move the range down to
|
* unconditionally wait at least one second, so we move the range down to
|
||||||
* start at 0 ms. The reaon for the random delay is to avoid network-wide
|
* start at 0 ms. The reason for the random delay is to avoid network-wide
|
||||||
* events causing too much simultaneous network traffic. However, on modern
|
* events causing too much simultaneous network traffic. However, on modern
|
||||||
* networks, a more reasonable value may be in the 10 ms range.
|
* networks, a more reasonable value may be in the 10 ms range.
|
||||||
*/
|
*/
|
||||||
|
@ -236,7 +236,7 @@ _c_public_ void n_dhcp4_client_probe_config_set_start_delay(NDhcp4ClientProbeCon
|
||||||
*
|
*
|
||||||
* This adds an option to the list of options to request from the server.
|
* This adds an option to the list of options to request from the server.
|
||||||
*
|
*
|
||||||
* A server may send options that we do not requst, and it may omit options
|
* A server may send options that we do not request, and it may omit options
|
||||||
* that we do request. However, to increase the likelyhood of uniform behavior
|
* that we do request. However, to increase the likelyhood of uniform behavior
|
||||||
* between server implementations, we do not expose options that were not
|
* between server implementations, we do not expose options that were not
|
||||||
* explicitly requested.
|
* explicitly requested.
|
||||||
|
|
|
@ -146,14 +146,14 @@ _c_public_ void n_dhcp4_client_config_set_transport(NDhcp4ClientConfig *config,
|
||||||
*
|
*
|
||||||
* Background: OFFER and ACK messages from DHCP servers to clients are unicast
|
* Background: OFFER and ACK messages from DHCP servers to clients are unicast
|
||||||
* to the IP address handed out, even before the IP address has
|
* to the IP address handed out, even before the IP address has
|
||||||
* been configured on the taregt interface. This usually works
|
* been configured on the target interface. This usually works
|
||||||
* because the correct destination hardware address is explicitly
|
* because the correct destination hardware address is explicitly
|
||||||
* set on the outgoing packets, rather than being resolved (which
|
* set on the outgoing packets, rather than being resolved (which
|
||||||
* would not work). However, some hardware does not accept incoming
|
* would not work). However, some hardware does not accept incoming
|
||||||
* IP packets destined for addresses they do not own, even if the
|
* IP packets destined for addresses they do not own, even if the
|
||||||
* hardware address is correct. In this case, the server must
|
* hardware address is correct. In this case, the server must
|
||||||
* broadcast the replies in order for the client to receive them.
|
* broadcast the replies in order for the client to receive them.
|
||||||
* In general, unneccesary broadcasting is something one wants to
|
* In general, unnecessary broadcasting is something one wants to
|
||||||
* avoid, and some networks will not deliver broadcasts to the
|
* avoid, and some networks will not deliver broadcasts to the
|
||||||
* client at all, in which case this flag must not be set.
|
* client at all, in which case this flag must not be set.
|
||||||
*/
|
*/
|
||||||
|
@ -953,7 +953,7 @@ _c_public_ int n_dhcp4_client_update_mtu(NDhcp4Client *client, uint16_t mtu) {
|
||||||
* This creates a new probe on @client. Probes represent DHCP requests and
|
* This creates a new probe on @client. Probes represent DHCP requests and
|
||||||
* track the state over the entire lifetime of a lease. Once a probe is created
|
* track the state over the entire lifetime of a lease. Once a probe is created
|
||||||
* it will start looking for DHCP servers, request a lease from them, and renew
|
* it will start looking for DHCP servers, request a lease from them, and renew
|
||||||
* the lease continously whenever it expires. Furthermore, if a lease cannot be
|
* the lease continuously whenever it expires. Furthermore, if a lease cannot be
|
||||||
* renewed, a new lease will be requested.
|
* renewed, a new lease will be requested.
|
||||||
*
|
*
|
||||||
* The API allows for many probes to be run at the same time. However, the DHCP
|
* The API allows for many probes to be run at the same time. However, the DHCP
|
||||||
|
|
|
@ -375,7 +375,7 @@ int n_dhcp4_s_connection_nak_new(NDhcp4SConnection *connection,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The RFC is a bit unclear on how NAK should be sent, on the
|
* The RFC is a bit unclear on how NAK should be sent, on the
|
||||||
* one hand it says that they should be unconditinoally broadcast
|
* one hand it says that they should be unconditionally broadcast
|
||||||
* (unless going through a relay agent), on the other, when they
|
* (unless going through a relay agent), on the other, when they
|
||||||
* do go through a relay agent, they will not be. We treat them
|
* do go through a relay agent, they will not be. We treat them
|
||||||
* as any other reply and only broadcast when the broadcast bit
|
* as any other reply and only broadcast when the broadcast bit
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* n_dhcp4_c_socket_packet_new() - create a new DHCP4 client packet socket
|
* n_dhcp4_c_socket_packet_new() - create a new DHCP4 client packet socket
|
||||||
* @sockfdp: return argumnet for the new socket
|
* @sockfdp: return argument for the new socket
|
||||||
* @ifindex: interface index to bind to
|
* @ifindex: interface index to bind to
|
||||||
*
|
*
|
||||||
* Create a new AF_PACKET/SOCK_DGRAM socket usable to listen to and send DHCP client
|
* Create a new AF_PACKET/SOCK_DGRAM socket usable to listen to and send DHCP client
|
||||||
|
@ -129,7 +129,7 @@ int n_dhcp4_c_socket_packet_new(int *sockfdp, int ifindex) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* n_dhcp4_c_socket_udp_new() - create a new DHCP4 client UDP socket
|
* n_dhcp4_c_socket_udp_new() - create a new DHCP4 client UDP socket
|
||||||
* @sockfdp: return argumnet for the new socket
|
* @sockfdp: return argument for the new socket
|
||||||
* @ifindex: interface index to bind to
|
* @ifindex: interface index to bind to
|
||||||
* @client_addr: client address to bind to
|
* @client_addr: client address to bind to
|
||||||
* @server_addr: server address to connect to
|
* @server_addr: server address to connect to
|
||||||
|
@ -230,7 +230,7 @@ int n_dhcp4_c_socket_udp_new(int *sockfdp,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* n_dhcp4_s_socket_packet_new() - create a new DHCP4 server packet socket
|
* n_dhcp4_s_socket_packet_new() - create a new DHCP4 server packet socket
|
||||||
* @sockfdp: return argumnet for the new socket
|
* @sockfdp: return argument for the new socket
|
||||||
*
|
*
|
||||||
* Create a new AF_PACKET/SOCK_DGRAM socket usable to send DHCP packets to clients
|
* Create a new AF_PACKET/SOCK_DGRAM socket usable to send DHCP packets to clients
|
||||||
* before they have an IP address configured, on the given interface.
|
* before they have an IP address configured, on the given interface.
|
||||||
|
@ -251,7 +251,7 @@ int n_dhcp4_s_socket_packet_new(int *sockfdp) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* n_dhcp4_s_socket_udp_new() - create a new DHCP4 server UDP socket
|
* n_dhcp4_s_socket_udp_new() - create a new DHCP4 server UDP socket
|
||||||
* @sockfdp: return argumnet for the new socket
|
* @sockfdp: return argument for the new socket
|
||||||
* @ifindex: intercafe index to bind to
|
* @ifindex: intercafe index to bind to
|
||||||
*
|
*
|
||||||
* Create a new AF_INET/SOCK_DGRAM socket usable to listen to DHCP server packets,
|
* Create a new AF_INET/SOCK_DGRAM socket usable to listen to DHCP server packets,
|
||||||
|
|
|
@ -440,7 +440,7 @@ static void print_help(void) {
|
||||||
" --ifindex IDX Index of interface to run on\n"
|
" --ifindex IDX Index of interface to run on\n"
|
||||||
" --mac HEX Hardware address to use\n"
|
" --mac HEX Hardware address to use\n"
|
||||||
" --broadcast-mac HEX Broadcast hardware address to use\n"
|
" --broadcast-mac HEX Broadcast hardware address to use\n"
|
||||||
" --requested-ip IP Requested IP adress\n"
|
" --requested-ip IP Requested IP address\n"
|
||||||
" --requested-lifetime SECS Requested lease lifetime in seconds\n"
|
" --requested-lifetime SECS Requested lease lifetime in seconds\n"
|
||||||
" --requested-parameters P1,P2,... Requested parameters\n"
|
" --requested-parameters P1,P2,... Requested parameters\n"
|
||||||
" --client-id HEX Client Identifier to use\n"
|
" --client-id HEX Client Identifier to use\n"
|
||||||
|
|
|
@ -85,7 +85,7 @@ static inline void test_setup(void) {
|
||||||
/*
|
/*
|
||||||
* Move into a new network and mount namespace both associated
|
* Move into a new network and mount namespace both associated
|
||||||
* with a new user namespace where the current eUID is mapped to
|
* with a new user namespace where the current eUID is mapped to
|
||||||
* 0. Then create a a private instance of /run/netns. This ensures
|
* 0. Then create a private instance of /run/netns. This ensures
|
||||||
* that any network devices or network namespaces are private to
|
* that any network devices or network namespaces are private to
|
||||||
* the test process.
|
* the test process.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -244,7 +244,7 @@ int packet_sendto_udp(int sockfd,
|
||||||
* @buf: buffor for payload
|
* @buf: buffor for payload
|
||||||
* @n_buf: max length of payload in bytes
|
* @n_buf: max length of payload in bytes
|
||||||
* @n_transmittedp: output argument for number transmitted bytes
|
* @n_transmittedp: output argument for number transmitted bytes
|
||||||
* @src: return argumnet for source address, or NULL, see ip(7)
|
* @src: return argument for source address, or NULL, see ip(7)
|
||||||
*
|
*
|
||||||
* Receives an UDP packet on a AF_PACKET socket. The difference between
|
* Receives an UDP packet on a AF_PACKET socket. The difference between
|
||||||
* this and recvfrom() on an AF_INET socket is that the packet will be
|
* this and recvfrom() on an AF_INET socket is that the packet will be
|
||||||
|
|
|
@ -58,7 +58,7 @@ NM_UTILS_LOOKUP_STR_DEFINE (_geterror,
|
||||||
* our own defines. For numbers that don't fall into this range, the numbers
|
* our own defines. For numbers that don't fall into this range, the numbers
|
||||||
* are identical to the common error numbers.
|
* are identical to the common error numbers.
|
||||||
*
|
*
|
||||||
* Idential to strerror(), g_strerror(), nm_strerror_native() for error numbers
|
* Identical to strerror(), g_strerror(), nm_strerror_native() for error numbers
|
||||||
* that are not in the reserved range of NetworkManager specific errors.
|
* that are not in the reserved range of NetworkManager specific errors.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): the string representation of the error number.
|
* Returns: (transfer none): the string representation of the error number.
|
||||||
|
@ -97,7 +97,7 @@ nm_strerror (int nmerr)
|
||||||
* string may be longer than @buf_size.
|
* string may be longer than @buf_size.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): a NUL terminated error message. This is either a static
|
* Returns: (transfer none): a NUL terminated error message. This is either a static
|
||||||
* string (that is never freed), or the provided @buf argumnt.
|
* string (that is never freed), or the provided @buf argument.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
nm_strerror_native_r (int errsv, char *buf, gsize buf_size)
|
nm_strerror_native_r (int errsv, char *buf, gsize buf_size)
|
||||||
|
|
|
@ -99,7 +99,7 @@ nm_hash_update (NMHashState *state, const void *ptr, gsize n)
|
||||||
nm_assert (n == 0 || ptr);
|
nm_assert (n == 0 || ptr);
|
||||||
|
|
||||||
/* Note: the data passed in here might be sensitive data (secrets),
|
/* Note: the data passed in here might be sensitive data (secrets),
|
||||||
* that we should nm_explicty_zero() afterwards. However, since
|
* that we should nm_explicit_bzero() afterwards. However, since
|
||||||
* we are using siphash24 with a random key, that is not really
|
* we are using siphash24 with a random key, that is not really
|
||||||
* necessary. Something to keep in mind, if we ever move away from
|
* necessary. Something to keep in mind, if we ever move away from
|
||||||
* this hash implementation. */
|
* this hash implementation. */
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* NMUtilsFileGetContentsFlags:
|
* NMUtilsFileGetContentsFlags:
|
||||||
* @NM_UTILS_FILE_GET_CONTENTS_FLAG_NONE: no flag
|
* @NM_UTILS_FILE_GET_CONTENTS_FLAG_NONE: no flag
|
||||||
* @NM_UTILS_FILE_GET_CONTENTS_FLAG_SECRET: if present, ensure that no
|
* @NM_UTILS_FILE_GET_CONTENTS_FLAG_SECRET: if present, ensure that no
|
||||||
* data is left in memory. Essentially, it means to call explicity_bzero()
|
* data is left in memory. Essentially, it means to call nm_explicit_bzero()
|
||||||
* to not leave key material on the heap (when reading secrets).
|
* to not leave key material on the heap (when reading secrets).
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -78,7 +78,7 @@ _gstr_append_string_len (GString *gstr,
|
||||||
* JSON can only contain UTF-8 and even the escape sequences can only escape Unicode
|
* JSON can only contain UTF-8 and even the escape sequences can only escape Unicode
|
||||||
* codepoints (but not binary).
|
* codepoints (but not binary).
|
||||||
*
|
*
|
||||||
* The argument is not a a string (in any known encoding), hence we cannot represent
|
* The argument is not a string (in any known encoding), hence we cannot represent
|
||||||
* it as a JSON string (which are unicode strings).
|
* it as a JSON string (which are unicode strings).
|
||||||
*
|
*
|
||||||
* Print an underscore instead of the invalid char :) */
|
* Print an underscore instead of the invalid char :) */
|
||||||
|
|
|
@ -1089,9 +1089,9 @@ nm_g_object_ref (gpointer obj)
|
||||||
static inline void
|
static inline void
|
||||||
nm_g_object_unref (gpointer obj)
|
nm_g_object_unref (gpointer obj)
|
||||||
{
|
{
|
||||||
/* g_object_unref() doesn't accept NULL. Usully, we workaround that
|
/* g_object_unref() doesn't accept NULL. Usually, we workaround that
|
||||||
* by using g_clear_object(), but sometimes that is not convenient
|
* by using g_clear_object(), but sometimes that is not convenient
|
||||||
* (for example as as destroy function for a hash table that can contain
|
* (for example as destroy function for a hash table that can contain
|
||||||
* NULL values). */
|
* NULL values). */
|
||||||
if (obj)
|
if (obj)
|
||||||
g_object_unref (obj);
|
g_object_unref (obj);
|
||||||
|
|
|
@ -70,7 +70,7 @@ _ASSERT (const RefString *rstr0)
|
||||||
* nm_ref_string_new_len:
|
* nm_ref_string_new_len:
|
||||||
* @cstr: the string to intern. Must contain @len bytes.
|
* @cstr: the string to intern. Must contain @len bytes.
|
||||||
* If @len is zero, @cstr may be %NULL. Note that it is
|
* If @len is zero, @cstr may be %NULL. Note that it is
|
||||||
* accetable that the string contains a NUL character
|
* acceptable that the string contains a NUL character
|
||||||
* within the first @len bytes. That is, the string is
|
* within the first @len bytes. That is, the string is
|
||||||
* not treated as a NUL terminated string, but as binary.
|
* not treated as a NUL terminated string, but as binary.
|
||||||
* Also, contrary to strncpy(), this will read all the
|
* Also, contrary to strncpy(), this will read all the
|
||||||
|
@ -83,7 +83,7 @@ _ASSERT (const RefString *rstr0)
|
||||||
* (at position @len).
|
* (at position @len).
|
||||||
*
|
*
|
||||||
* Note that NMRefString are always interned/deduplicated. If such a string
|
* Note that NMRefString are always interned/deduplicated. If such a string
|
||||||
* already exists, the existing instance will be refered and returned.
|
* already exists, the existing instance will be referred and returned.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Since all NMRefString are shared and interned, you may use
|
* Since all NMRefString are shared and interned, you may use
|
||||||
|
|
|
@ -165,7 +165,7 @@ gboolean nm_utils_memeqzero_secret (gconstpointer data, gsize length);
|
||||||
* Otherwise, this will allocate a new buffer of the desired size, copy over the
|
* Otherwise, this will allocate a new buffer of the desired size, copy over the
|
||||||
* old data, and bzero the old buffer before freeing it. As such, it also behaves
|
* old data, and bzero the old buffer before freeing it. As such, it also behaves
|
||||||
* similar to g_realloc(), with the overhead of nm_explicit_bzero() and using
|
* similar to g_realloc(), with the overhead of nm_explicit_bzero() and using
|
||||||
* malloc/free intead of realloc().
|
* malloc/free instead of realloc().
|
||||||
*
|
*
|
||||||
* Returns: the new allocated buffer. Think of it behaving like g_realloc().
|
* Returns: the new allocated buffer. Think of it behaving like g_realloc().
|
||||||
*/
|
*/
|
||||||
|
@ -200,7 +200,7 @@ nm_secret_mem_realloc (gpointer m_old, gboolean do_bzero_mem, gsize cur_len, gsi
|
||||||
* Otherwise, this will try to allocate a new buffer of the desired size, copy over the
|
* Otherwise, this will try to allocate a new buffer of the desired size, copy over the
|
||||||
* old data, and bzero the old buffer before freeing it. As such, it also behaves
|
* old data, and bzero the old buffer before freeing it. As such, it also behaves
|
||||||
* similar to g_try_realloc(), with the overhead of nm_explicit_bzero() and using
|
* similar to g_try_realloc(), with the overhead of nm_explicit_bzero() and using
|
||||||
* malloc/free intead of realloc().
|
* malloc/free instead of realloc().
|
||||||
*
|
*
|
||||||
* Returns: the new allocated buffer or NULL. Think of it behaving like g_try_realloc().
|
* Returns: the new allocated buffer or NULL. Think of it behaving like g_try_realloc().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -377,7 +377,7 @@ nm_utils_gbytes_equal_mem (GBytes *bytes,
|
||||||
gsize l;
|
gsize l;
|
||||||
|
|
||||||
if (!bytes) {
|
if (!bytes) {
|
||||||
/* as a special case, let %NULL GBytes compare idential
|
/* as a special case, let %NULL GBytes compare identical
|
||||||
* to an empty array. */
|
* to an empty array. */
|
||||||
return (mem_len == 0);
|
return (mem_len == 0);
|
||||||
}
|
}
|
||||||
|
@ -1479,7 +1479,7 @@ nm_utils_dbus_path_cmp (const char *dbus_path_a, const char *dbus_path_b)
|
||||||
if (n_a == -1 && n_b == -1)
|
if (n_a == -1 && n_b == -1)
|
||||||
goto comp_l;
|
goto comp_l;
|
||||||
|
|
||||||
/* both components must be convertiable to a number. If they are not,
|
/* both components must be convertible to a number. If they are not,
|
||||||
* (and only one of them is), then we must always strictly sort numeric parts
|
* (and only one of them is), then we must always strictly sort numeric parts
|
||||||
* after non-numeric components. If we wouldn't, we wouldn't have
|
* after non-numeric components. If we wouldn't, we wouldn't have
|
||||||
* a total order.
|
* a total order.
|
||||||
|
@ -3744,7 +3744,7 @@ nm_utils_g_slist_find_str (const GSList *list,
|
||||||
* @b: the right #GSList of strings to compare.
|
* @b: the right #GSList of strings to compare.
|
||||||
*
|
*
|
||||||
* Compares two string lists. The data elements are compared with
|
* Compares two string lists. The data elements are compared with
|
||||||
* strcmp(), alloing %NULL elements.
|
* strcmp(), allowing %NULL elements.
|
||||||
*
|
*
|
||||||
* Returns: 0, 1, or -1, depending on how the lists compare.
|
* Returns: 0, 1, or -1, depending on how the lists compare.
|
||||||
*/
|
*/
|
||||||
|
@ -4011,7 +4011,7 @@ nm_utils_memeqzero (gconstpointer data, gsize length)
|
||||||
* Returns: the binary value converted to a hex string. If @out is given,
|
* Returns: the binary value converted to a hex string. If @out is given,
|
||||||
* this always returns @out. If @out is %NULL, a newly allocated string
|
* this always returns @out. If @out is %NULL, a newly allocated string
|
||||||
* is returned. This never returns %NULL, for buffers of length zero
|
* is returned. This never returns %NULL, for buffers of length zero
|
||||||
* an empty string is returend.
|
* an empty string is returned.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
nm_utils_bin2hexstr_full (gconstpointer addr,
|
nm_utils_bin2hexstr_full (gconstpointer addr,
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ nm_g_set_error_take (GError **error, GError *error_take)
|
||||||
* NMUtilsError:
|
* NMUtilsError:
|
||||||
* @NM_UTILS_ERROR_UNKNOWN: unknown or unclassified error
|
* @NM_UTILS_ERROR_UNKNOWN: unknown or unclassified error
|
||||||
* @NM_UTILS_ERROR_CANCELLED_DISPOSING: when disposing an object that has
|
* @NM_UTILS_ERROR_CANCELLED_DISPOSING: when disposing an object that has
|
||||||
* pending aynchronous operations, the operation is cancelled with this
|
* pending asynchronous operations, the operation is cancelled with this
|
||||||
* error reason. Depending on the usage, this might indicate a bug because
|
* error reason. Depending on the usage, this might indicate a bug because
|
||||||
* usually the target object should stay alive as long as there are pending
|
* usually the target object should stay alive as long as there are pending
|
||||||
* operations.
|
* operations.
|
||||||
|
@ -1742,7 +1742,7 @@ static inline gboolean
|
||||||
nm_utils_process_state_is_dead (char pstate)
|
nm_utils_process_state_is_dead (char pstate)
|
||||||
{
|
{
|
||||||
/* "/proc/[pid]/stat" returns a state as the 3rd fields (see `man 5 proc`).
|
/* "/proc/[pid]/stat" returns a state as the 3rd fields (see `man 5 proc`).
|
||||||
* Some of these states indicate the the process is effectively dead (or a zombie).
|
* Some of these states indicate the process is effectively dead (or a zombie).
|
||||||
*/
|
*/
|
||||||
return NM_IN_SET (pstate, 'Z', 'x', 'X');
|
return NM_IN_SET (pstate, 'Z', 'x', 'X');
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,9 +85,9 @@ nm_str_buf_maybe_expand (NMStrBuf *strbuf,
|
||||||
* nm_str_buf_set_size:
|
* nm_str_buf_set_size:
|
||||||
* @strbuf: the initialized #NMStrBuf
|
* @strbuf: the initialized #NMStrBuf
|
||||||
* @new_len: the new length
|
* @new_len: the new length
|
||||||
* @honor_do_bzero_mem: if %TRUE, the shrinked memory will be cleared, if
|
* @honor_do_bzero_mem: if %TRUE, the shrunk memory will be cleared, if
|
||||||
* do_bzero_mem is set. This should be usually set to %TRUE, unless
|
* do_bzero_mem is set. This should be usually set to %TRUE, unless
|
||||||
* you know that the shrinked memory does not contain data that requires to be
|
* you know that the shrunk memory does not contain data that requires to be
|
||||||
* cleared. When growing the size, this value has no effect.
|
* cleared. When growing the size, this value has no effect.
|
||||||
* @reserve_exact: when growing the buffer, reserve the exact amount of bytes.
|
* @reserve_exact: when growing the buffer, reserve the exact amount of bytes.
|
||||||
* If %FALSE, the buffer may allocate more memory than requested to grow
|
* If %FALSE, the buffer may allocate more memory than requested to grow
|
||||||
|
|
|
@ -604,7 +604,7 @@ nmtstc_context_object_new_valist (GType gtype,
|
||||||
sync = TRUE;
|
sync = TRUE;
|
||||||
inside_loop = FALSE;
|
inside_loop = FALSE;
|
||||||
} else {
|
} else {
|
||||||
/* The caller allows to iterate the main context. That that point,
|
/* The caller allows to iterate the main context. On that point,
|
||||||
* we can both use the synchronous and the asynchronous initialization,
|
* we can both use the synchronous and the asynchronous initialization,
|
||||||
* both should yield the same result. Choose one randomly. */
|
* both should yield the same result. Choose one randomly. */
|
||||||
sync = nmtst_get_rand_bool ();
|
sync = nmtst_get_rand_bool ();
|
||||||
|
|
|
@ -57,7 +57,7 @@ nm_sd_utils_unbase64char (char ch, gboolean accept_padding_equal)
|
||||||
* @l: the length of @p. @p is not treated as NUL terminated string but
|
* @l: the length of @p. @p is not treated as NUL terminated string but
|
||||||
* merely as a buffer of ascii characters.
|
* merely as a buffer of ascii characters.
|
||||||
* @secure: whether the temporary memory will be cleared to avoid leaving
|
* @secure: whether the temporary memory will be cleared to avoid leaving
|
||||||
* secrets in memory (see also nm_explict_bzero()).
|
* secrets in memory (see also nm_explicit_bzero()).
|
||||||
* @mem: (transfer full): the decoded buffer on success.
|
* @mem: (transfer full): the decoded buffer on success.
|
||||||
* @len: the length of @mem on success.
|
* @len: the length of @mem on success.
|
||||||
*
|
*
|
||||||
|
|
|
@ -91,7 +91,7 @@ G_STMT_START { \
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* systemd cannot be compiled with "-Wdeclaration-after-statement". In particular
|
/* systemd cannot be compiled with "-Wdeclaration-after-statement". In particular
|
||||||
* in combintation with assert_cc(). */
|
* in combination with assert_cc(). */
|
||||||
NM_PRAGMA_WARNING_DISABLE ("-Wdeclaration-after-statement")
|
NM_PRAGMA_WARNING_DISABLE ("-Wdeclaration-after-statement")
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1344,7 +1344,7 @@ int safe_fork_full(
|
||||||
|
|
||||||
ppid = getppid();
|
ppid = getppid();
|
||||||
if (ppid == 0)
|
if (ppid == 0)
|
||||||
/* Parent is in a differn't PID namespace. */;
|
/* Parent is in a different PID namespace. */;
|
||||||
else if (ppid != original_pid) {
|
else if (ppid != original_pid) {
|
||||||
log_debug("Parent died early, raising SIGTERM.");
|
log_debug("Parent died early, raising SIGTERM.");
|
||||||
(void) raise(SIGTERM);
|
(void) raise(SIGTERM);
|
||||||
|
|
|
@ -77,7 +77,7 @@ int rdrand(unsigned long *ret) {
|
||||||
* hash functions for its hash tables, with a seed generated randomly. The hash tables
|
* hash functions for its hash tables, with a seed generated randomly. The hash tables
|
||||||
* systemd employs watch the fill level closely and reseed if necessary. This allows use of
|
* systemd employs watch the fill level closely and reseed if necessary. This allows use of
|
||||||
* a low quality RNG initially, as long as it improves should a hash table be under attack:
|
* a low quality RNG initially, as long as it improves should a hash table be under attack:
|
||||||
* the attacker after all needs to to trigger many collisions to exploit it for the purpose
|
* the attacker after all needs to trigger many collisions to exploit it for the purpose
|
||||||
* of DoS, but if doing so improves the seed the attack surface is reduced as the attack
|
* of DoS, but if doing so improves the seed the attack surface is reduced as the attack
|
||||||
* takes place.
|
* takes place.
|
||||||
*
|
*
|
||||||
|
|
|
@ -110,7 +110,7 @@ int socket_address_verify(const SocketAddress *a, bool strict) {
|
||||||
if (a->size != offsetof(struct sockaddr_un, sun_path) + (e - a->sockaddr.un.sun_path) + 1)
|
if (a->size != offsetof(struct sockaddr_un, sun_path) + (e - a->sockaddr.un.sun_path) + 1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
/* If there's no embedded NUL byte, then then the size needs to match the whole
|
/* If there's no embedded NUL byte, then the size needs to match the whole
|
||||||
* structure or the structure with one extra NUL byte suffixed. (Yeah, Linux is awful,
|
* structure or the structure with one extra NUL byte suffixed. (Yeah, Linux is awful,
|
||||||
* and considers both equivalent: getsockname() even extends sockaddr_un beyond its
|
* and considers both equivalent: getsockname() even extends sockaddr_un beyond its
|
||||||
* size if the path is non NUL terminated.)*/
|
* size if the path is non NUL terminated.)*/
|
||||||
|
|
|
@ -935,7 +935,7 @@ _conn_track_update (NMBluezManager *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cdata_el) {
|
if (!cdata_el) {
|
||||||
_LOGT ("connecton: track for %s, %s: %s (%s)",
|
_LOGT ("connection: track for %s, %s: %s (%s)",
|
||||||
nm_bluetooth_capability_to_string (bt_type, sbuf_cap, sizeof (sbuf_cap)),
|
nm_bluetooth_capability_to_string (bt_type, sbuf_cap, sizeof (sbuf_cap)),
|
||||||
bdaddr,
|
bdaddr,
|
||||||
nm_settings_connection_get_uuid (sett_conn),
|
nm_settings_connection_get_uuid (sett_conn),
|
||||||
|
@ -962,7 +962,7 @@ out_remove:
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
BzDBusObj *bzobj;
|
BzDBusObj *bzobj;
|
||||||
|
|
||||||
_LOGT ("connecton: untrack for %s, %s: %s (%s)",
|
_LOGT ("connection: untrack for %s, %s: %s (%s)",
|
||||||
nm_bluetooth_capability_to_string (cdata_el_remove->cdata_hd->bt_type, sbuf_cap, sizeof (sbuf_cap)),
|
nm_bluetooth_capability_to_string (cdata_el_remove->cdata_hd->bt_type, sbuf_cap, sizeof (sbuf_cap)),
|
||||||
cdata_el_remove->cdata_hd->bdaddr,
|
cdata_el_remove->cdata_hd->bdaddr,
|
||||||
nm_settings_connection_get_uuid (sett_conn),
|
nm_settings_connection_get_uuid (sett_conn),
|
||||||
|
@ -1564,7 +1564,7 @@ _process_change_idle_cb (gpointer user_data)
|
||||||
_process_change_idle_all (self, &emit_device_availability_changed);
|
_process_change_idle_all (self, &emit_device_availability_changed);
|
||||||
|
|
||||||
if (emit_device_availability_changed)
|
if (emit_device_availability_changed)
|
||||||
nm_manager_notify_device_availibility_maybe_changed (priv->manager);
|
nm_manager_notify_device_availability_maybe_changed (priv->manager);
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -2232,7 +2232,7 @@ _cleanup_for_name_owner (NMBluezManager *self)
|
||||||
nm_assert (g_hash_table_size (priv->bzobjs) == 0);
|
nm_assert (g_hash_table_size (priv->bzobjs) == 0);
|
||||||
|
|
||||||
if (emit_device_availability_changed)
|
if (emit_device_availability_changed)
|
||||||
nm_manager_notify_device_availibility_maybe_changed (priv->manager);
|
nm_manager_notify_device_availability_maybe_changed (priv->manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2481,7 +2481,7 @@ _connect_dun_step2_cb (NMBluez5DunContext *context,
|
||||||
bzobj = user_data;
|
bzobj = user_data;
|
||||||
|
|
||||||
if (rfcomm_dev) {
|
if (rfcomm_dev) {
|
||||||
/* We want to early notifiy about the rfcomm path. That is because we might still delay
|
/* We want to early notify about the rfcomm path. That is because we might still delay
|
||||||
* to signal full activation longer (asynchronously). But the earliest time the callback
|
* to signal full activation longer (asynchronously). But the earliest time the callback
|
||||||
* is invoked with the rfcomm path, we just created the device synchronously.
|
* is invoked with the rfcomm path, we just created the device synchronously.
|
||||||
*
|
*
|
||||||
|
|
|
@ -256,7 +256,7 @@ _connect_create_rfcomm (NMBluez5DunContext *context)
|
||||||
* not yet fully connected. However, we notify the caller about "what we learned
|
* not yet fully connected. However, we notify the caller about "what we learned
|
||||||
* so far". Note that this happens synchronously.
|
* so far". Note that this happens synchronously.
|
||||||
*
|
*
|
||||||
* The purpose is that once we proceed synchrnously, modem-manager races with
|
* The purpose is that once we proceed synchronously, modem-manager races with
|
||||||
* the detection of the modem. We want to notify the caller first about the
|
* the detection of the modem. We want to notify the caller first about the
|
||||||
* device name. */
|
* device name. */
|
||||||
context->cdat->callback (NULL,
|
context->cdat->callback (NULL,
|
||||||
|
|
|
@ -892,7 +892,7 @@ connect_bz_cb (NMBluezManager *bz_mgr,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!priv->is_connected) {
|
if (!priv->is_connected) {
|
||||||
/* we got the callback from NMBluezManager with succes. We actually should be
|
/* we got the callback from NMBluezManager with success. We actually should be
|
||||||
* connected and this line shouldn't be reached. */
|
* connected and this line shouldn't be reached. */
|
||||||
nm_assert_not_reached ();
|
nm_assert_not_reached ();
|
||||||
_LOGE (LOGD_BT, "bluetooth is unexpectedly not in connected state");
|
_LOGE (LOGD_BT, "bluetooth is unexpectedly not in connected state");
|
||||||
|
|
|
@ -1010,7 +1010,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
||||||
* remote side to handle the disconnection. Otherwise, the peer may
|
* remote side to handle the disconnection. Otherwise, the peer may
|
||||||
* get confused and fail to negotiate the new connection. (rh #1023503)
|
* get confused and fail to negotiate the new connection. (rh #1023503)
|
||||||
*
|
*
|
||||||
* FIXME(shutdown): when exiting, we also need to wait before quiting,
|
* FIXME(shutdown): when exiting, we also need to wait before quitting,
|
||||||
* at least for additional NM_SHUTDOWN_TIMEOUT_MS seconds because
|
* at least for additional NM_SHUTDOWN_TIMEOUT_MS seconds because
|
||||||
* otherwise after restart the device won't work for the first seconds.
|
* otherwise after restart the device won't work for the first seconds.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -72,7 +72,7 @@ typedef struct {
|
||||||
* UUID, or parent device permanent hardware address for @connection.
|
* UUID, or parent device permanent hardware address for @connection.
|
||||||
*
|
*
|
||||||
* Returns: the parent interface name, parent connection UUID, parent
|
* Returns: the parent interface name, parent connection UUID, parent
|
||||||
* device permenent hardware address, or %NULL
|
* device permanent hardware address, or %NULL
|
||||||
*/
|
*/
|
||||||
const char * (*get_connection_parent) (NMDeviceFactory *factory,
|
const char * (*get_connection_parent) (NMDeviceFactory *factory,
|
||||||
NMConnection *connection);
|
NMConnection *connection);
|
||||||
|
|
|
@ -32,9 +32,9 @@ _LOG_DECLARE_SELF(NMDeviceWireGuard);
|
||||||
* prompt, as the secret is cached (good??). */
|
* prompt, as the secret is cached (good??). */
|
||||||
|
|
||||||
/* TODO: unlike for other VPNs, we don't inject a direct route to the peers. That means,
|
/* TODO: unlike for other VPNs, we don't inject a direct route to the peers. That means,
|
||||||
* you might get a routing sceneraio where the peer (VPN server) is reachable via the VPN.
|
* you might get a routing scenario where the peer (VPN server) is reachable via the VPN.
|
||||||
* How we handle adding routes to external gateway for other peers, has severe issues
|
* How we handle adding routes to external gateway for other peers, has severe issues
|
||||||
* as well. We may use policy-routing like wg-quick does. See also disussions at
|
* as well. We may use policy-routing like wg-quick does. See also discussions at
|
||||||
* https://www.wireguard.com/netns/#improving-the-classic-solutions */
|
* https://www.wireguard.com/netns/#improving-the-classic-solutions */
|
||||||
|
|
||||||
/* TODO: honor the TTL of DNS to determine when to retry resolving endpoints. */
|
/* TODO: honor the TTL of DNS to determine when to retry resolving endpoints. */
|
||||||
|
@ -62,7 +62,7 @@ G_STATIC_ASSERT (NM_WIREGUARD_SYMMETRIC_KEY_LEN == NMP_WIREGUARD_SYMMETRIC_KEY_L
|
||||||
#define NEXT_TRY_AT_NSEC_PAST ((gint64) 1)
|
#define NEXT_TRY_AT_NSEC_PAST ((gint64) 1)
|
||||||
|
|
||||||
/* like %NEXT_TRY_AT_NSEC_ASAP, but used for indicating to retry ASAP for a @retry_in_msec value.
|
/* like %NEXT_TRY_AT_NSEC_ASAP, but used for indicating to retry ASAP for a @retry_in_msec value.
|
||||||
* That is a relative time duraction, contrary to @next_try_at_nsec which is an absolute
|
* That is a relative time duration, contrary to @next_try_at_nsec which is an absolute
|
||||||
* timestamp. */
|
* timestamp. */
|
||||||
#define RETRY_IN_MSEC_ASAP ((gint64) G_MAXINT64)
|
#define RETRY_IN_MSEC_ASAP ((gint64) G_MAXINT64)
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ _auto_default_route_get_auto_priority (const char *uuid)
|
||||||
* - use the connection's UUID as stable seed for the "random" number.
|
* - use the connection's UUID as stable seed for the "random" number.
|
||||||
* - have it smaller than RANGE_TOP (32766u - 1000u), where 32766u is the priority of the default
|
* - have it smaller than RANGE_TOP (32766u - 1000u), where 32766u is the priority of the default
|
||||||
* rules
|
* rules
|
||||||
* - we add 2 rules (PRIO_WIDTH). Hence only pick even priorites.
|
* - we add 2 rules (PRIO_WIDTH). Hence only pick even priorities.
|
||||||
* - pick one out of AUTO_RANDOM_RANGE. */
|
* - pick one out of AUTO_RANDOM_RANGE. */
|
||||||
|
|
||||||
rnd_seed = c_siphash_hash (NM_HASH_SEED_16 (0x99, 0x22, 0x4d, 0x7c, 0x37, 0xda, 0x8e, 0x7b, 0x2f, 0x55, 0x16, 0x7b, 0x75, 0xda, 0x42, 0xdc),
|
rnd_seed = c_siphash_hash (NM_HASH_SEED_16 (0x99, 0x22, 0x4d, 0x7c, 0x37, 0xda, 0x8e, 0x7b, 0x2f, 0x55, 0x16, 0x7b, 0x75, 0xda, 0x42, 0xdc),
|
||||||
|
|
|
@ -2193,7 +2193,7 @@ _stats_refresh_rate_real (guint refresh_rate_ms)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (refresh_rate_ms < STATS_REFRESH_RATE_MS_MIN) {
|
if (refresh_rate_ms < STATS_REFRESH_RATE_MS_MIN) {
|
||||||
/* you cannot set the refresh-rate arbitrarly small. E.g.
|
/* you cannot set the refresh-rate arbitrarily small. E.g.
|
||||||
* setting to 1ms is just killing. Have a lowest number. */
|
* setting to 1ms is just killing. Have a lowest number. */
|
||||||
return STATS_REFRESH_RATE_MS_MIN;
|
return STATS_REFRESH_RATE_MS_MIN;
|
||||||
}
|
}
|
||||||
|
@ -3239,7 +3239,7 @@ concheck_update_state (NMDevice *self,
|
||||||
/* If the connectivity check is disabled and we obtain a fake
|
/* If the connectivity check is disabled and we obtain a fake
|
||||||
* result, make an optimistic guess. */
|
* result, make an optimistic guess. */
|
||||||
if (priv->state == NM_DEVICE_STATE_ACTIVATED) {
|
if (priv->state == NM_DEVICE_STATE_ACTIVATED) {
|
||||||
/* FIXME: the fake connectivity state depends on the availablility of
|
/* FIXME: the fake connectivity state depends on the availability of
|
||||||
* a default route. However, we have no mechanism that rechecks the
|
* a default route. However, we have no mechanism that rechecks the
|
||||||
* value if a device route appears/disappears after the device
|
* value if a device route appears/disappears after the device
|
||||||
* was activated. */
|
* was activated. */
|
||||||
|
@ -3252,7 +3252,7 @@ concheck_update_state (NMDevice *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->concheck_x[IS_IPv4].state == state) {
|
if (priv->concheck_x[IS_IPv4].state == state) {
|
||||||
/* we got a connectivty update, but the state didn't change. If we were probing,
|
/* we got a connectivity update, but the state didn't change. If we were probing,
|
||||||
* we bump the probe frequency. */
|
* we bump the probe frequency. */
|
||||||
if (allow_periodic_bump)
|
if (allow_periodic_bump)
|
||||||
concheck_periodic_schedule_set (self, addr_family, CONCHECK_SCHEDULE_RETURNED_BUMP);
|
concheck_periodic_schedule_set (self, addr_family, CONCHECK_SCHEDULE_RETURNED_BUMP);
|
||||||
|
@ -8881,7 +8881,7 @@ connection_requires_carrier (NMConnection *connection)
|
||||||
gboolean ip4_used = FALSE, ip6_used = FALSE;
|
gboolean ip4_used = FALSE, ip6_used = FALSE;
|
||||||
|
|
||||||
/* We can progress to IP_CONFIG now, so that we're enslaved.
|
/* We can progress to IP_CONFIG now, so that we're enslaved.
|
||||||
* That may actually cause carrier to go up and thus continue acivation. */
|
* That may actually cause carrier to go up and thus continue activation. */
|
||||||
s_con = nm_connection_get_setting_connection (connection);
|
s_con = nm_connection_get_setting_connection (connection);
|
||||||
if (nm_setting_connection_get_master (s_con))
|
if (nm_setting_connection_get_master (s_con))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -1220,7 +1220,7 @@ ovsdb_got_echo (NMOvsdb *self, json_int_t id, json_t *data)
|
||||||
/**
|
/**
|
||||||
* ovsdb_got_msg::
|
* ovsdb_got_msg::
|
||||||
*
|
*
|
||||||
* Called when when a complete JSON object was seen and unmarshalled.
|
* Called when a complete JSON object was seen and unmarshalled.
|
||||||
* Either finishes a method call or processes a method call.
|
* Either finishes a method call or processes a method call.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -1922,7 +1922,7 @@ schedule_periodic_scan (NMDeviceIwd *self, gboolean initial_scan)
|
||||||
* (initial_scan && disconnected) override priv->scanning below
|
* (initial_scan && disconnected) override priv->scanning below
|
||||||
* because of an IWD quirk where a device will often be in the
|
* because of an IWD quirk where a device will often be in the
|
||||||
* autoconnect state and scanning at the time of our initial_scan,
|
* autoconnect state and scanning at the time of our initial_scan,
|
||||||
* but our logic will the send it a Disconnect() causeing IWD to
|
* but our logic will the send it a Disconnect() causing IWD to
|
||||||
* exit autoconnect and interrupt the ongoing scan, meaning that
|
* exit autoconnect and interrupt the ongoing scan, meaning that
|
||||||
* we still want a new scan ASAP.
|
* we still want a new scan ASAP.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -824,7 +824,7 @@ maybe_add_option (NMDhcpClient *self,
|
||||||
|
|
||||||
/* dhclient has no special labels for private dhcp options: it uses "unknown_xyz"
|
/* dhclient has no special labels for private dhcp options: it uses "unknown_xyz"
|
||||||
* labels for that. We need to identify those to alias them to our "private_xyz"
|
* labels for that. We need to identify those to alias them to our "private_xyz"
|
||||||
* format unsed in the internal dchp plugins.
|
* format unused in the internal dchp plugins.
|
||||||
*/
|
*/
|
||||||
if ((priv_opt_num = label_is_unknown_xyz (key)) > 0) {
|
if ((priv_opt_num = label_is_unknown_xyz (key)) > 0) {
|
||||||
gs_free guint8 *check_val = NULL;
|
gs_free guint8 *check_val = NULL;
|
||||||
|
|
|
@ -94,7 +94,7 @@ _client_factory_get_gtype (const NMDhcpClientFactory *client_factory,
|
||||||
* Supporting reloading the plugin would also require to re-evalate the decisions from
|
* Supporting reloading the plugin would also require to re-evalate the decisions from
|
||||||
* the "Device List Format". Likewise, having per-address family plugins would make the
|
* the "Device List Format". Likewise, having per-address family plugins would make the
|
||||||
* "main.dhcp" setting and "dhcp-plugin:" match non-sensical because these configurations
|
* "main.dhcp" setting and "dhcp-plugin:" match non-sensical because these configurations
|
||||||
* currently are address family independet.
|
* currently are address family independent.
|
||||||
*
|
*
|
||||||
* So actually, we don't want that complexity. We want to phase out all plugins in favor
|
* So actually, we don't want that complexity. We want to phase out all plugins in favor
|
||||||
* of the internal plugin.
|
* of the internal plugin.
|
||||||
|
|
|
@ -1304,7 +1304,7 @@ ip4_start (NMDhcpClient *client,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME:
|
* FIXME:
|
||||||
* Select, or configure, a reasonable start delay, to protect poor servers beeing flooded.
|
* Select, or configure, a reasonable start delay, to protect poor servers being flooded.
|
||||||
*/
|
*/
|
||||||
n_dhcp4_client_probe_config_set_start_delay (config, 1);
|
n_dhcp4_client_probe_config_set_start_delay (config, 1);
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ _gl_pid_spawn_register_for_termination (void)
|
||||||
{
|
{
|
||||||
if ( gl_pid.pid > 0
|
if ( gl_pid.pid > 0
|
||||||
&& !gl_pid.terminate_handle) {
|
&& !gl_pid.terminate_handle) {
|
||||||
/* Create a shtudown handle as a reminder that the currently running process must be terminated
|
/* Create a shutdown handle as a reminder that the currently running process must be terminated
|
||||||
* first. This also happens to block shutdown... */
|
* first. This also happens to block shutdown... */
|
||||||
gl_pid.terminate_handle = nm_shutdown_wait_obj_register_handle_full (g_strdup_printf ("kill-dnsmasq-process-%"G_PID_FORMAT, gl_pid.pid), TRUE);
|
gl_pid.terminate_handle = nm_shutdown_wait_obj_register_handle_full (g_strdup_printf ("kill-dnsmasq-process-%"G_PID_FORMAT, gl_pid.pid), TRUE);
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ _gl_pid_spawn_register_for_termination (void)
|
||||||
* for two purposes:
|
* for two purposes:
|
||||||
*
|
*
|
||||||
* - signal that the dnsmasq process was spawned (or failed to be spawned).
|
* - signal that the dnsmasq process was spawned (or failed to be spawned).
|
||||||
* - signal that the dnsmasq process quit (if it was spawned sucessfully before).
|
* - signal that the dnsmasq process quit (if it was spawned successfully before).
|
||||||
*
|
*
|
||||||
* Depending on the arguments, the callee can see what's the case.
|
* Depending on the arguments, the callee can see what's the case.
|
||||||
*/
|
*/
|
||||||
|
@ -540,7 +540,7 @@ _gl_pid_spawn_next_step (void)
|
||||||
* @dm_binary: the binary name for dnsmasq to spawn. We could
|
* @dm_binary: the binary name for dnsmasq to spawn. We could
|
||||||
* detect it ad-hoc right when needing it. But that would be
|
* detect it ad-hoc right when needing it. But that would be
|
||||||
* asynchronously, and if dnsmasq is not in $PATH, we want to
|
* asynchronously, and if dnsmasq is not in $PATH, we want to
|
||||||
* fail right away (synchrounously). Hence, @dm_binary is
|
* fail right away (synchronously). Hence, @dm_binary is
|
||||||
* an argument.
|
* an argument.
|
||||||
* @cancellable: abort the operation. This will invoke the callback
|
* @cancellable: abort the operation. This will invoke the callback
|
||||||
* a last time. Also, if the dnsmasq process is currently running,
|
* a last time. Also, if the dnsmasq process is currently running,
|
||||||
|
|
|
@ -625,7 +625,7 @@ create_resolv_conf (const char *const*searches,
|
||||||
|
|
||||||
if (search_base_idx > 0) {
|
if (search_base_idx > 0) {
|
||||||
if (str->len - search_base_idx + 1 + l > 254) {
|
if (str->len - search_base_idx + 1 + l > 254) {
|
||||||
/* this entry crosses the 256 character boundery. Older glibc versions
|
/* this entry crosses the 256 character boundary. Older glibc versions
|
||||||
* would truncate the entry at this point.
|
* would truncate the entry at this point.
|
||||||
*
|
*
|
||||||
* Fill the line with spaces to cross the 256 char boundary and continue
|
* Fill the line with spaces to cross the 256 char boundary and continue
|
||||||
|
@ -977,7 +977,7 @@ update_resolv_conf (NMDnsManager *self,
|
||||||
RESOLV_CONF_TMP,
|
RESOLV_CONF_TMP,
|
||||||
nm_strerror_native (errsv));
|
nm_strerror_native (errsv));
|
||||||
_LOGT ("update-resolv-conf: write internal file %s succeeded "
|
_LOGT ("update-resolv-conf: write internal file %s succeeded "
|
||||||
"but canot delete temporary file %s: %s",
|
"but cannot delete temporary file %s: %s",
|
||||||
MY_RESOLV_CONF, RESOLV_CONF_TMP, nm_strerror_native (errsv));
|
MY_RESOLV_CONF, RESOLV_CONF_TMP, nm_strerror_native (errsv));
|
||||||
return SR_ERROR;
|
return SR_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ nm_dnsmasq_utils_get_range (const NMPlatformIP4Address *addr,
|
||||||
*
|
*
|
||||||
* In this case, only a /24 portion of the subnet is used.
|
* In this case, only a /24 portion of the subnet is used.
|
||||||
* No particular reason for that, but it's unlikely that a user
|
* No particular reason for that, but it's unlikely that a user
|
||||||
* would use NetworkManager's shared method when having hundered
|
* would use NetworkManager's shared method when having hundred
|
||||||
* of DHCP clients. So, restrict the range to the same /24 in
|
* of DHCP clients. So, restrict the range to the same /24 in
|
||||||
* which the host address lies.
|
* which the host address lies.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -135,7 +135,7 @@ get_secrets_cb (NMSettingsConnection *connection,
|
||||||
* @callback:
|
* @callback:
|
||||||
* @callback_data:
|
* @callback_data:
|
||||||
*
|
*
|
||||||
* Asnychronously starts the request for secrets. This function cannot
|
* Asynchronously starts the request for secrets. This function cannot
|
||||||
* fail.
|
* fail.
|
||||||
*
|
*
|
||||||
* The return call-id can be used to cancel the request. You are
|
* The return call-id can be used to cancel the request. You are
|
||||||
|
|
|
@ -80,7 +80,7 @@ nm_auth_chain_parent_lst_list (NMAuthChain *self)
|
||||||
|
|
||||||
/* Caller must free returned error description */
|
/* Caller must free returned error description */
|
||||||
gboolean nm_auth_is_subject_in_acl (NMConnection *connection,
|
gboolean nm_auth_is_subject_in_acl (NMConnection *connection,
|
||||||
NMAuthSubject *subect,
|
NMAuthSubject *subject,
|
||||||
char **out_error_desc);
|
char **out_error_desc);
|
||||||
|
|
||||||
gboolean nm_auth_is_subject_in_acl_set_error (NMConnection *connection,
|
gboolean nm_auth_is_subject_in_acl_set_error (NMConnection *connection,
|
||||||
|
|
|
@ -32,7 +32,7 @@ typedef struct {
|
||||||
NMDeviceState state;
|
NMDeviceState state;
|
||||||
bool is_software:1;
|
bool is_software:1;
|
||||||
bool realized:1;
|
bool realized:1;
|
||||||
bool activation_lifetime_bound_to_profile_visiblity:1;
|
bool activation_lifetime_bound_to_profile_visibility:1;
|
||||||
NMUnmanFlagOp unmanaged_explicit;
|
NMUnmanFlagOp unmanaged_explicit;
|
||||||
NMActivationReason activation_reason;
|
NMActivationReason activation_reason;
|
||||||
gulong dev_exported_change_id;
|
gulong dev_exported_change_id;
|
||||||
|
@ -292,7 +292,7 @@ restore_and_activate_connection (NMCheckpoint *self,
|
||||||
subject,
|
subject,
|
||||||
NM_ACTIVATION_TYPE_MANAGED,
|
NM_ACTIVATION_TYPE_MANAGED,
|
||||||
dev_checkpoint->activation_reason,
|
dev_checkpoint->activation_reason,
|
||||||
dev_checkpoint->activation_lifetime_bound_to_profile_visiblity
|
dev_checkpoint->activation_lifetime_bound_to_profile_visibility
|
||||||
? NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY
|
? NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY
|
||||||
: NM_ACTIVATION_STATE_FLAG_NONE,
|
: NM_ACTIVATION_STATE_FLAG_NONE,
|
||||||
&local_error)) {
|
&local_error)) {
|
||||||
|
@ -550,7 +550,7 @@ device_checkpoint_create (NMCheckpoint *checkpoint, NMDevice *device)
|
||||||
dev_checkpoint->settings_connection = nm_simple_connection_new_clone (nm_settings_connection_get_connection (settings_connection));
|
dev_checkpoint->settings_connection = nm_simple_connection_new_clone (nm_settings_connection_get_connection (settings_connection));
|
||||||
dev_checkpoint->ac_version_id = nm_active_connection_version_id_get (NM_ACTIVE_CONNECTION (act_request));
|
dev_checkpoint->ac_version_id = nm_active_connection_version_id_get (NM_ACTIVE_CONNECTION (act_request));
|
||||||
dev_checkpoint->activation_reason = nm_active_connection_get_activation_reason (NM_ACTIVE_CONNECTION (act_request));
|
dev_checkpoint->activation_reason = nm_active_connection_get_activation_reason (NM_ACTIVE_CONNECTION (act_request));
|
||||||
dev_checkpoint->activation_lifetime_bound_to_profile_visiblity = NM_FLAGS_HAS (nm_active_connection_get_state_flags (NM_ACTIVE_CONNECTION (act_request)),
|
dev_checkpoint->activation_lifetime_bound_to_profile_visibility = NM_FLAGS_HAS (nm_active_connection_get_state_flags (NM_ACTIVE_CONNECTION (act_request)),
|
||||||
NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY);
|
NM_ACTIVATION_STATE_FLAG_LIFETIME_BOUND_TO_PROFILE_VISIBILITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2475,7 +2475,7 @@ again:
|
||||||
gsize seed_len;
|
gsize seed_len;
|
||||||
|
|
||||||
if (!allow_fake) {
|
if (!allow_fake) {
|
||||||
/* we don't allow generating (and memoizing) a fake key.
|
/* we don't allow generating (and memorizing) a fake key.
|
||||||
* Signal that no valid machine-id exists. */
|
* Signal that no valid machine-id exists. */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -3322,14 +3322,14 @@ nm_utils_stable_id_parse (const char *stable_id,
|
||||||
_stable_id_append (str, hwaddr);
|
_stable_id_append (str, hwaddr);
|
||||||
else if (g_str_has_prefix (&stable_id[i], "${RANDOM}")) {
|
else if (g_str_has_prefix (&stable_id[i], "${RANDOM}")) {
|
||||||
/* RANDOM makes not so much sense for cloned-mac-address
|
/* RANDOM makes not so much sense for cloned-mac-address
|
||||||
* as the result is similar to specyifing "cloned-mac-address=random".
|
* as the result is similar to specifying "cloned-mac-address=random".
|
||||||
* It makes however sense for RFC 7217 Stable Privacy IPv6 addresses
|
* It makes however sense for RFC 7217 Stable Privacy IPv6 addresses
|
||||||
* where this is effectively the only way to generate a different
|
* where this is effectively the only way to generate a different
|
||||||
* (random) host identifier for each connect.
|
* (random) host identifier for each connect.
|
||||||
*
|
*
|
||||||
* With RANDOM, the user can switch the lifetime of the
|
* With RANDOM, the user can switch the lifetime of the
|
||||||
* generated cloned-mac-address and IPv6 host identifier
|
* generated cloned-mac-address and IPv6 host identifier
|
||||||
* by toggeling only the stable-id property of the connection.
|
* by toggling only the stable-id property of the connection.
|
||||||
* With RANDOM being the most short-lived, ~non-stable~ variant.
|
* With RANDOM being the most short-lived, ~non-stable~ variant.
|
||||||
*/
|
*/
|
||||||
if (str)
|
if (str)
|
||||||
|
@ -3423,7 +3423,7 @@ _set_stable_privacy (NMUtilsStableType stable_type,
|
||||||
* That is no real problem and it is still impossible to
|
* That is no real problem and it is still impossible to
|
||||||
* force a collision here, because of how the remaining
|
* force a collision here, because of how the remaining
|
||||||
* fields are hashed. That is, as we also hash @host_id_len
|
* fields are hashed. That is, as we also hash @host_id_len
|
||||||
* and the terminating '\0' of @network_id, it is unambigiously
|
* and the terminating '\0' of @network_id, it is unambiguously
|
||||||
* possible to revert the process and deduce the @stable_type.
|
* possible to revert the process and deduce the @stable_type.
|
||||||
*/
|
*/
|
||||||
g_checksum_update (sum, &stable_type_uint8, sizeof (stable_type_uint8));
|
g_checksum_update (sum, &stable_type_uint8, sizeof (stable_type_uint8));
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ _obj_register (NMDBusManager *self,
|
||||||
nm_assert (!c_list_is_empty (&obj->internal.registration_lst_head));
|
nm_assert (!c_list_is_empty (&obj->internal.registration_lst_head));
|
||||||
|
|
||||||
/* Currently, the interfaces of an object do not changed and strictly depend on the object glib type.
|
/* Currently, the interfaces of an object do not changed and strictly depend on the object glib type.
|
||||||
* We don't need more flixibility, and it simplifies the code. Hence, now emit interface-added
|
* We don't need more flexibility, and it simplifies the code. Hence, now emit interface-added
|
||||||
* signal for the new object.
|
* signal for the new object.
|
||||||
*
|
*
|
||||||
* Warning: note that if @obj's notify signal is currently blocked via g_object_freeze_notify(),
|
* Warning: note that if @obj's notify signal is currently blocked via g_object_freeze_notify(),
|
||||||
|
|
|
@ -146,7 +146,7 @@ static gboolean
|
||||||
_get_running (NMFirewallManagerPrivate *priv)
|
_get_running (NMFirewallManagerPrivate *priv)
|
||||||
{
|
{
|
||||||
/* when starting, we need to asynchronously check whether there is
|
/* when starting, we need to asynchronously check whether there is
|
||||||
* a name owner. During that time we optimistially assume that the
|
* a name owner. During that time we optimistically assume that the
|
||||||
* service is indeed running. That is the time when we queue the
|
* service is indeed running. That is the time when we queue the
|
||||||
* requests, and they will be started once the get-name-owner call
|
* requests, and they will be started once the get-name-owner call
|
||||||
* returns. */
|
* returns. */
|
||||||
|
|
|
@ -700,7 +700,7 @@ initited:
|
||||||
/* on systems where a lot of devices are created and go away, the index contains
|
/* on systems where a lot of devices are created and go away, the index contains
|
||||||
* a lot of stale entries. We must from time to time clean them up.
|
* a lot of stale entries. We must from time to time clean them up.
|
||||||
*
|
*
|
||||||
* Do do this cleanup, whenever we have more enties then 2 times the number of links. */
|
* Do do this cleanup, whenever we have more entries then 2 times the number of links. */
|
||||||
if (G_UNLIKELY (g_hash_table_size (priv->device_route_metrics) > NM_MAX (20, n_links * 2))) {
|
if (G_UNLIKELY (g_hash_table_size (priv->device_route_metrics) > NM_MAX (20, n_links * 2))) {
|
||||||
/* from time to time, we need to do some house-keeping and prune stale entries.
|
/* from time to time, we need to do some house-keeping and prune stale entries.
|
||||||
* Otherwise, on a system where interfaces frequently come and go (docker), we
|
* Otherwise, on a system where interfaces frequently come and go (docker), we
|
||||||
|
@ -3300,7 +3300,7 @@ _register_device_factory (NMDeviceFactory *factory, gpointer user_data)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
nm_manager_notify_device_availibility_maybe_changed (NMManager *self)
|
nm_manager_notify_device_availability_maybe_changed (NMManager *self)
|
||||||
{
|
{
|
||||||
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
|
NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self);
|
||||||
NMDevice *device;
|
NMDevice *device;
|
||||||
|
|
|
@ -191,7 +191,7 @@ void nm_manager_dbus_set_property_handle (NMDBusObject *obj,
|
||||||
|
|
||||||
NMMetered nm_manager_get_metered (NMManager *self);
|
NMMetered nm_manager_get_metered (NMManager *self);
|
||||||
|
|
||||||
void nm_manager_notify_device_availibility_maybe_changed (NMManager *self);
|
void nm_manager_notify_device_availability_maybe_changed (NMManager *self);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ device_ip6_prefix_delegated (NMDevice *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == priv->ip6_prefix_delegations->len) {
|
if (i == priv->ip6_prefix_delegations->len) {
|
||||||
/* Allocate a delegation delegation for new prefix. */
|
/* Allocate a delegation for new prefix. */
|
||||||
g_array_set_size (priv->ip6_prefix_delegations, i + 1);
|
g_array_set_size (priv->ip6_prefix_delegations, i + 1);
|
||||||
delegation = &g_array_index (priv->ip6_prefix_delegations, IP6PrefixDelegation, i);
|
delegation = &g_array_index (priv->ip6_prefix_delegations, IP6PrefixDelegation, i);
|
||||||
delegation->subnets = g_hash_table_new (nm_direct_hash, NULL);
|
delegation->subnets = g_hash_table_new (nm_direct_hash, NULL);
|
||||||
|
|
|
@ -152,7 +152,7 @@ G_STATIC_ASSERT (RTA_MAX == (__RTA_MAX - 1));
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* Appeared in in kernel prior to 3.13 dated 19 January, 2014 */
|
/* Appeared in the kernel prior to 3.13 dated 19 January, 2014 */
|
||||||
#ifndef ARPHRD_6LOWPAN
|
#ifndef ARPHRD_6LOWPAN
|
||||||
#define ARPHRD_6LOWPAN 825
|
#define ARPHRD_6LOWPAN 825
|
||||||
#endif
|
#endif
|
||||||
|
@ -271,7 +271,7 @@ struct _ifla_vf_vlan_info {
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* Appeared in in kernel 4.0 dated April 12, 2015 */
|
/* Appeared in the kernel 4.0 dated April 12, 2015 */
|
||||||
#ifndef BRIDGE_VLAN_INFO_RANGE_BEGIN
|
#ifndef BRIDGE_VLAN_INFO_RANGE_BEGIN
|
||||||
#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3) /* VLAN is start of vlan range */
|
#define BRIDGE_VLAN_INFO_RANGE_BEGIN (1 << 3) /* VLAN is start of vlan range */
|
||||||
#define BRIDGE_VLAN_INFO_RANGE_END (1 << 4) /* VLAN is end of vlan range */
|
#define BRIDGE_VLAN_INFO_RANGE_END (1 << 4) /* VLAN is end of vlan range */
|
||||||
|
@ -1050,12 +1050,12 @@ _linktype_get_type (NMPlatform *platform,
|
||||||
* it means that their type may not have been determined correctly
|
* it means that their type may not have been determined correctly
|
||||||
* due to race conditions while accessing sysfs.
|
* due to race conditions while accessing sysfs.
|
||||||
*
|
*
|
||||||
* This way, we save edditional ethtool/sysctl lookups, but moreover,
|
* This way, we save additional ethtool/sysctl lookups, but moreover,
|
||||||
* we keep the linktype stable and don't change it as long as the link
|
* we keep the linktype stable and don't change it as long as the link
|
||||||
* exists.
|
* exists.
|
||||||
*
|
*
|
||||||
* Note that kernel *can* reuse the ifindex (on integer overflow, and
|
* Note that kernel *can* reuse the ifindex (on integer overflow, and
|
||||||
* when moving interfce to other netns). Thus here there is a tiny potential
|
* when moving interface to other netns). Thus here there is a tiny potential
|
||||||
* of messing stuff up. */
|
* of messing stuff up. */
|
||||||
if ( obj
|
if ( obj
|
||||||
&& obj->_link.netlink.is_in_netlink
|
&& obj->_link.netlink.is_in_netlink
|
||||||
|
@ -2602,7 +2602,7 @@ again:
|
||||||
&p->endpoint) < 0)
|
&p->endpoint) < 0)
|
||||||
goto toobig_peers;
|
goto toobig_peers;
|
||||||
} else {
|
} else {
|
||||||
/* I think there is no way to clear an endpoint, though there shold be. */
|
/* I think there is no way to clear an endpoint, though there should be. */
|
||||||
nm_assert (p->endpoint.sa.sa_family == AF_UNSPEC);
|
nm_assert (p->endpoint.sa.sa_family == AF_UNSPEC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2839,7 +2839,7 @@ _new_from_nl_link (NMPlatform *platform, const NMPCache *cache, struct nlmsghdr
|
||||||
if (!tb[IFLA_MTU]) {
|
if (!tb[IFLA_MTU]) {
|
||||||
/* Kernel has two places that send RTM_GETLINK messages:
|
/* Kernel has two places that send RTM_GETLINK messages:
|
||||||
* net/core/rtnetlink.c and net/wireless/ext-core.c.
|
* net/core/rtnetlink.c and net/wireless/ext-core.c.
|
||||||
* Unfotunatelly ext-core.c sets only IFLA_WIRELESS and
|
* Unfortunately ext-core.c sets only IFLA_WIRELESS and
|
||||||
* IFLA_IFNAME. This confuses code in this function, because
|
* IFLA_IFNAME. This confuses code in this function, because
|
||||||
* it cannot get complete set of data for the interface and
|
* it cannot get complete set of data for the interface and
|
||||||
* later incomplete object this function creates is used to
|
* later incomplete object this function creates is used to
|
||||||
|
@ -3162,7 +3162,7 @@ _new_from_nl_addr (struct nlmsghdr *nlh, gboolean id_only)
|
||||||
* If IFA_LOCAL is missing, IFA_ADDRESS is @address and @peer_address
|
* If IFA_LOCAL is missing, IFA_ADDRESS is @address and @peer_address
|
||||||
* is :: (all-zero).
|
* is :: (all-zero).
|
||||||
*
|
*
|
||||||
* If unexpectely IFA_ADDRESS is missing, make the best of it -- but it _should_
|
* If unexpectedly IFA_ADDRESS is missing, make the best of it -- but it _should_
|
||||||
* actually be there. */
|
* actually be there. */
|
||||||
if (tb[IFA_ADDRESS] || tb[IFA_LOCAL]) {
|
if (tb[IFA_ADDRESS] || tb[IFA_LOCAL]) {
|
||||||
if (tb[IFA_LOCAL]) {
|
if (tb[IFA_LOCAL]) {
|
||||||
|
@ -8736,7 +8736,7 @@ continue_reading:
|
||||||
* NL_PROCEED. */
|
* NL_PROCEED. */
|
||||||
} else if (hdr->nlmsg_type == NLMSG_OVERRUN) {
|
} else if (hdr->nlmsg_type == NLMSG_OVERRUN) {
|
||||||
/* Data got lost, report back to user. The default action is to
|
/* Data got lost, report back to user. The default action is to
|
||||||
* quit parsing. The user may overrule this action by retuning
|
* quit parsing. The user may overrule this action by returning
|
||||||
* NL_SKIP or NL_PROCEED (dangerous) */
|
* NL_SKIP or NL_PROCEED (dangerous) */
|
||||||
err = -NME_NL_MSG_OVERFLOW;
|
err = -NME_NL_MSG_OVERFLOW;
|
||||||
abort_parsing = TRUE;
|
abort_parsing = TRUE;
|
||||||
|
|
|
@ -526,7 +526,7 @@ _nest_end (struct nl_msg *msg, struct nlattr *start, int keep_empty)
|
||||||
if (pad > 0) {
|
if (pad > 0) {
|
||||||
/*
|
/*
|
||||||
* Data inside attribute does not end at a alignment boundary.
|
* Data inside attribute does not end at a alignment boundary.
|
||||||
* Pad accordingly and accoun for the additional space in
|
* Pad accordingly and account for the additional space in
|
||||||
* the message. nlmsg_reserve() may never fail in this situation,
|
* the message. nlmsg_reserve() may never fail in this situation,
|
||||||
* the allocate message buffer must be a multiple of NLMSG_ALIGNTO.
|
* the allocate message buffer must be a multiple of NLMSG_ALIGNTO.
|
||||||
*/
|
*/
|
||||||
|
@ -1184,7 +1184,7 @@ continue_reading:
|
||||||
goto skip;
|
goto skip;
|
||||||
|
|
||||||
/* Data got lost, report back to user. The default action is to
|
/* Data got lost, report back to user. The default action is to
|
||||||
* quit parsing. The user may overrule this action by retuning
|
* quit parsing. The user may overrule this action by returning
|
||||||
* NL_SKIP or NL_PROCEED (dangerous) */
|
* NL_SKIP or NL_PROCEED (dangerous) */
|
||||||
else if (hdr->nlmsg_type == NLMSG_OVERRUN) {
|
else if (hdr->nlmsg_type == NLMSG_OVERRUN) {
|
||||||
nmerr = -NME_NL_MSG_OVERFLOW;
|
nmerr = -NME_NL_MSG_OVERFLOW;
|
||||||
|
|
|
@ -219,7 +219,7 @@ again:
|
||||||
* calling it again should have no bad effect (just setting the same thing more than once).
|
* calling it again should have no bad effect (just setting the same thing more than once).
|
||||||
*
|
*
|
||||||
* The only potential bad thing is if there was a race involving swapping names, and we just
|
* The only potential bad thing is if there was a race involving swapping names, and we just
|
||||||
* set the ioctl option on the wrong device. But then the bad thing already happend and
|
* set the ioctl option on the wrong device. But then the bad thing already happenned and
|
||||||
* we cannot detect it (nor do anything about it). At least, we can retry and set the
|
* we cannot detect it (nor do anything about it). At least, we can retry and set the
|
||||||
* option on the right interface. */
|
* option on the right interface. */
|
||||||
retry = (try_count < 5);
|
retry = (try_count < 5);
|
||||||
|
|
|
@ -2414,7 +2414,7 @@ nm_platform_link_tun_add (NMPlatform *self,
|
||||||
g_return_val_if_fail (props, -NME_BUG);
|
g_return_val_if_fail (props, -NME_BUG);
|
||||||
g_return_val_if_fail (NM_IN_SET (props->type, IFF_TUN, IFF_TAP), -NME_BUG);
|
g_return_val_if_fail (NM_IN_SET (props->type, IFF_TUN, IFF_TAP), -NME_BUG);
|
||||||
|
|
||||||
/* creating a non-persistant device requires that the caller handles
|
/* creating a non-persistent device requires that the caller handles
|
||||||
* the file descriptor. */
|
* the file descriptor. */
|
||||||
g_return_val_if_fail (props->persist || out_fd, -NME_BUG);
|
g_return_val_if_fail (props->persist || out_fd, -NME_BUG);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ typedef enum {
|
||||||
* For the ID we can only recognize route fields that we actually implement.
|
* For the ID we can only recognize route fields that we actually implement.
|
||||||
* However, kernel supports more routing options, some of them also part of
|
* However, kernel supports more routing options, some of them also part of
|
||||||
* the ID. NetworkManager is oblivious to these options and will wrongly think
|
* the ID. NetworkManager is oblivious to these options and will wrongly think
|
||||||
* that two routes are idential, while they are not. That can lead to an
|
* that two routes are identical, while they are not. That can lead to an
|
||||||
* inconsistent platform cache. Not much what we can do about that, except
|
* inconsistent platform cache. Not much what we can do about that, except
|
||||||
* implementing all options that kernel supports *sigh*. See rh#1337860.
|
* implementing all options that kernel supports *sigh*. See rh#1337860.
|
||||||
*/
|
*/
|
||||||
|
@ -411,7 +411,7 @@ typedef union {
|
||||||
/* RTA_METRICS:
|
/* RTA_METRICS:
|
||||||
*
|
*
|
||||||
* For IPv4 routes, these properties are part of their
|
* For IPv4 routes, these properties are part of their
|
||||||
* ID (meaning: you can add otherwise idential IPv4 routes that
|
* ID (meaning: you can add otherwise identical IPv4 routes that
|
||||||
* only differ by the metric property).
|
* only differ by the metric property).
|
||||||
* On the other hand, for IPv6 you cannot add two IPv6 routes that only differ
|
* On the other hand, for IPv6 you cannot add two IPv6 routes that only differ
|
||||||
* by an RTA_METRICS property.
|
* by an RTA_METRICS property.
|
||||||
|
@ -622,7 +622,7 @@ typedef struct {
|
||||||
guint32 quantum;
|
guint32 quantum;
|
||||||
guint32 ce_threshold; /* TCA_FQ_CODEL_CE_THRESHOLD: kernel internally stores this value as
|
guint32 ce_threshold; /* TCA_FQ_CODEL_CE_THRESHOLD: kernel internally stores this value as
|
||||||
* ((val64 * NSEC_PER_USEC) >> CODEL_SHIFT). The default value (in
|
* ((val64 * NSEC_PER_USEC) >> CODEL_SHIFT). The default value (in
|
||||||
* the domain with this coersion) is CODEL_DISABLED_THRESHOLD (INT_MAX).
|
* the domain with this coercion) is CODEL_DISABLED_THRESHOLD (INT_MAX).
|
||||||
* That means, "disabled" is expressed on RTM_NEWQDISC netlink API by absence of the
|
* That means, "disabled" is expressed on RTM_NEWQDISC netlink API by absence of the
|
||||||
* netlink attribute but also as the special value 0x83126E97u
|
* netlink attribute but also as the special value 0x83126E97u
|
||||||
* (NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED).
|
* (NM_PLATFORM_FQ_CODEL_CE_THRESHOLD_DISABLED).
|
||||||
|
|
|
@ -1437,7 +1437,7 @@ _vt_cmd_plobj_id_cmp (ip4_address, NMPlatformIP4Address,
|
||||||
NM_CMP_FIELD (obj1, obj2, ifindex);
|
NM_CMP_FIELD (obj1, obj2, ifindex);
|
||||||
NM_CMP_FIELD (obj1, obj2, plen);
|
NM_CMP_FIELD (obj1, obj2, plen);
|
||||||
NM_CMP_FIELD (obj1, obj2, address);
|
NM_CMP_FIELD (obj1, obj2, address);
|
||||||
/* for IPv4 addresses, you can add the same local address with differing peer-adddress
|
/* for IPv4 addresses, you can add the same local address with differing peer-address
|
||||||
* (IFA_ADDRESS), provided that their net-part differs. */
|
* (IFA_ADDRESS), provided that their net-part differs. */
|
||||||
NM_CMP_DIRECT_IN4ADDR_SAME_PREFIX (obj1->peer_address, obj2->peer_address, obj1->plen);
|
NM_CMP_DIRECT_IN4ADDR_SAME_PREFIX (obj1->peer_address, obj2->peer_address, obj1->plen);
|
||||||
)
|
)
|
||||||
|
|
|
@ -219,7 +219,7 @@ typedef struct {
|
||||||
* "struct udev", but doesn't own it.
|
* "struct udev", but doesn't own it.
|
||||||
*
|
*
|
||||||
* Hence, the udev.device shall not be used after the library
|
* Hence, the udev.device shall not be used after the library
|
||||||
* context is is destroyed.
|
* context is destroyed.
|
||||||
*
|
*
|
||||||
* In case of NMPObjectLink instances that you obtained from the
|
* In case of NMPObjectLink instances that you obtained from the
|
||||||
* platform cache, that means that you shall no keep references
|
* platform cache, that means that you shall no keep references
|
||||||
|
|
|
@ -1303,7 +1303,7 @@ _rule_fuzzy_equal (const NMPObject *obj,
|
||||||
break;
|
break;
|
||||||
case RTM_DELRULE:
|
case RTM_DELRULE:
|
||||||
/* when deleting a rule with RTM_DELRULE, kernel tries to find the
|
/* when deleting a rule with RTM_DELRULE, kernel tries to find the
|
||||||
* cadidate to delete. It might delete the wrong rule (rh#1685816). */
|
* candidate to delete. It might delete the wrong rule (rh#1685816). */
|
||||||
if (rr->action == FR_ACT_UNSPEC)
|
if (rr->action == FR_ACT_UNSPEC)
|
||||||
rr_co.action = FR_ACT_UNSPEC;
|
rr_co.action = FR_ACT_UNSPEC;
|
||||||
if (rr->iifname[0] == '\0')
|
if (rr->iifname[0] == '\0')
|
||||||
|
|
|
@ -1171,9 +1171,9 @@ _con_get_try_complete_early (Request *req)
|
||||||
* Requests secrets for a connection.
|
* Requests secrets for a connection.
|
||||||
*
|
*
|
||||||
* This function cannot fail. The callback will be invoked
|
* This function cannot fail. The callback will be invoked
|
||||||
* asynchrnously, but it will always be invoked exactly once.
|
* asynchronously, but it will always be invoked exactly once.
|
||||||
* Even for cancellation and disposing of @self. In those latter
|
* Even for cancellation and disposing of @self. In those latter
|
||||||
* cases, the callback is invoked synchrnously during the cancellation/
|
* cases, the callback is invoked synchronously during the cancellation/
|
||||||
* disposal.
|
* disposal.
|
||||||
*
|
*
|
||||||
* Returns: a call-id to cancel the call.
|
* Returns: a call-id to cancel the call.
|
||||||
|
|
|
@ -80,7 +80,7 @@ typedef enum {
|
||||||
|
|
||||||
/* Update in-memory (i.e. persist to /run). If the profile is currently on disk,
|
/* Update in-memory (i.e. persist to /run). If the profile is currently on disk,
|
||||||
* then a reference to the profile is remembered as "shadowed-storage".
|
* then a reference to the profile is remembered as "shadowed-storage".
|
||||||
* Later, when storing again to persistant storage, the shawowed-storage is
|
* Later, when storing again to persistent storage, the shadowed-storage is
|
||||||
* updated. When deleting the profile, the shadowed-storage is also deleted
|
* updated. When deleting the profile, the shadowed-storage is also deleted
|
||||||
* from disk.
|
* from disk.
|
||||||
*
|
*
|
||||||
|
@ -90,7 +90,7 @@ typedef enum {
|
||||||
/* Update in-memory (i.e. persist to /run). This is almost like
|
/* Update in-memory (i.e. persist to /run). This is almost like
|
||||||
* %NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY, except the in-memory profile
|
* %NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY, except the in-memory profile
|
||||||
* remembers not to own the shadowed-storage ("shadowed-owned").
|
* remembers not to own the shadowed-storage ("shadowed-owned").
|
||||||
* The diffrence is that when deleting the in-memory profile, the original
|
* The difference is that when deleting the in-memory profile, the original
|
||||||
* profile is not deleted but instead the nmmeta tombstone remembers the
|
* profile is not deleted but instead the nmmeta tombstone remembers the
|
||||||
* shadowed-storage and re-used it when re-adding the profile.
|
* shadowed-storage and re-used it when re-adding the profile.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1748,7 +1748,7 @@ nm_settings_add_connection (NMSettings *self,
|
||||||
/* We have a nmmeta tombstone that indicates that a storage is shadowed.
|
/* We have a nmmeta tombstone that indicates that a storage is shadowed.
|
||||||
*
|
*
|
||||||
* This happens when deleting a in-memory profile that was decoupled from
|
* This happens when deleting a in-memory profile that was decoupled from
|
||||||
* the persitant storage with NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED.
|
* the persistent storage with NM_SETTINGS_CONNECTION_PERSIST_MODE_IN_MEMORY_DETACHED.
|
||||||
* We need to take over this storage again... */
|
* We need to take over this storage again... */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -353,7 +353,7 @@ _storages_consolidate (NMSIfcfgRHPlugin *self,
|
||||||
storage = storages_modified->pdata[i];
|
storage = storages_modified->pdata[i];
|
||||||
|
|
||||||
if (!storage->dirty) {
|
if (!storage->dirty) {
|
||||||
/* the entry is no longer dirty. In the meantime we already emited
|
/* the entry is no longer dirty. In the meantime we already emitted
|
||||||
* another signal for it. */
|
* another signal for it. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ _assert_reread_same_FIXME (NMConnection *connection, NMConnection *reread)
|
||||||
/* FIXME: these assertion failures should not happen as we expect
|
/* FIXME: these assertion failures should not happen as we expect
|
||||||
* that re-reading a connection after write yields the same result.
|
* that re-reading a connection after write yields the same result.
|
||||||
*
|
*
|
||||||
* Needs investation and fixing. */
|
* Needs investigation and fixing. */
|
||||||
nmtst_assert_connection_verifies_without_normalization (reread);
|
nmtst_assert_connection_verifies_without_normalization (reread);
|
||||||
|
|
||||||
connection_normalized = nmtst_connection_duplicate_and_normalize (connection);
|
connection_normalized = nmtst_connection_duplicate_and_normalize (connection);
|
||||||
|
@ -9576,7 +9576,7 @@ do_svUnescape_combine_ansi_append (GString *str_val, GString *str_exp, const Une
|
||||||
if (honor_needs_ascii_separator && data->needs_ascii_separator) {
|
if (honor_needs_ascii_separator && data->needs_ascii_separator) {
|
||||||
/* the string has an open escape sequence. We must ensure that when
|
/* the string has an open escape sequence. We must ensure that when
|
||||||
* combining it with another sequence, that they don't merge into
|
* combining it with another sequence, that they don't merge into
|
||||||
* something diffent. for example "\xa" + "a" must not result in
|
* something different. for example "\xa" + "a" must not result in
|
||||||
* "\xaa". Instead, we add a space in between to get "\xa a". */
|
* "\xaa". Instead, we add a space in between to get "\xa a". */
|
||||||
g_string_append (str_val, " ");
|
g_string_append (str_val, " ");
|
||||||
g_string_append (str_exp, " ");
|
g_string_append (str_exp, " ");
|
||||||
|
|
|
@ -190,7 +190,7 @@ dump_blocks (if_parser *parser)
|
||||||
g_print("'%s' '%s'\n", n->type, n->name);
|
g_print("'%s' '%s'\n", n->type, n->name);
|
||||||
|
|
||||||
// each key-value pair within a block is indented & separated by a tab
|
// each key-value pair within a block is indented & separated by a tab
|
||||||
// (single quotes used to show typ & name baoundaries)
|
// (single quotes used to show type & name boundaries)
|
||||||
c_list_for_each_entry (m, &n->data_lst_head, data_lst)
|
c_list_for_each_entry (m, &n->data_lst_head, data_lst)
|
||||||
g_print("\t'%s'\t'%s'\n", m->key, m->data);
|
g_print("\t'%s'\t'%s'\n", m->key, m->data);
|
||||||
|
|
||||||
|
|
|
@ -529,7 +529,7 @@ _storages_consolidate (NMSKeyfilePlugin *self,
|
||||||
storage = storages_modified->pdata[i];
|
storage = storages_modified->pdata[i];
|
||||||
|
|
||||||
if (!storage->is_dirty) {
|
if (!storage->is_dirty) {
|
||||||
/* the entry is no longer is_dirty. In the meantime we already emited
|
/* the entry is no longer is_dirty. In the meantime we already emitted
|
||||||
* another signal for it. */
|
* another signal for it. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,7 +266,7 @@ nms_keyfile_nmmeta_write (const char *dirname,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* we only have the "loaded_path" to store. That is commonly used for the tombstones to
|
/* we only have the "loaded_path" to store. That is commonly used for the tombstones to
|
||||||
* link to /dev/null. A symlink is sufficient to store that ammount of information.
|
* link to /dev/null. A symlink is sufficient to store that amount of information.
|
||||||
* No need to bother with a keyfile. */
|
* No need to bother with a keyfile. */
|
||||||
if (symlink (loaded_path, full_filename_tmp) != 0) {
|
if (symlink (loaded_path, full_filename_tmp) != 0) {
|
||||||
errsv = -NM_ERRNO_NATIVE (errno);
|
errsv = -NM_ERRNO_NATIVE (errno);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue