Coverity: CID 59378 (#1 of 1): Nesting level does not match indentation
(NESTING_INDENT_MISMATCH) This statement is indented to column 41, as if
it were nested within the preceding parent statement, but it is not.
nm_supplicant_manager_iface_get() would cache and reuse the supplicant
interface. But no ref-counting was in place so that the first user returning
the interface via nm_supplicant_manager_iface_release() would destroy the
instance for others.
This is broken for a very long time. Which shows that we hardly ever
have a cache-hit and usually create a new instance. So, instead of
letting nm_supplicant_manager_create_interface() check for existing
supplicant interface, always create a new instance. This also makes
sense, because we would expect that per ifname only one instance is
requested at a time. Also add an assertion that we don't return
multiple supplicant interface instances for the same ifname.
Drop nm_supplicant_manager_iface_release() in favor of requiring users
to unref the returned instance.
Also, use a GSList instead of a GHashTable for the cache.
Also, previously callers would pass @is_wireless to nm_supplicant_manager_iface_get(),
but the cache lookup did not consider that value. That doesn't matter
now as we always create a new instance.
https://bugzilla.redhat.com/show_bug.cgi?id=1298007
Also, don't only consider the @die_count whether to start the supplicant,
but check for is_available() -- which already considers @die_count and
@running.
If the list is expected to be modified, it also means that possibly
instances will be unrefed. Probably, not yet visited instances will
not be unrefed so there is no real problem.
Just be extra cautious and take a reference to all instances first.
If dnsmasq (or another DNS plugin) exits immediately (for example due
to an already used port), the DNS manager keeps restarting it forever,
wasting system resources and filling logs.
Add a simple rate-limiting mechanism.
https://bugzilla.gnome.org/show_bug.cgi?id=760691
Add a new object which implements the logic for announcing IP
addresses and detecting duplicates using arping.
Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com>
The property is used to control duplicate address detection:
* -1 means default value
* 0 means no DAD is performed
* > 0 means timeout (in milliseconds) for arping responses
[bgalvani: moved setting from NMSettingIP4Config]
This is an Ubuntu-specific patch to enable wireless powersave by default.
Should it not work for you for some reason, you can safely add:
powersave=0
to the section:
[802-11-wireless]
In the configuration file for your connection under
/etc/NetworkManager/system-connections/.
The function can now be called on unrealized devices before the
initial unmanaged flags are set and for those devices
nm_device_get_managed() will return TRUE. Since we only accept
states > UNMANAGED, return early when the condition is not met.
Fixes the following failed assertion:
carrier_changed: assertion 'priv->state >= NM_DEVICE_STATE_UNAVAILABLE' failed
https://bugzilla.gnome.org/show_bug.cgi?id=760844