Commit graph

144 commits

Author SHA1 Message Date
Dan Williams
412cd1afbf core: fix possible erroneous warning on auto-ip events
Remove unused variable too.
2009-12-23 11:10:11 -08:00
Dan Williams
8f4d4c0463 manager: add WWAN enable/disable support 2009-12-23 01:30:54 -08:00
Dan Williams
5605709e80 manager: generalize rfkill operations
So it's easier to support other killswitches like WWAN and WiMAX.
2009-12-23 01:30:54 -08:00
Dan Williams
843c251d26 core: add statefile support for WWAN devices 2009-12-23 01:30:54 -08:00
Dan Williams
c80b729e77 udev: add support for other types of rfkill switches 2009-12-23 01:30:54 -08:00
Dan Williams
052cf6b2e2 core: generalize interface for enabling/disabling devices
We'll use it for WWAN too.
2009-12-23 01:30:54 -08:00
Dan Williams
e123fcb143 wifi: poll rfkill status for ipw2x00 devices
The ipw2x00 drivers won't be converted over to the kernel's rfkill
subsystem until 2.6.33, and thus listening for udev rfkill change
events on these devices doesn't work.  So until then, poll rfkill
state for ipw2x00 devices every few seconds in addition to listening
to other rfkill sources.
2009-11-24 10:43:43 -08:00
Dan Williams
f1444bbabe wifi: ensure wifi devices are enabled on wakeup if not rfkilled
Since rfkill state is saved but not acted upon during sleep
(since NM shouldn't be touching devices while sleeping) we have to
remember to act on the new state when waking up.
2009-11-20 09:11:46 -08:00
Jirka Klimes
dccdf5e1f3 core: preserve wifi and networking enabled/disabled states (bgo #582447)
With modifications by dcbw to create the state file if it doesn't exist,
and a couple cleanups and formatting fixes.
2009-11-02 17:29:53 -08:00
Dan Williams
4b2c810b1b core: clear invalid tag on failed connections when sleeping
So they'll get tried again on wakeup/resume.
2009-10-20 15:25:04 -07:00
Dan Williams
8d65515435 manager: automatically pick a base connection for VPNs
If let callers pass "/" for the specific object, and NM will
automatically pick the default device.
2009-10-16 11:52:27 -07:00
Dan Williams
85da54edd7 manager: fix use-after-free crash for cdc-ether modems
An ethernet device that's actually a component of a modem could get
added to the device list, but then destroyed without getting removed
from the device list.
2009-10-04 23:36:06 -07:00
Dan Williams
0bbf8c5307 ethernet: make initial carrier check synchronous; require carrier for connection takeover (lp#417719) 2009-09-28 11:09:31 -07:00
Alexander Sack
2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams
3ce6b68c64 vpn: fix crash caused by 8d205212dc
Typo; should have been 'unref'.
2009-09-17 11:23:44 -07:00
Dan Williams
25d17ef341 core: always tear down devices when their hardware goes away
Previous connection-assumption code that made sure not to touch
ethernet devices when NM quit also didn't clean up after devices
that were physically removed, which was wrong.
2009-09-14 07:55:59 -07:00
Dan Williams
8d205212dc vpn: fix crash when canceling VPN connection secrets request
The secrets provider might be unrefed while processing the response,
causing a double-free when the unref triggers the weak ref notifier
and clears out the GetSecretsInfo, but then later the dbus handler
that got the response in the first place tries to free the info
explicitly.  So keep the provider around while processing the result.
2009-09-10 12:18:18 -07:00
Alexander Sack
2e912158af core: ensure that modem-manager claimed data devices are ignored
add function nm_modem_manager_has_modem_for_iface to modem-manager api
and ignore device additions in nm-manager if the iface is claimed by
modem-manager; also forget about already managed devices once they get
claimed by modem-manager.
2009-09-04 16:55:48 +02:00
Dan Williams
56a597be32 core: use defined signal names 2009-08-24 10:17:05 -05:00
Dan Williams
890866bef9 system-settings: clean up settings service classes
Make NMSettingsService implement most of the NMSettingsInterface
API to make subclasses simpler, and consolidate exporting of
NMExportedConnection subclasses in NMSettingsService instead of
in 3 places.  Make NMSysconfigSettings a subclass of
NMSettingsService and save a ton of code.
2009-08-10 23:25:11 -05:00
Dan Williams
f64354d0cc Merge commit 'origin/master' into polkit1
Conflicts:
	system-settings/plugins/ifcfg-rh/nm-ifcfg-connection.c
2009-08-10 16:27:16 -05:00
Dan Williams
38f732a721 Merge branch 'iscsi' 2009-08-10 15:52:28 -05:00
Dan Williams
869e57524c core: fix uninitialized variable usage 2009-08-06 15:15:46 -04:00
Dan Williams
78bb1c01b7 core: implement connection assumption
Mark activation requests that contain connections to be assumed,
and use that to short-circuit various parts of the activation
process by not touching various device attributes, since they
are already set up.  Also ensure the device is not deactivated
when it initially becomes managed, because that would kill the
connection we are about to assume.
2009-08-05 18:03:09 -04:00
Daniel Drake
ff88cf12c2 olpc: add mesh device logic and config setting 2009-08-05 16:34:02 -04:00
Dan Williams
4802094985 Merge commit 'origin/master' into iscsi 2009-08-05 15:46:11 -04:00
Dan Williams
f2eb3dea65 core: base infrastructure for connection assumption
Figure out what connections can be assumed when a device is added,
and on shutdown don't blow away connections that can be assumed on
NM restart.
2009-08-03 17:15:03 -04:00
Dan Winship
e324f783e2 Fix crash when nm-applet exits 2009-07-29 21:23:36 -04:00
Dan Williams
0d69dfe39e libnm-glib: implement new settings interfaces
The old NMExportedConnection was used for both client and server-side classes,
which was a mistake and made the code very complicated to follow.  Additionally,
all PolicyKit operations were synchronous, and PK operations can block for a
long time (ie for user input) before returning, so they need to be async.  But
NMExportedConnection and NMSysconfigConnection didn't allow for async PK ops
at all.

Use this opportunity to clean up the mess and create GInterfaces that both
server and client objects implement, so that the connection editor and applet
can operate on generic objects like they did before (using the interfaces) but
can perform specific operations (like async PK verification of callers) depending
on whether they are local or remote or whatever.
2009-07-23 09:20:52 -04:00
Dan Williams
c867c84ae5 core: fix connection updated/removed signal handling
The DBusGProxy was getting destroyed after all the ListConnections calls
were completed, and thus the dbus match was removed, and the signals
weren't getting reflected back up into NM to be handled.  Fix that by
attaching the DBusGProxy to the NMConnection it represents to ensure it
lives until that NMConnection dies.
2009-07-14 14:43:37 -04:00
Dan Williams
1bb492935a bluetooth: fixes and addition of NMDeviceBt to libnm-glib 2009-07-10 10:45:24 -04:00
Dan Williams
fec407b345 system-settings: resurrect auto-wired-default behavior
Dropped due to time during the udev conversion.
2009-07-09 11:06:31 -04:00
Dan Williams
b62ff36e33 core: get rid of nm_device_set_device_type() 2009-07-07 14:57:05 -04:00
Dan Williams
3cdb0f6c7a core: add a 'type-desc' property to NMDeviceInterface and use it
instead of littering the code with NM_IS_*.
2009-07-07 14:24:12 -04:00
Dan Williams
b71b1e66c8 rfkill: fix mixed-up soft/hard kill states 2009-06-17 07:24:28 -04:00
Dan Williams
c9067d8fed everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's
"auto eth" connections for ethernet devices that don't have an existing
connection.  Might also have issues with unmanaged devices that can't
provide a MAC address until they are brought up, but we'll see.
2009-06-11 00:39:12 -04:00
Dan Williams
f8026260c6 rfkill: port rfkill to libgudev 2009-06-05 01:55:02 -04:00
Dan Williams
41b6e4f513 bluetooth: resync bluetooth devices on connection events 2009-05-20 12:02:18 -04:00
Bastien Nocera
c67aace375 bluetooth: fixes for NMManager bluetooth device handling
- Re-query the BlueZ manager when connection, or connections are
  added
- Don't assert when a new BT device is created
- Fix the connection bdaddr and device bdaddr comparison, we
  were comparing a byte array with a string
- Simplify bluez_manager_bdaddr_has_connection()
2009-05-19 15:20:20 -04:00
Bastien Nocera
5a87917f90 bluetooth: create NMDeviceBt objects for configured Bluez devices
Create a new exported Bluetooth device object for any usable Bluez device
that has at least one corresponding NMConnection somewhere.  Clean up
UUID/Capability confusion too.
2009-05-14 13:59:03 -04:00
Dan Williams
7d88a87214 bluetooth: NMDeviceBt and associated fixes 2009-05-14 11:01:56 -04:00
Dan Williams
4d58683276 bluetooth: various fixes
Make stuff actually work this time around.
2009-05-13 22:54:13 -04:00
Dan Williams
f4aa499c4c bluetooth: add bluetooth manager 2009-05-13 21:32:56 -04:00
Dan Williams
a240e6549b core: ensure device is removed from the device list before signaling its removal
Might fix lp#319918
2009-03-31 13:10:00 -04:00
Tambet Ingo
41bc6e167b Implement sending current host name to DHCP server. 2009-03-20 14:44:49 +02:00
Drew Moseley
ee3286c870 core: fix use-after-free caused by incorrect HAL device resync code 2009-03-06 17:20:30 -05:00
Dan Williams
27a1b1607f core: clean up initial device messages 2009-02-18 14:21:02 -05:00
Dan Williams
f33b7627fe core: sync with NETWORKMANAGER_0_7 branch device creation changes
Reduce the diff between head and the 0.7 stable branch.  Shouldn't
result in any functional changes.
2009-02-16 18:47:03 -05:00
Dan Williams
ed274df7c7 rfkill: rework to handle new dynamic HAL killswitches
Requires HAL 0.5.12 as of 2008-11-19 and kernel 2.6.27 or later; if
any dynamic killswitches are found, polled killswitches are ignored.
This is half the fix; the other half is to do something intelligent
with the rfkill state instead of taking the wifi devices down.
2009-02-10 23:06:24 -05:00
Dan Williams
555dfd35e6 core: allow uid 0 to activate user connections
Previously, uid 0 was not permitted to activate user connections,
but in some cases this is desired.
2009-02-10 06:31:50 -05:00