| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NMDeviceAutoconnectBlockedFlags enum
The flags allow for more then two reasons. Currently the only reasons
for allowing or disallowing autoconnect are "user" and "intern".
It's a bit odd, that NMDeviceAutoconnectBlockedFlags has a negative
meaning. So
nm_device_set_autoconnect_intern (device, FALSE);
gets replaced by
nm_device_set_autoconnect_blocked_set (device, NM_DEVICE_AUTOCONNECT_BLOCKED_INTERN);
and so on.
However, it's chosen this way, because autoconnect shall be allowed,
unless any blocked-reason is set. That is, to check whether autoconnect
is allowed, we do
if (!nm_device_get_autoconnect_blocked (device, NM_DEVICE_AUTOCONNECT_BLOCKED_ALL))
The alternative check would be
if (nm_device_get_autoconnect_allowed (device, NM_DEVICE_AUTOCONNECT_ALLOWED_ALL) == NM_DEVICE_AUTOCONNECT_ALLOWED_ALL)
which seems odd too.
So, add the inverse flags to block autoconnect.
Beside refactoring and inverting the meaning of the autoconnect
settings, there is no change in behavior.
(cherry picked from commit 5279ab5be6326b911682e53d8c29d20a501d61b8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nm_device_can_auto_connect()
nm_device_can_auto_connect() only has one caller, auto_activate_device()
in NMPolicy.
That caller already checks whether the connection has autoconnect
enabled, so drop the duplicate check.
This saves some duplication, but it also makes some sense:
NMSettingsConnection has a complex blocking of autoconnect,
so just looking at connection.autoconnect is not enough in
any case to determine whether the connection should autoconnect.
We move thus more handling of autoconnect to NMPolicy, where
it belongs.
(cherry picked from commit 6fff832fe3b1086c226c8e26a6c3b4d413dde086)
|
|
|
|
| |
(cherry picked from commit a7ef46eaaad6e7eabc3f5ee9d6bde69321c112bd)
|
|
|
|
|
|
| |
nm_device_autoconnect_allowed()
(cherry picked from commit bfe66fb8f410a003f4d2ae05cba9baff798ddbad)
|
|
|
|
|
|
| |
Makes it clearer what is happening (to me).
(cherry picked from commit 45da11f37068059df5d36115d80bebd15fc92188)
|
|
|
|
|
|
|
|
|
|
| |
get_autoconnect_allowed()
OLPC devices cannot autoconnect, according to can_auto_connect().
We should instead reject any attempt to autoconnect earlier, via
get_autoconnect_allowed().
(cherry picked from commit 7074b88a6a3f61066e42b3f136ac0c0f6e189b0c)
|
|
|
|
|
|
|
| |
Derived classes should not modify or overwrite this essential behavior
of can_auto_connect(). It doesn't belong to the virtual function.
(cherry picked from commit 715aebe08a99519fe0d6b979db00fe4dbff9d678)
|
|
|
|
|
|
|
| |
schedule_activate_check() also checks for nm_device_autoconnect_allowed()
and aborts if there is nothing to do.
(cherry picked from commit 990af413ac56c784125fe50df64a374933396e3f)
|
|
|
|
|
|
| |
nm_device_autoconnect_allowed()
(cherry picked from commit fc18ff30cf74014e613e3c099a901e4e7ba82678)
|
|
|
|
| |
(cherry picked from commit 9a7e668dbb552667e2545953a325d1d041fa0518)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the ifcfg-rh plugin doesn't explicitly store the connection
type for team slaves and is only able to read back ethernet and vlan
connections.
Leave this unchanged for ethernet and vlan slaves, but store the TYPE
variable for other connection types (Wi-Fi and Infiniband) so that we
can properly determine their type when the connection is read.
(cherry picked from commit 29a576496e23278abab310ce83cad98239908e9f)
|
|
|
|
| |
(cherry picked from commit cc993aa02040564c16d78c864f3c3a22d20443eb)
|
|
|
|
|
|
|
|
|
| |
Insert the new gateway at the end when it has the least preference.
Fixes the following runtime error:
src/ndisc/nm-ndisc.c:204:_ASSERT_data_gateways: assertion failed:
(_preference_to_priority (item_prev->preference) >=
_preference_to_priority (item->preference))
|
| |
|
|
|
|
|
| |
It will be also used by NMDeviceWifi. It might waste a 4 bytes for device types
that don't require authentication. But it deduplicates code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The number of authentication retires is useful also for passwords aside
802-1x settings. For example, src/devices/wifi/nm-device-wifi.c also has
a retry counter and uses a hard-coded value of 3.
Move the setting, so that it can be used in general. Although it is still
not implemented for other settings.
This is an API and ABI break.
|
|
|
|
|
|
| |
Coverity detects that the "if (blob)" condition must always be true.
Reorder the code, to avoid the warning. It's a bit clearer this way
anyway.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Only NMPolicy should be concerned with handling autoconnect, and
blocking it.
Move the code. Note that there is a slight possible change in
behavior, as the order of when the connection is blocked changes,
based on the different times when the device changed signal gets
executed. But that shouldn't be a problem.
|
| |
|
|
|
|
| |
Step by step, we move all tracking of autoconnect to NMPolicy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 4a6fd0e83ec0d83547b1f3a1a916f85e9f450d8c (device: honor the
connection.autoconnect-retries for 802.1X) and the related bug bgo#723084,
we reuse the autoconnect-retries setting to control the retry count
for requesting passwords.
I think that is wrong. These are two different settings, we should not
reuse the autoconnect retry counter while the device is still active.
For example, the user might wish to set autoconnect-retries to infinity
(zero). In that case, we would retry indefinitly to request a password.
That could be problematic, if there is a different issue with the
connection, that makes it appear tha the password is wrong.
A full re-activation might succeed, but we would never stop retrying
to authenticate. Instead, we should have two different settings for
retrying to authenticate and to autoconnect.
This is a change in behavior compared to 1.8.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
It has almost no callers, and it is a bit of a strange API. Let's
not cache the last accessed value inside NMConfigData. Instead, free
it right after use. It was not reused anyway, it only hangs around
as convenience for the caller.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Names like
- nm_settings_connection_get_autoconnect_retries
- nm_settings_connection_set_autoconnect_retries
- nm_settings_connection_reset_autoconnect_retries
are about the same thing, but they are cumbersome to grep
because they share not a common prefix.
Rename them from SUBJECT_VERB_OBJECT to SUBJECT_OBJECT_VERB,
which sounds odd in English, but seems preferred to me.
Now you can grep for "nm_settings_connection_autoconnect_retries_" to
get all accessors of the retry count, or "nm_settings_connection_autoconnect_"
to get all accessors related to autoconnect in general.
|
|
|
|
|
|
|
| |
I didn't really mean to include it as it doesn't make any sense at this
point and makes the logs a bit more messy.
This reverts commit 340e35c09d8950e6c8151a7934d05d90b37418ea.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 32b3eb1181 [core: merge IPv4 and IPv6 implementation of
nm_utils_ip4_property_path()], nm_utils_sysctl_ip_conf_path() introduced
in cd271d5cb1 [core: add nm_utils_sysctl_ip_conf_is_path() util] is used to
cunstruct sysctl paths and it is way less tolerant towards using something
that is not an interface name in the path.
It's always been incorrect to assume the ifname is a linux link name and
it resulted it ugly, if benign, sysctl access attempts such as
"/sys/class/net/28:B2:BD:5D:23:AB/phys_port_id" etc.
Now it triggers an assertion failure. Let's guard all such accesses.
Fixes: 32b3eb1181
Fixes: cd271d5cb1
|
|
|
|
| |
Fixes: a83ab252ee589e6c94b2c568a2954857dede706e
|
|
|
|
| |
So that we work well on VAXen.
|
|
|
|
|
|
| |
When the ifcfg-rh plugin writes a 802-1x setting it currently ignores
the password-raw property and so the password disappears when the
connection is saved. Add support for the property.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a while now, all NMPObject instances are not modified after
being cached. They are immutable, and can be passed around by keeping
a reference to them.
No longer copy the NMPlatformLink data to a @info variable. Instead,
take a reference (which ensures that the instance stays alive). It
won't change, as it's immutable.
The advantage is, that whenever you see a NMPlatformLink pointer,
for exmple in device_recheck_slave_status(), you can be sure that
it's actually a NMPObect, and NMP_OBJECT_UP_CAST() will work.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
We now can be enslaved and have L3 configuration at the same time.
This also reduces some unnecessary complexity, because the decision to
progress to IP_CHECK or SECONDARIES now happens in a single place, in
the check_ip_state() routine.
|
| |
|
|
|
|
|
|
| |
The OpenVSwitch interfaces come into existence by their enslavement to a port.
They can also bear an IP4 or IP6 configuration -- waiting on a carrier would
deadlock the acitvation.
|
| |
|
| |
|
|
|
|
|
|
| |
That one is special. All interfaces that are attached to OpenVSwitch
ports appear as slaves to that one even for our purposes we like to
pretend they're slaves to the actual OpenVSwitch bridges.
|
|
|
|
| |
And also make the remove_device() method use it behind the scenes.
|
|
|
|
|
|
|
|
|
|
|
| |
For some software devices, the platform link appears only after they've been
realized. Update their properties and let them know that the link has changed
so they can eventually proceed with activation.
Also, reset the properties (udi, iface, driver) that are set from the platform
link when the link goes away. At that point they don't reflect reality anymore.
Removes some code duplication too.
|
| |
|