Commit Graph

7207 Commits

Author SHA1 Message Date
Tambet Ingo
7a36b31ced Merge branch 'master' into wimax 2009-12-29 16:09:17 +02:00
Tambet Ingo
302e62d9c7 core: Fix another crash
Need to check if the killswitch type has an object filter function
before trying to use it (in other location as well).
2009-12-29 15:52:36 +02:00
Tambet Ingo
20a4c6c6b6 wimax: Implement RFKILL handling
Implement and export over DBus WiMAX enable/disable and hardware state query.
2009-12-29 11:27:10 +02:00
Tambet Ingo
ac0f32537e Merge branch 'master' into wimax 2009-12-29 11:25:37 +02:00
Dan Williams
644dabd7ab core: fix crash after wake due to 8f4d4c0463
Need to check if the killswitch type has an object filter function
before trying to use it.
2009-12-28 15:20:02 -06:00
Dan Williams
f9318dac55 core: fix reading WWAN state from state file 2009-12-25 14:42:44 -06:00
Dan Williams
58df1b6e36 core: fix error when parsing state file for WirelessEnabled fails
Found by Chen Jie <chenj@lemote.com>.
2009-12-25 14:33:02 -06:00
Dan Williams
6a6e231b3e supplicant: remove unused variables 2009-12-23 11:10:47 -08:00
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
870cfa489e wifi: remove useless assignment 2009-12-23 11:09:37 -08:00
Dan Williams
d6799281e1 ethernet: remove unused variable 2009-12-23 11:09:22 -08:00
Dan Williams
0075b41510 dhcp: clarify ignored variable name 2009-12-23 11:08:56 -08:00
Dan Williams
a0984585af modem: ensure deactivation on disable only happens on disable 2009-12-23 02:44:21 -08:00
Dan Williams
212220f0b4 Merge commit 'origin/master' into btdun 2009-12-23 01:46:59 -08:00
Dan Williams
ac38d65d6d modem: fix activation after 1379af271138202d406de585cbdcd491ac11ed01
Got the return semantics of dbus_g_proxy_end_call() wrong...
2009-12-23 01:30:55 -08:00
Dan Williams
154a41dec9 modem: ensure device is deactivated if the modem is disabled underneath NM 2009-12-23 01:30:54 -08:00
Dan Williams
f61af8e139 modem: enable modem before connecting if required 2009-12-23 01:30:54 -08:00
Dan Williams
8f4d4c0463 manager: add WWAN enable/disable support 2009-12-23 01:30:54 -08:00
Dan Williams
a0f732c8cb modem: proxy the ModemManager Enabled property 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
7b10ec29a2 modem: fix enable/disable/disconnect flow
NM shouldn't really be calling Enable(False) except in response to
direct user requests to turn off WWAN, much like rfkill, since
Enable(False) /is/ essentially rfkill for 3G.  Instead, we should
be powering up the modem before trying to use it, and only
disconnecting after we're done.  Let the user do enable/disable
when they want to.

This also fixes issues with other devices like GPS potentially
using the modem-manager at the same time as NM and ensures that NM
won't punch the modem in the face while GPS is using it.
2009-12-23 01:30:54 -08:00
Tambet Ingo
d98c431c65 system-settings: Fix using hostname from DHCP
When a plugin has hostname capability, it's NULL for hostname means "use
the hostname from DHCP server".
2009-12-22 09:11:30 +02:00
Tambet Ingo
75c734f1a9 wimax: Implement WiMAX support 2009-12-18 15:41:27 +02:00
Dan Williams
c6bf930b1f Merge commit 'origin/master' into btdun 2009-12-15 15:32:48 -08:00
Dan Williams
9c371949bf core: use GChecksum (bgo #502494)
And remove cargo-culted internal stuff which is no longer needed.
The ifcfg-rh sha1 stuff wasn't even used anymore after the move to
certificate paths.
2009-12-03 10:55:02 -08:00
Dan Williams
0278884c6b Merge commit 'origin/master' into btdun 2009-12-01 11:44:29 -08:00
Michael Biebl
1669e3a778 build: fix distcheck 2009-11-29 15:32:45 -08:00
Dan Williams
5d9a367e63 core: silence flush_routes() and flush_addresses() warnings 2009-11-24 11:19:57 -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
830bded555 ppp: increase PPPoE pppd timeout to 30 seconds
Mostly to help debug stuff like (rh #528314) where it's hanging somewhere
in rp-pppoe while trying to connect to the access concentrator.
2009-11-23 00:08:35 -08:00
Dan Williams
6f21e935d6 wifi: don't allow scan requests when associating
Shouldn't be allowing scan requests when associating or when the
supplicant is otherwise busy doing something else.

Older fullmac cards are much more likely to run into this problem
since they usually take longer to connect; since they take so
long, NM may sometimes request a scan during association or
during DHCP which can cause the card to miss DHCP replies.  I've
never seen this happen with mac80211 drivers though.
2009-11-21 02:48:46 -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
Dan Williams
1151ac2478 system-settings: cache secrets to protect against nm_connection_clear_secrets()
3rd patch in a series with:
0bbdc6b0fc
b135fa3265

With NM 0.8 the system settings service was integrated into NM and
thus nm_connection_clear_secrets() acts directly on the system
settings plugins' NMConnection objects.  So when NM cleared secrets
(for example after determining that they might be bad in a device's
stage2 handler), we completely lost the secrets forever.

With this commit, the secrets are now cached and updated whenever
the connection is updated, and thus are again available to send to
NetworkManager when needed.
2009-11-16 16:48:59 -08:00
Dan Williams
0bbdc6b0fc system-settings: generalize nm_sysconfig_connection_update() a bit
So that it can be the sole location where secrets caching happens.
2009-11-16 16:14:50 -08:00
Dan Williams
b135fa3265 system-settings: add helper for updating plugin connections
nm_connection_replace_settings() replaces the connection's settings
but doesn't allow interception of the new settings.  Plugins would then
send out the update signal, but secrets are scrubbed out of them to
ensure secrets aren't leaked out into D-Bus signals.

With NM 0.8 the system settings service was integrated into NM and
thus nm_connection_clear_secrets() acts directly on the system
settings plugins' NMConnection objects.  So when NM cleared secrets
(for example after determining that they might be bad in a device's
stage2 handler), we completely lost the secrets forever.

Adding this function allows the system settings service to hook into
the connection updates when the plugin connection's backing storage
(like config files or whatever) changes and cache the secrets for
use in NMSettingsConnectionInterface get_secrets() requestes.
2009-11-16 15:51:40 -08:00
Frederik Himpe
f4c1a52876 dhcp: use correct leasefile location on Mandriva 2009-11-15 22:42:16 -08:00
Dan Williams
cfb2b72dc6 dnsmasq: VPN DNS fixes
Turn DHCP and DNS debugging on with NM_DNSMASQ_DEBUG.

Without --strict-order, dnsmasq will round-robin queries which in
the case of VPN connections may result in the query going to the
non-VPN nameserver.  Also, allow dnsmasq to poll resolv.conf for
nameserver updates so that when the default connection changes,
it knows about the new nameservers.
2009-11-14 14:42:58 -08:00
Dan Williams
50fdbabbcb system-settings: fix crash when deleting auto wired connections
Make it less magical and therefore actually work.
2009-11-14 11:26:38 -08:00
Dan Williams
92db663514 wifi: don't fail first scan after supplicant interface is ready
If the supplicant interface became ready but the device was still
UNAVAILABLE, requesting a scan before transitioning to DISCONNECTED
would just fail because can_scan() returns FALSE when the device's
state is not >= DISCONNECTED.  Change device state first so that
doesn't happen.
2009-11-11 16:34:15 -08:00
Dan Williams
972b7ed70a olpc-mesh: fix device added signal usage
The object to which the signal is connected is always the first arg.
2009-11-10 09:06:53 -08:00
Dan Williams
d53574d725 wifi: fix some immediate wifi connection failures when enabling wifi
Impact of this bug is likely limited to Ad-Hoc connections that don't
require a scan before activation since by the time the scan has finished,
the NMSupplicantInterface will be set up.  However, this shows a bug where
Ad-Hoc connections can be immediately activated even if they don't have
the latest timestamp, because a scan hasn't completed yet and thus we don't
know if there are any usable APs around.  Could be fixed by only letting
auto-activations happen after the first successful scan anyway.  But whatever...

Log messages look like this:

NetworkManager: <info>  Activation (wlan0/wireless): connection 'Wireless connection 1' requires no security.  No secrets needed.
NetworkManager: <info>  Config: added 'ssid' value 'foobar'
NetworkManager: <info>  Config: added 'mode' value '1'
NetworkManager: <info>  Config: added 'frequency' value '2412'
NetworkManager: <info>  Config: added 'key_mgmt' value 'NONE'
(NetworkManager:28239): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(NetworkManager:28239): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
NetworkManager: dbus_g_proxy_begin_call: assertion `DBUS_IS_G_PROXY (proxy)' failed
NetworkManager: <WARN>  real_act_stage2_config(): Activation (wlan0/wireless): couldn't send wireless configuration to the supplicant.
NetworkManager: <info>  (wlan0): device state change: 5 -> 9 (reason 9)
NetworkManager: <info>  Activation (wlan0) failed for access point (foobar)
NetworkManager: <info>  Marking connection 'Wireless connection 1' invalid.

This happened because the nm_device_wifi_set_enabled() only checked for
the existence of the NMSupplicantInterface, but not whether the supplicant
interface was ready to be used.  The supplicant interface would be in the
middle of the getInterface or addInterface call and wouldn't have
initialized priv->iface_proxy yet, which is where that error message was
coming from.

So don't change device state from the wifi_enabled handler, just init
the supplicant interface (it should have been torn down already by
device_state_changed() when the device goes to UNAVAILABLE or UNMANAGED)
and wait for the supplicant interface state change to READY to change
the NMDeviceWifi state to DISCONNECTED in supplicant_iface_state_cb_handler().
2009-11-06 16:53:51 -08:00
Michael Biebl
9cb3877afa core: link against libdl for dladdr()
For stricter linkers like binutils-gold.
2009-11-06 13:40:44 -08:00
Michael Biebl
836cbe2d13 core: link against libm for pow()
Link against libm (using the LT_LIB_M macro and the $LIBM variable) as
we are using pow() and otherwise fail to build with stricter linkers like
binutils-gold.
2009-11-06 13:40:13 -08:00
Dan Williams
7d23d8ccdb Merge commit 'origin/master' into btdun 2009-11-06 13:34:52 -08:00
Dan Williams
0d05bc9a63 core: don't leak 'device-type' into PropertiesChanged signal
The device type is set at object construction before the object is
ever exported, thus the first time a client gets the value it will
be correct, and the value should never change.  As such, the
property never needs to be part of PropertiesChanged signals.
2009-11-04 10:43:46 -08:00
Dan Williams
ea78b0af0e core: don't leak 'ifindex' into PropertiesChanged signal
It's not part of the D-Bus spec; so it shouldn't be exposed.
2009-11-03 17:40:36 -08:00
Jirka Klimes
02a77d2b63 core: validate pidfile and quit early if NM is already running (rh #517362)
Also, don't delete the pidfile if it wasn't written out in this run
of NM.  Cleanups and simplifications by dcbw.
2009-11-03 16:13:26 -08:00