Commit Graph

7207 Commits

Author SHA1 Message Date
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
b2305fcb43 bluetooth: fixes for NMDeviceBt
- Use NM_BT_CAPABILITY_NONE instead of 0 when appropriate
- Don't assert on priv->bt_type not being set in
  real_deactivate_quickly(), as it might be called with no
  connections activated
- Fix cut'n'paste typo that made setting the device capabilities
  assert
2009-05-19 15:17:04 -04:00
Bastien Nocera
7ab907c6bc bluetooth: remove unused device proxy
Only really use the serial/network ones for now, so drop the device proxy
to simplify stuff.
2009-05-18 19:20:46 -04:00
Bastien Nocera
c74cf24f87 bluetooth: misc fixes 2009-05-15 09:31:55 -04:00
Bastien Nocera
cfa1eb157e bluetooth: ask Bluez to connect/disconnect from remote device when appropriate
Cleanups and leak fixes by dcbw.
2009-05-14 19:17:56 -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
3af7068a87 bluetooth: fix confusion about NAP and PAN
NMSettingBluetooth represents the local connection, and thus should
use "PANU" not NAP, because the local adapter will be in PANU mode.
For now, NAP is only relevant when talking about the *remote* device
in NMDeviceBt or NMBluezDevice.
2009-05-14 13:00:22 -04:00
Bastien Nocera
eddc6f67bb bluetooth: accept any BT device class if it supports the right UUIDs 2009-05-14 11:31:36 -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
0e3cdd615a wifi: 64-bit compile warning fix 2009-05-13 12:02:45 -04:00
Dan Williams
57a04fa59d wifi: handle unsolicited supplicant scans
With supplicant patches, this allows NM to figure out when the supplicant
is performing an unsolicited scan, and thus to not run periodic_update()
when the supplicant is scanning.

This fixes some of the causes of "roaming to none", especially in hidden
SSID networks.  In those cases, after NM had requested a broadcast scan,
the hidden SSID AP would likely not show up in the scan results, leading
to the supplicant performing a specific SSID scan that NetworkManager
was unaware of.  While that specific SSID scan was going on, NM could
run periodic_update() and pull the wrong frequency off the card,
leading to the "roaming to none" message when the associated AP with
the wrong frequency could not be found in the scan list.
2009-05-13 11:16:29 -04:00
Dan Williams
027ef78682 core: actually emit reason for device state changes
Found by 代尔欣 <daierxin@gmail.com>
2009-05-12 12:05:47 -04:00
Dan Williams
b4767a5c1f dns: fix handling of searches and domains in resolv.conf
Fix a few issues here:

- nm_utils_merge_ip4_config() didn't reset domains, which would cause domains
    to still be used even if the user elected to ignore DHCP-provided DNS
- nm_ip4_config_add_domain() and nm_ip4_config_add_search() didn't filter
    duplicates
- nm_ip4_config_reset_searches() leaked everything
- If the user had specified an appended search in the connection, that search
    would be added to the 'searches' field in resolv.conf, but any server
    returned domains in 'domain_name' would be ignored because at least one
    search existed.
2009-05-11 20:07:39 -04:00
Dan Williams
fd4bdc5c54 dbus: fix issues with root being at_console
When root is at_console, the at_console stuff overrides the user=root
section.  Since the default section will deny-by-default, explicitly
allow certain D-Bus interfaces to be usable by at_console users (including
root when root is at_console) prevents root from being denied access to
those interfaces when root is at_console.
2009-05-10 00:20:12 -04:00
Dan Williams
07cc26d5fc wifi: handle WEP & WPA passphrases (bgo #513820) (rh #441070)
Instead of requiring applets to hash passphrases, just do it in NM instead.
This should fix confusion where people don't understand that they are seeing
their hashed passphrase.
2009-05-09 23:09:42 -04:00
Dan Williams
756bc70402 dhcp: (dhclient) use per-connection leasefiles and don't delete on deactivate
So that leases are actually useful...
2009-05-03 00:51:09 -04:00
Michael Biebl
1c3c6c2a66 Remove DBUS_API_SUBJECT_TO_CHANGE
We require dbus 1.1 anyway
2009-05-02 18:00:22 -04:00
Dan Williams
7082150fb1 wifi: fix scan list culling when no APs are found in a scan
Bug found by Gustavo Sverzut Barbieri <gustavo.barbieri@canonical.com>
2009-04-30 10:24:25 -04:00
Dan Williams
8067ec9334 wifi: whitespace and other misc cleanups 2009-04-29 17:08:31 -04:00
Dan Williams
c955994b4f core: remove dead code 2009-04-29 13:21:54 -04:00
Daniel Gryniewicz
20c662e350 dhcp: use correct dhclient config file location for Gentoo (bgo #579737) 2009-04-23 10:44:08 -04:00
Dan Williams
b87c5495ea core: don't shadow basename (2) 2009-04-21 18:29:44 -04:00
Harald Hoyer
b96c60dae0 core: update resolv.conf directly if opening the tempfile fails 2009-04-17 10:06:48 -04:00
Tambet Ingo
47527601af wifi: don't bring device up if it's rfkilled 2009-04-15 11:07:15 -04:00
Dan Williams
e5146b8f82 core: fix case of unmanaged device being managed at startup (rh #494527)
device_start() would unconditionally transition the device to UNAVAILABLE
no matter what the initial managed setting was.  There was a short window
for a race with HAL where device_start() wouldn't get canceled if HAL
was starting up in parallel with NetworkManager.
2009-04-11 08:10:55 -04:00
Dan Williams
b3932d21a7 modem: send network mode preference to MM when connecting 2009-04-09 07:37:53 -04:00
Dan Williams
9885de6bdb dhcp: handle escaped spaces in 'domain search' option (bgo #575145) 2009-04-08 21:03:43 -04:00
Dan Williams
0b7517ffa0 core: ignore DHCP-sent MTUs less than 577 (lp #352779)
MTUs less than 577 are not legal and the DHCP server is just being
stupid.  Punch stupidity in the face.
2009-04-07 15:19:30 -04:00
Dan Williams
67ffcfab11 core: fix crash when NameHasOwner fails but dbus-glib doesn't set an error (lp #352400) 2009-04-01 07:20:16 -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
Dan Williams
f0e3bf658e core: don't schedule same activation stage multiple times
Fix issues with crappy wifi drivers which send a stream of associate
events before NM can schedule the next activation stage, which actually
scheduled *multiple* next stages.  Only allow one stage to be scheduled at
at time, and don't schedule the same stage again if it's already next up
to the plate.
2009-03-23 17:39:34 -04:00
Dan Williams
31539034b3 core: fix segfault when device's IP4Config object isn't ready (rh #491620) 2009-03-23 14:38:33 -04:00
Tambet Ingo
41bc6e167b Implement sending current host name to DHCP server. 2009-03-20 14:44:49 +02:00
Tambet Ingo
9742b46122 Fix the DHCP lease directory location for suse. 2009-03-16 11:17:34 +02:00
Tambet Ingo
b41f612c73 Don't spam the log if modem-manager is not installed. 2009-03-16 10:46:21 +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
dc09f62e2e wifi: fix AP flags for user-created Ad-Hoc and hidden Infrastructure networks
Fake APs created in nm_ap_new_fake_from_connection() didn't get the
right flags due to wrong interpretation of # WPA protos; no protos really
means "all ciphers".  Thus the applet wouldn't ask for the right type of
security info if the connection failed; for hidden WPA networks, the applet
would instead ask for WEP keys.

Clean up addition of flags for 'fake' WPA APs in general; pairwise
shouldn't ever include WEP ciphers, and if the connection didn't
include any pairwise or group ciphers, default to "all" as is
expected.  Also fix flags for WPA Ad-Hoc networks, since they have
special limitations imposed by the supplicant and drivers.
2009-03-04 17:18:33 -05:00
Dan Williams
c59eb16817 wifi: remove user-created Ad-Hoc APs from the scan list when no longer used (bgo #569241)
The first fix didn't cover creating a new adhoc network while already joined
to an existing adhoc network; thus clearing the 'fake' flag wouldn't necessarily
drop the old adhoc network from the scan list, because NM doesn't scan in adhoc
mode, and thus the scan list culling function wouldn't run.

Even if the AP being removed isn't adhoc, it was never found from a scan anyway
(if it had, the fake flag would have been reset) and thus we don't care about
it anymore.
2009-03-04 17:18:28 -05:00
Dan Williams
9e0ebf36ac wifi: ensure user-created Ad-Hoc APs disappear when no longer used (bgo #569241)
Since NM doesn't scan while associated with an Ad-Hoc BSS (since
scanning in adhoc mode makes most driver quite angry and doesn't
work well anyway) the user-created BSS was never found in the scan
list, and the 'fake' flag wasn't cleared.  Thus the BSS stuck
around in NM's scan list forever.

Additionally, ensure that set_current_ap() maintains a reference
to the old AP until after setting the new AP, just in case the same
AP is being set again.

Third, handle IBSS coalescing by always updating the current AP's
address (if it's an Ad-Hoc AP) with the BSSID reported by the card.
The joined Ad-Hoc networks' BSSID will change if the card
coalesces with other stations in the same IBSS, which would make
NM fail to find the currently joined network in the scan list, and
lead to "roamed to (none)" messages and inability to find the
current AP.
2009-03-04 09:03:17 -05:00
Dan Williams
7028eb0969 wifi: fix longstanding bug where scan list gets duplicated
Obviously, two APs with exactly the same flags are compatible.
2009-03-04 09:02:52 -05:00
Dan Williams
857a073d88 wifi: add NM_ACTIVE_AP_DEBUG to help debug active ap issues 2009-03-03 07:22:37 -05:00
Dan Williams
f648c269bc core: ensure superclass' finalize method is called
Fixes a crash with PropertyChanged signals (triggered when using wifi + vpn and
rmmod-ing the driver) where properties_changed_info_destroy() wouldn't get
called on object destruction becuase the GObject finalize method never got
called for the DHCP4Config and IP4Config objects.
2009-02-25 13:53:24 -05:00
Dan Williams
25c030ef2e core: use IFF_LOWER_UP instead of IFF_RUNNING for carrier (lp #332064)
We really have wanted to use IFF_LOWER_UP since 2.6.17 for carrier
status, since that's tied to netif_carrier_ok()/netif_carrier_on() in
the kernel.  See kernel commit b00055aacdb172c05067612278ba27265fcd05ce
for the introduction of IFF_LOWER_UP.
2009-02-20 09:43:27 -05:00
Dan Williams
0393d4fa56 802.1x: allow explicitly specifying PEAP version to either 0 or 1
Previously requiring only v1 was possible, but there are apparently
so many different implementations of v1 that sometimes you have to force
v0 instead.
2009-02-19 13:06:56 -05:00
Dan Williams
27a1b1607f core: clean up initial device messages 2009-02-18 14:21:02 -05:00
Dan Williams
68ca77cdb5 dhcp: always clean up DHCP client watch callback when stopping DHCP
Also fix a bug where failure to start the DHCP client wouldn't be
handled.
2009-02-18 09:57:33 -05:00
Dan Williams
3888405134 dbus: final dbus policy fixes (bgo #563730)
Keep explicit denials, consolidate stuff, ensure that when denying
send_interface it's almost always matched with send_destination.
2009-02-17 10:43:53 -05:00