Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
801beb4b4d ip6: prevent overflows in RDNSS and DNSSL timeout calculations (rh #689291) 2011-04-05 09:58:49 -05:00
Dan Williams
4045a91ab9 ip6: add some comments 2011-04-05 09:58:01 -05:00
Dan Williams
48441ea636 ip6: don't try to process invalid RA nameservers 2011-04-05 09:57:43 -05:00
Dan Williams
fdc2d5ee4f ip6: fix possible use of uninitialized memory 2011-04-05 09:54:52 -05:00
Dan Williams
839c790982 core: ignore Nokia PC-Suite ethernet devices we can't use yet 2011-04-04 16:41:55 -05:00
Dan Williams
04b2c297ec policy: consolidate auto-retries and invalidation
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.
2011-04-01 18:50:58 -05:00
Dan Williams
937359a67b supplicant: use ap_scan=0 for wired connections
Somehow this got dropped in the port to the new supplicant D-Bus
interface a few months ago.
2011-04-01 18:50:10 -05:00
Dan Williams
85a8f64f88 wifi: remove some debugging code 2011-04-01 18:01:06 -05:00
Dan Williams
e20d64f76b wimax: handle device removal when the WiMAX Network Service goes away
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.
2011-04-01 17:57:09 -05:00
Dan Williams
5fd3163a46 policy: don't retry connections where secrets requests failed
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.
2011-04-01 13:30:37 -05:00
Dan Williams
52d0376148 vpn: set default username from agent that provided secrets (bgo #646115)
This functionality got dropped when we killed user secrets because the
user settings service was the thing that set this.
2011-03-31 18:46:26 -05:00
Dan Williams
390a5fb840 settings: return username of agent providing secrets
Mainly for VPN connections to grab the default username from, like
0.8 did when the applet provided the username to NM for user
connections.
2011-03-31 18:39:09 -05:00
Dan Williams
d291feeb0f tests: test more combinations of wifi AP security flags for connection completion 2011-03-30 13:53:14 -05:00
Dan Williams
85d364d765 settings: fix getting default wired connection name with no connections
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.
2011-03-30 12:02:50 -05:00
Dan Williams
9072b4d052 test: add missing test dependency 2011-03-30 11:09:49 -05:00
Dan Williams
bc9803f92d settings: fix requesting new secrets when the old ones don't work
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.
2011-03-29 22:56:08 -05:00
Dan Williams
4e4bfeb499 core: add nm-secrets-flags.h for secret agent flags typedef
Make it clearer what's going on instead of using flags here and there
and numbers elsewhere.
2011-03-29 22:53:22 -05:00
Michael Biebl
530f143adf use /usr/bin/env instead of /bin/env 2011-03-29 01:00:47 +02:00
Dan Williams
b8a1a38640 core: fix wired connection completion
It was using a connection base type of 'connection', which clearly
isn't right.
2011-03-28 10:42:19 -05:00
Dan Williams
78df8c49a1 settings: name the default wired connection "Wired connection x"
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.
2011-03-27 16:57:14 -05:00
Dan Williams
7da9e2f607 vpn: fix memory leaks
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
2011-03-24 14:13:12 -05:00
Dan Williams
6cbb44bc97 ifcfg-rh: fix some missing tests in tarball
The tests were missing, and because of the way the test was structured,
the tests passed.
2011-03-21 17:44:47 -05:00
Michael Biebl
69a135debb ppp: remove unused file 2011-03-21 17:41:08 -05:00
Michael Biebl
80d29da35b trivial: remove unused nm-gsm-device.h header 2011-03-21 17:34:00 -05:00
Dan Williams
4ea8fb6d99 trivial: fix format type of ip6 manager logging messages 2011-03-21 13:33:43 -05:00
Dan Williams
90b478e905 trivial: fix format type of DHCP client logging messages 2011-03-21 16:17:49 -05:00
Dan Williams
d815cb9f33 logging: fix format string/argument disagreement
Now that the logging fixes make format checking actually work, fix
the issues it brings up.
2011-03-19 12:44:14 -05:00
Dan Williams
e7be98260e logging: clean up logging macros and helper
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.
2011-03-19 12:42:29 -05:00
Dan Williams
b2036e264c wimax: log a message when connecting to an NSP 2011-03-17 23:58:50 -05:00
Dan Williams
1701df4b75 core: add active connection state DEACTIVATING
Not used yet, but will be when device deactivating state gets
used.  Should be 100% backwards compatible with users that don't
know about it for now.
2011-03-17 14:23:21 -05:00
Dan Williams
23943e7ce2 core: handle new device states
The device states aren't used yet, but handle them anyway.
2011-03-17 13:42:22 -05:00
Dan Williams
8ae173635d trivial: fix comment 2011-03-17 13:42:21 -05:00
Dan Williams
b339074fd9 core: fix up active connection state for newer device states 2011-03-17 13:42:21 -05:00
Dan Williams
11ca4c7a91 supplicant: add 'authenticating' state
Caused a harmless warning, but lets add it anyway.
2011-03-17 13:42:21 -05:00
Dan Williams
05f70e34a5 vpn: cancel the right secrets request
Code still called nm_act_request_cancel_secrets() but the VPN
connection no longers uses the underlying activation request for
secrets.  Fix that.
2011-03-17 13:42:21 -05:00
Mu Qiao
8d60cafd18 ifnet: fix tests and distcheck 2011-03-17 11:05:46 -05:00
Dan Williams
c3dc2a0608 agents: only commit connection changes if there were system secrets
It's pointless to save the connection if there weren't any system
secrets being changed.
2011-03-16 20:53:49 -05:00
Dan Williams
e89a50d779 agents: don't complain when there aren't any system secrets 2011-03-16 20:53:13 -05:00
Mu Qiao
08b2fa5401 ifnet: plugin updates and shared connection support 2011-03-16 15:39:13 -05:00
Dan Williams
da4928aea7 core: allow NULL device path in ActivateConnection 2011-03-15 17:04:35 -05:00
Dan Williams
fcbaa00ed0 core: remove some debug logging 2011-03-15 12:22:54 -05:00
Dan Williams
e64cc4dd7c core: specific object of "/" means NULL
Not sure how this got lost...  but it did.
2011-03-15 11:45:47 -05:00
Dan Williams
b21fc6ed45 wimax: use setting accessor helpers 2011-03-15 10:33:04 -05:00
Kjartan Maraas
b224ab8e56 trivial: let g_free and g_strdup handle NULL (bgo #644763) 2011-03-15 00:08:58 -05:00
Kjartan Maraas
c2b4b9c1d7 build: fix return types (bgo #644665)
Some functions were returning FALSE or 0 instead of NULL.
2011-03-14 01:05:51 -05:00
Kjartan Maraas
6d0d302916 build: do the right thing with config.h (bgo #644664)
1) it shouldn't be included in headers
2) it should be the first thing included in source files
3) it's needed for getting translation right
2011-03-14 01:01:22 -05:00
Dan Williams
af7e26b39a ifcfg-rh: fix reading and writing of Dynamic WEP with EAP-LEAP connections
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.
2011-03-14 00:25:14 -05:00
Dan Williams
eaeb43bfad keyfile: ignore temp files ending with ~ 2011-03-13 23:59:09 -05:00
Dan Williams
32dedf4b83 wifi: fix scanned signal strength calculation for WEXT-based drivers
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.
2011-03-13 12:50:40 -05:00
Dan Williams
0e348bad2a wimax: fix dbus-glib assert when wimax strength overflows
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.
2011-03-11 18:20:42 -06:00