Commit graph

1488 commits

Author SHA1 Message Date
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
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
73659e724c makefile cleanups
0.7 requires dbus 1.1 or greater (for system bus activation), so make that
explicit, and remove compat code for D-Bus 0.6 and earlier.  Consolidate
the various glib pkgconfig checks into one, since most anything will require
gthread, glib, and gobject anyway.  Fixup the docs makefile to be more
automake-compatible and let 'make clean' actually work correctly when
docs are built.
2009-02-15 11:20:25 -05:00
Dan Williams
c100d0d779 dbus: clean up reconnection
The reconnection timeout would never be canceled, and get rid of the
"disconnected by the system bus" message on exit, which while
technically true was useless due to the pending exit.
2009-02-15 10:17:53 -05:00
Dan Williams
64a11d9e2b core: log when exiting 2009-02-15 10:14:34 -05:00
Dan Williams
f0b6da5fe8 core: fix error reporting from replace_default_ip4_route() (rh #477916) 2009-02-13 07:00:34 -05:00
Dan Williams
050a31e50d core: increase SSID buffer size to fix 32-character SSIDs (rh #485312, lp281755) 2009-02-12 16:25:19 -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
2445f78e07 core: remove stray semi-colon 2009-02-10 18:30:59 -05:00
Tambet Ingo
614d1c7712 Use the correct signature for DeviceAdded and DeviceRemoved MM signals. 2009-02-10 15:34:21 +02: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
Tambet Ingo
a772546212 Convert MM errors to NM state reasons. 2009-02-09 11:01:35 +02:00
Tambet Ingo
c4b10085c9 Use the existing dbus-glib macros. 2009-02-09 11:01:35 +02:00
Tambet Ingo
eaa93b0387 Remove HSO and MBM modem implementations and replace them with generic code. 2009-02-09 11:01:35 +02:00
Tambet Ingo
10784dd1b6 Use the 'Simple' modem interface. 2009-02-09 11:01:35 +02:00
Tambet Ingo
9c0d6b468d Share some utility helper functions to send hash tables containing GValues over dbus. 2009-02-09 11:01:35 +02:00
Tambet Ingo
e4398a88c8 Use ModemManager. 2009-02-09 11:01:35 +02:00
Dan Williams
ce3473dc90 clear pending activation checks on device removal
Found by Drew Moseley <dmoseley@mvista.com>
2009-02-06 15:38:09 -05:00
Dan Williams
675a01ab9a fix dbus conf file broken by 7c3063faea 2009-02-05 07:15:04 -05:00
Dan Williams
7c3063faea ppp: don't require separate bus name for pppd plugin communication
Not actually needed, and actually makes securing the daemon harder
from a D-Bus perspective, since both bus names resolve to the same
unique name anyway, and the unique name is what actually gets
matched on inside dbus.  Suggestion from Colin Walters.
2009-02-05 06:05:10 -05:00