Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
bc6fc7b910 vpn: fix VPN active connection D-Bus API handling (bgo #569294)
Due to limitations in dbus-glib, where one GObject cannot have more
than one introspection XML object attached to it, we used to include
more than one <interface> in the VPNConnection object introspection
XML.  This was suboptimal for two reasons:

1) it duplicated the Connection.Active introspection XML which
made it harder for clients to use the introspection data in a
dynamic fashion, besides looking ugly in the docs

2) not many other programs use this feature of dbus-glib, which
means it didn't get a lot of testing, and broke, which sucks
for NM.

To fix this issue, create a base class for NMVpnConnection that
handles the Connection.Active API, and make NMVpnConnection itself
handle just the VPN pieces that it layers on top.  This  makes
dbus-glib happy because we aren't using two <interface> blocks
in the same introspection XML, and it makes the NM code more
robust because we can re-use the existing Connection.Active
introspection XML in the NMVpnConnectionBase class.
2011-01-25 12:41:03 -06:00
Giovanni Campagna
9067356856 core: fix policy handling of connections-loaded signal 2011-01-21 14:20:38 -06:00
Dan Williams
ec55e32ee6 agent: pass the right call-id in the secrets callback 2011-01-19 17:17:41 -06:00
Dan Williams
8ff556be3c agent: fix current agent removal if agent goes away
The current agent isn't in the 'pending' list, so don't check
the list for the agent and bail if it's not found since that
won't handle the current agent going away.
2011-01-19 17:16:21 -06:00
Dan Williams
85409427be agent: add some debug logging 2011-01-19 16:58:26 -06:00
Dan Williams
223c00fdee core: don't require connection path for AddAndActivate
There is no path yet since we haven't added the connection yet.
2011-01-18 20:40:58 -06:00
Dan Williams
c804909f83 wired: clear wired secrets tries counter when appropriate
If NM asks for secrets, and then a client calls ActivateDevice on
that same connection, the secrets tries counter doesn't get reset
and NM then thinks we need completely new secrets when we really
don't since the old secrets request isn't valid anymore.

Also ensure the secrets tries gets reset on success and failure
to match behavior of wifi.
2011-01-18 18:35:35 -06:00
Dan Williams
9f7f02b3b8 wifi: clear wireless secrets tries counter when deactivating
If NM asks for secrets, and then a client calls ActivateDevice on
that same connection, the secrets tries counter doesn't get reset
and NM then thinks we need completely new secrets when we really
don't since the old secrets request isn't valid anymore.

Found by Evan Broder
2011-01-18 18:29:56 -06:00
Dan Williams
68ab26143b core: use GetSecrets flags everywhere 2011-01-18 14:57:44 -06:00
Dan Williams
a2f36e8bd4 agent: add CancelGetSecrets D-Bus API
Allows NM to signal to an agent that an in-progress secrets
request is no longer needed.  This could happen if the device
for which the request was started was removed, disabled, or the
network being connected to changed, or whatever.
2011-01-18 13:19:29 -06:00
Dan Williams
1187922adf core: lack of an IPv4 setting indicates DHCP (novell #664640)
It shouldn't assert.
2011-01-14 14:02:02 -06:00
Dan Williams
bba24a0e00 core: allow minimal completion of VPN connections for AddAndActivate
We can at least fill in the connection setting if we're just given
the VPN setting.
2011-01-13 13:30:30 -06:00
Dan Williams
53766ae291 core: move generic connection complete function to a generic location
Out of NMDevice specific places to the utils code, so it can be used
more easily from everywhere.  There's nothing device-specific about
it anyway.
2011-01-13 13:28:52 -06:00
Dan Williams
2d9cd80c87 wifi: use less memory converting SSID
nm_utils_ssid_to_utf8() handles null termination for us, so no
need to copy the SSID to a buffer first.
2011-01-13 12:42:52 -06:00
Dan Williams
b38f39cfc6 core: build keyfile plugin into NetworkManager
Since settings storage is now handled by NetworkManager, we must
have the ability to read/write all connection types at all times.
Since the 'keyfile' plugin is the only plugin that can handle all
connection types, build it into NetworkManager.
2011-01-12 18:12:23 -06:00
Dan Williams
8259b35ee5 wimax: add connection completion function 2011-01-12 17:46:43 -06:00
Dan Williams
f9ceafd4a1 Merge remote branch 'origin/master' into rm-userset 2011-01-12 15:46:37 -06:00
Dan Williams
c1ee4fce68 tests: add some comments to the wifi connection completion tests 2011-01-12 13:20:37 -06:00
Dan Williams
3a160af5ab wifi: add RSN connection completion tests 2011-01-12 00:25:07 -06:00
Dan Williams
f7a8d53ac4 wifi: ensure shared auth is rejected for WPA APs when completing connections 2011-01-12 00:24:41 -06:00
Dan Williams
54c58bcf1f wifi: add more AP connection completion tests for EAP 2011-01-12 00:11:29 -06:00
Dan Williams
c4c02758e1 wifi: add more AP connection completion tests 2011-01-11 22:40:18 -06:00
Dan Williams
aa88058a5e wifi: simplify AP connection completion testcase
Make it clearer exactly what settings are added to the source
connection, and what to the expected one.
2011-01-11 21:52:12 -06:00
Dan Williams
215306f5a1 core: add AddAndActivate D-Bus method
Given connection details, complete the connection as well as possible
using the given specific object and device, add it to system
settings, and activate it all in one method.
2011-01-10 23:39:12 -06:00
Dan Williams
f08d892bda trivial: fix autoconf warning 2011-01-06 17:17:10 -06:00
Dan Williams
9d24269e30 wimax: add Center Frequency, RSSI, CINR, TX Power, and BSID properties
Useful diagnostic/support info when device is connected.
2011-01-06 15:18:19 -06:00
Dan Williams
263c05118b build: ensure WiMAX bits are linked before system settings
System settings still links to libnm-glib, which also contains
an NMDeviceWimax class.  We don't care about the libnm-glib
class, so link the wimax bits first to ensure they are the ones
used.

This issue will go away when user settings is removed in the
near future.
2011-01-06 14:22:17 -06:00
Dan Williams
430151d6c2 build: make WiMAX support optional 2011-01-05 18:23:08 -06:00
Dan Williams
6971dcd34e wimax: logging cleanup 2011-01-05 17:54:05 -06:00
Dan Williams
6ab1f4f420 wimax: only update NSP properties if they've changed 2011-01-05 17:39:14 -06:00
Dan Williams
13794bfeb6 wimax: poll connected network signal strength 2011-01-05 16:57:56 -06:00
Dan Williams
f87e2251d7 wimax: turn off wimaxd's fast reconnect logic
It eventually gets confusing for everyone.  NM is the policy, so
handle reconnect there.
2011-01-05 16:34:51 -06:00
Dan Williams
89095e9fa7 wimax: fix debug log format string 2011-01-05 16:30:58 -06:00
Dan Williams
5cbe6da10e wimax: release and renew DHCP lease when requested by wimaxd 2011-01-05 16:23:22 -06:00
Dan Williams
9917da2c71 dhcp: add DHCP lease release capability 2011-01-05 16:23:00 -06:00
Dan Williams
6ae91e2f67 wimax: if the device is connected at startup, force it to disconnect
Otherwise it doesn't auto-scan and we get no network list.  As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
2011-01-05 15:39:07 -06:00
Dan Williams
71adbcbb20 Revert "wimax: if the device is connected at startup, force it to disconnect"
This reverts commit 9c99066d6c.

Yay for finger-memory of git commit -a...
2011-01-05 15:38:03 -06:00
Dan Williams
9c99066d6c wimax: if the device is connected at startup, force it to disconnect
Otherwise it doesn't auto-scan and we get no network list.  As a later
optimization, we could detect this, call iwmx_sdk_get_connected_network()
to get the current NSP, match that up with a connection, and "assume"
the connection like we do for Ethernet devices.
2011-01-05 15:30:59 -06:00
Dan Williams
a9918eefac wimax: protect device add/remove with a mutex
Sometimes the add/remove code will get re-entered by the SDK because
the SDK is stupid.  Lock the code to ensure we don't double-detect
the same device.
2011-01-05 15:27:48 -06:00
Dan Williams
bee33b9a26 wimax: notify listeners of new wimax devices
If wimaxd gets started after NetworkManager, we need to notify
NetworkManager that the daemon has found and set up any wimax
interface it finds.  Most of the code for this was there but
not previously hooked up.
2011-01-05 15:13:04 -06:00
Dan Williams
1ec327130a core: factor out DHCPv4 setup 2011-01-05 14:07:32 -06:00
Dan Williams
e598b18656 wimax: add link timeout 2011-01-05 14:06:48 -06:00
Dan Williams
d1c7f3d992 wimax: handle media status change events
Which we need to use for DHCP renew.
2011-01-05 09:59:08 -06:00
Dan Williams
31a0dfa533 wimax: reduce connect timeout a bit 2011-01-04 18:51:51 -06:00
Dan Williams
568f11ee54 wimax: fix disconnect conditions
Only fail an activated device if it's actually activated, and
only fail an activating device if the timeout triggers or if
the connect callback indicates failure, not based on device state.
2011-01-04 18:50:48 -06:00
Dan Williams
597c2aeb80 wimax: fix a few SDK return value checks 2011-01-04 18:50:25 -06:00
Dan Williams
30721f8aa7 wimax: set initial device status 2011-01-04 18:26:52 -06:00
Dan Williams
a802c7f40d wimax: work around wide-char stupidity in Intel WiMAX SDK
The SDK internally use wchar_t for NSP names even though the
names are actually UTF-8 (since the driver uses UTF-8/ASCII). So
work around that by using the full network name buffer in case
the NSP name is an odd number of characters and thus widechar
comparison functions like wcscmp() would fail when given ASCII.
2011-01-04 18:25:14 -06:00
Dan Williams
d11b7bc611 wimax: do nothing if state isn't actually changing 2011-01-04 18:24:10 -06:00
Dan Williams
3e4b54a5d0 policy: recheck auto-activatable connections when WiMAX NSPs change 2011-01-04 18:23:29 -06:00