Commit graph

3944 commits

Author SHA1 Message Date
Dan Williams
b8fc83a7cf core: don't crash when a wired device doesn't have a driver (rh #492246)
Virtual interfaces like Cisco VPN and VMWare net driver don't have 'driver'
links in sysfs (since they don't really have subsystems).
2009-03-26 17:05:41 -04:00
Dan Williams
b724b1820d libnm-util: don't lowercase LEAP username 2009-03-26 16:58:39 -04:00
Dan Williams
e636301c27 modem-probe: fix udev rules to work for usb devices 2009-03-25 14:48:11 -04:00
Dan Williams
1cf39975f2 serial: slightly increase default send delay
Option GlobeTrotter MAX 3.6 seems to be serial port speed
challenged.
2009-03-23 18:26:26 -04:00
Dan Williams
f96163fbd4 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:36:52 -04:00
Dan Williams
8899e1d9cd ifcfg-rh: don't reverse lookup on 'localhost' unless NM_IGNORE_HOSTNAME_LOCALHOST=yes (rh #490184) 2009-03-23 16:45:08 -04:00
Dan Williams
aabc52f4a5 core: fix segfault when device's IP4Config object isn't ready (rh #491620) 2009-03-23 16:45:04 -04:00
Dan Williams
9436e62471 gsm: re-try PIN checking on timeout
It seems that some 'hso' devices (Option GT Max 3.6) drop commands
on the floor if you issue them too quickly, so retry this one for
now.
2009-03-20 18:33:58 -04:00
Dan Williams
31a6f68f8d modem-probe: don't touch USB interface #1 on Huawei modems (rh #487663) (bgo #574924)
The Huawei cards don't like *any* probing on usb interface #1 (the unsolicited message
port).  If anything gets sent to that port, the modem randomly hangs and must be
re-inserted before working again.
2009-03-20 18:14:23 -04:00
Dan Williams
21be2fb0ee modem-probe: handle another CDMA 1xRTT capability variation 2009-03-19 12:59:33 -04:00
Dan Williams
7e3f780417 modem-probe: close serial tty consistently 2009-03-19 12:58:58 -04:00
Dan Williams
4cf2da146d modem-probe: don't suck CPU if writing to the tty fails 2009-03-18 12:45:11 -04:00
Dan Williams
d58d3d73f2 core: work around asymmetric hal/udev device-remove signals 2009-03-18 06:17:36 -04:00
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