Commit graph

3931 commits

Author SHA1 Message Date
Dan Williams
0e75afff50 modem: ignore NO CARRIER messages left over from a previous connection 2009-03-17 14:28:29 -04:00
Dan Williams
d5cdea6a79 modem: rework modem detection to better handle udev probing and multiple ports
Ignore multiple ports from the same modem device, becuase we can only use one
any exposing more than one in the UI is stupid and useless.  This requires some
drunken wandering through the HAL device tree to get the real device that all
the TTYs are owned by.

Second, prefer devices that both HAL and udev think are modems before using
a device that only udev thinks is a modem.  This requires that we delay
handling all ttys until HAL has finished sending them, so that if the second
tty is the one HAL thinks is a modem, we use that instead of some other port
that HAL sends first, but which might happen to have udev capabilities.
2009-03-16 09:35:59 -04:00
Dan Williams
fd043258fe modem-probe: increase delay slightly; optimize for quick-replying ports
Don't just stupidly do nothing for the whole delay, but retry the probe
up until the timeout elapses.
2009-03-16 09:28:23 -04:00
Dan Williams
5f27041114 gsm: handle Sony Ericsson MD300 as an F3507g variant 2009-03-16 06:46:22 -04:00
Dan Williams
73e39bc499 modem: add support for Sony Ericsson F3507g / Dell 5530 (bgo #574014)
These devices also need AT+CGREG, they have problems reporting PIN status
correctly the first time, and are schizophrenic about which init strings
are acceptable.  Since they provide so many serial ports, filter out
ones we don't care about, and ignore the cdc-ether device that we dont
use yet.
2009-03-12 12:16:16 -04:00
Dan Williams
8be5ada959 ifcfg-rh: treat lack of ONBOOT as autoconnect=true (rh #489422) 2009-03-10 10:26:52 -04:00
Drew Moseley
21defe6d73 core: fix use-after-free caused by incorrect HAL device resync code 2009-03-06 17:19:17 -05:00
Dan Williams
7b45be4c8f release: bump version for 0.7.1rc3 2009-03-04 17:50:46 -05:00
Dan Williams
88344ba498 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:09:09 -05:00
Dan Williams
41f3e7d043 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 12:58:52 -05:00
Dan Williams
d1ccade397 libnm-util: fix WPA Ad-Hoc capability matching
Drivers won't necessarily add the "PSK" flag to the beacon for Ad-Hoc
APs, which is fine because PSK is the only type of security that Ad-Hoc
can do.
2009-03-04 12:56:10 -05:00
Dan Williams
df92606d61 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 08:51:14 -05:00
Dan Williams
5b1fadb1ac cdma: quiet message about lack of monitoring device 2009-03-04 08:50:03 -05:00
Dan Williams
4b78fb7485 wifi: fix longstanding bug where scan list gets duplicated
Obviously, two APs with exactly the same flags are compatible.
2009-03-04 07:22:07 -05:00
Dan Williams
c0c94a96af ifcfg-rh: add testcases
With a few fixes to WPA support found while writing the testcases.
2009-03-03 20:13:20 -05:00
Dan Williams
4142711c7a ifcfg-rh: move reader/writer to separate utility library 2009-03-03 20:13:11 -05:00
Dan Williams
2f67895a79 ifcfg-rh: first pass at WPA-PSK support 2009-03-03 20:13:04 -05:00
Alexander Sack
333b1ec74f ifupdown: fix mapping for 'password', 'identity', and 'key' 2009-03-03 12:59:50 -05:00
Alexander Sack
e273f87379 ifupdown: handle previously unsupported format for wifi keys (debian #513874) 2009-03-03 12:59:44 -05:00
Alexander Sack
6a7600d0c4 ifupdown: fix crash for wireless-ssid setting (debian #513852) 2009-03-03 12:59:39 -05:00
Dan Williams
3dab15b303 libnm-glib: add a PermissionDenied error
Used by the applet to help fix CVE-2009-0578
2009-03-03 11:54:54 -05:00
Dan Williams
0972fe6b50 CVE-2009-0365: only allow root to ask for secrets 2009-03-03 11:54:48 -05:00
Dan Williams
432ddedbd8 system-settings: make default wired connections less confusing
The "Auto ethX" connection that the system settings service creates
for each wired device that does not have an existing backing connection
provided by one of the system settings plugins is now read/write when
at least one plugin has the MODIFY capability.

When the user updates the "Auto ethX" connection, the system settings
service will try to move that connection to a plugin, thereby preserving
the user's changes.  It will also then save that device's MAC address
and never create an "Auto ethX" connection for it again.
2009-03-03 11:41:03 -05:00
Dan Williams
bd59da953b wifi: add NM_ACTIVE_AP_DEBUG to help debug active ap issues 2009-03-03 07:18:16 -05:00
Dan Williams
9d7f5b3d08 modem: use only usb interface 0 for Option modems driven by 'option'
Actual Option cards (not cards by other manufacturers that just happen
to use the 'option' driver) are supposed to always use usb interface
0 as the "modem" port, per mail with Option engineering.  Only the
"modem" port will emit unsolicited responses like CONNECT which of
course are required to drive the card.
2009-03-02 16:46:55 -05:00
Dan Williams
153cb64d4e modem: remove originating device multiple serial port workaround
For now, handle multiple serial ports on a vendor/driver basis in the
modem creator function; HAL emits device added signals for the ttys in
random order, so just using the first serial port doesn't work.  This was
mainly added for 'hso' devices anyway, for which multiple serial ports are
already handled correctly by the creator.
2009-03-02 16:44:21 -05:00
Dan Williams
7103dbe426 keyfile: fix testcase build 2009-03-02 13:37:56 -05:00
Dan Williams
4dd68ba888 nm-tool: fix uninitialized variable warning (debian #517520) 2009-03-02 13:28:12 -05:00
Dan Williams
ac8cfea6e0 keyfile: include <sys/types.h> for uid_t (bgo #573281) 2009-02-26 12:43:39 -05:00
Dan Williams
7f1c86e311 ifcfg-rh: use DHCP for minimal ifcfg files containing only DEVICE and HWADDR 2009-02-25 15:23:29 -05:00
Dan Williams
e469016b74 release: bump version for 0.7.1rc2 2009-02-25 14:55:45 -05:00
Dan Williams
bc7ac737ba 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:50:34 -05:00
Dan Williams
715848c2c5 modem: delay probing of all modems by 2 seconds
For the moment; until we can optimize the prober.  The problem is that a modem
that's not fully powered up and ready to talk looks exactly the same as a tty
that just doesn't support AT commands at all.
2009-02-24 07:08:24 -05:00
Dan Williams
3e6671d7a7 core: fix doc generation 2009-02-22 22:13:45 -05:00
Dan Williams
09412869c1 system-settings: implement common GetSettings and GetSecrets methods (rh #486696)
Fix a few problems... No plugin should return secrets in the GetSettings method,
which some plugins did.  When that was committed in the commit "system-settings:
don't return secrets in the settings", it broke those plugins that didn't implement
GetSecrets.  Each plugin can actually use the same code for GetSettings and
GetSecrets, so implement those generically in the NMExportedConnection class and
remove plugin-specific implementations that all did the same thing.
2009-02-22 17:35:27 -05:00
Dan Williams
a82b93c31a core: fix configure.in comment 2009-02-22 07:59:21 -05:00
Dan Williams
67f8c95180 modem: delay probe of cdc-acm devices by 2s as well
Some cards are just going to need delayed probing if they take
a bit respond to AT commands after being plugged in.  We can
optimize further by doing an initial check, waiting a small time
for the response, then checking again at 1s, waiting a small time,
then checking at 2 seconds and waiting for the full timeout for
those devices where --delay is given.
2009-02-20 13:04:57 -05:00
Dan Williams
a2b55d4370 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:56:33 -05:00
Dan Williams
08d7b5f9d2 core: fix distcheck for udev callout 2009-02-19 17:05:02 -05:00
Dan Williams
671c232544 ifcfg-rh: ignore explicitly set 'localhost' hostnames (rh #441453)
To match 'network' service behavior, which would perform reverse
address lookups when the HOSTNAME from /etc/sysconfig/network
was 'localhost' or 'localhost.localdomain'.  Just name your machine
already.
2009-02-19 15:49:37 -05:00
Dan Williams
68b75bb90e modem: move probing into NetworkManager instead of udev-extras
For now.  It doesn't make a lot of sense to have modem probing in udev when
we switch to ModemManager in the future, since ModemManager would have to
re-do pretty much everything the udev-extras prober already did.  Thus,
since modem-probe from udev-extras doesn't have much of a future, don't
start using it or requiring it.  Move the code into NM instead, but still
use udev for the actual probing.
2009-02-19 13:04:13 -05:00
Dan Williams
6ee945ec07 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:00:03 -05:00
Dan Williams
6176cc6808 release: bump version for 0.7.1rc1 2009-02-18 17:35:42 -05:00
Dan Williams
90827aa224 core: clean up initial device messages 2009-02-18 14:15:48 -05:00
Dan Williams
13e49239bd system-settings: don't return secrets in the settings
Since only authorized users should be able to get secrets, don't return
them in the GetSettings handlers; callers need to use GetSecrets instead.
2009-02-18 14:01:33 -05:00
Dan Williams
4e873d09b0 core: fix crash reading modem caps from HAL; log whether HAL/udev used 2009-02-18 14:00:40 -05:00
Dan Williams
5fd2cd5708 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:58:52 -05:00
Dan Williams
b3f192e216 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:45:44 -05:00
Dan Williams
6d498a1f94 system-settings: fix shutdown issues
Shutdown on SIGTERM, and don't segfault when quitting cleanly.  Can't
send signals on an object that's being disposed of, so don't do that.
Fix a memory leak of the Hal manager's priv->devices on shutdown, not
that it matters.
2009-02-17 10:45:36 -05:00
Dan Williams
9ca2cd78fd gsm: quiet pointless debug message 2009-02-17 06:25:52 -05:00