Instead of having two of these, just use the autoconnect retries as
the invalid tag. Make sure the auto-retries tag always exists by
secretly adding +1 behind the scenes (so the data we set is never NULL).
This should make the code clearer, and will enable the next commit
for authentication failures to decrease the auto retries count.
There's some confusion in the code about indexes; there's the SDK index
from the NS, and there's the internal device index. Of course we've
got to use the internal device index to remove it from our list, so we
need to convert the SDK index to an internal index before we can call
iwmx_sdk_dev_rm().
Second, the:
if (device_id_list_size < devid->deviceIndex) {
check is useless because by the time we get here, the device is already
gone from the SDK's device list, so this always triggers of the NS
quits. So just run this check when devices get added to ensure the
NS isn't lying to us. The, if we get a device removal event, match
up the SDK index with some internal device's SDK index and remove that.
If the user canceled a secrets request, or we simply can't get
secrets for the connection, invalidate it and make sure it doesn't
get tried automatically again right after it fails.
Due to an error in the loop logic, if there were no connections yet (like
a fresh install or a livecd or whatever) no default name would be returned
and thus ethernet devices wouldn't come up automatically. Fix that loop
error and add testcases for it.
If the connection had system secrets, previously the settings core
would consider those sufficient even if the device code had requested
new secrets because the old ones didn't work.
Where 'x' is a number that's not yet used by any existing connection.
And clean up the default wired class initialization. This name is
more friendly than "Auto eth0" which was confusing to quite a few
people. This also checks to ensure there's no other connection with
the same name, which the old method did not.
Suggested by Jon McCann.
Two problems here:
1) code that called nm_vpn_service_get_active_connections() wasn't freeing
the returned list, leaking it
2) No real reason to reference each item in the returned list in
nm_vpn_manager_get_active_connections(), it just makes it easier to
forget to unref things later
There were two specific problems with the logging macros:
1) the existing varargs usage didn't allow for format string checking,
which is bad, since it could make logging segfault if the arguments
don't match the format string
2) it didn't allow logging usage without wrapping {}, ie this didn't work:
if (foo)
nm_log_dbg (...)
blah blah
Fix all that by using the varargs stuff correctly.
These are distinct from old-school LEAP (ie, Network EAP) in that
they are standard Dynamic WEP with LEAP as an EAP method and use
open-system authentication. Old LEAP uses the non-standard LEAP
authentication algorithm. The config for each is different and thus
we need to make sure we handle both cases.
The new wpa_supplicant D-Bus interface only passes back the 'level'
of the scanned BSS, which with nl80211 drivers is almost always dBm,
which NM handled fine. But WEXT-based drivers (ipw2x00, other older
ones, and some vendor drivers) use a mix of values for the 'level'
parameter, including the old WEXT 8-bit signed-value-in-unsigned-int
scheme. Handle that.
Alternatively, we could have the supplicant expose the 'flags' value
from its internal BSS list over the bus.
Ran into a case right underneath a tower where the Intel WiMAX SDK
reported signal strength as 32767 which is pretty clearly an overflow
of a 16-bit int somewhere in the WiMAX stack. Since our internal
NMWimaxNsp GObject property for signal-quality has a max value of
100, dbus-glib got pretty angry when GObject failed to return
something because the property value was out of range, leading
to malformed message and the bus daemon kicking us off, and finally
an assertion somewhere. Fun.