Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
9c2cce5ac9 trivial: remove unused prototype 2011-05-18 11:13:34 -05:00
Dan Williams
4d38c1a23a trivial: add missing curly brace 2011-05-18 11:10:50 -05:00
Dan Williams
a2cd94f83f wifi: ignore zero-length SSIDs in internal wifi code
Should never get these, and if we do, we should ignore them by
leaving the SSID as NULL.
2011-05-18 10:32:03 -05:00
Dan Williams
5f073ece4b wifi: return error for AddAndActivate requests for hidden APs
If there's no SSID, we can't connect at all.  So if a client passes
in a hidden AP, and doesn't send the SSID in the partial connection
info, we can't make a connection with it.  Return an error instead
of crashing.
2011-05-18 10:22:25 -05:00
Dan Williams
60c1870674 Revert "core: fix crash while connecting with AddAndActivateConnection() and SSID is missing"
This reverts commit 2b12825faa.

Fixes the problem, but the real issue was clients passing AP objects
that don't have an SSID; we need to reject connection creation
requests where the SSID can't be found.
2011-05-18 10:21:10 -05:00
Jiří Klimeš
2b12825faa core: fix crash while connecting with AddAndActivateConnection() and SSID is missing
A network with hidden SSID can appear in gnome-shell indicator applet as
<unknown> entry. Clicking it can make NM crash if there is no SSID in wireless
setting nor in AP.
2011-05-18 14:53:57 +02:00
Dan Williams
7b41be489c libnm-util: allow _ as a valid character for GSM APNs
The ETSI specs state that valid characters are only ASCII alphanumeric
characters, but then state that APNs should generally follow DNS
naming rules.  Well, that means a lot more characters are allowed,
but modems don't like many of them.  So let's slowly allow more
characters as people find ones that actually are used.  The restriction
was originally put in place to disallow spaces, because they
certainly aren't allowed APN characters and modems and the
network puke when they see spaces.
2011-05-17 10:49:44 -05:00
Dan Williams
5deb993ff6 libnm-util: recognize PKCS#8 private keys and check passwords (bgo #649326)
Neither gnutls nor NSS fully support PKCS#8 so we don't have complete
support here, but at least recognize the keys and make an attempt to
check the private key if we can.
2011-05-13 14:22:06 -05:00
Jiří Klimeš
5737573314 dhclient: only send hostname without domain as host-name option (rh #694758) 2011-05-13 11:44:22 +02:00
Thomas Bechtold
cecc0621ce core: recognize platform 'gadget' devices too 2011-05-12 12:14:09 -05:00
Dan Williams
74d798b6dd dispatcher: pass DHCP options as string:string hash
This is what was originally intended, but the NM-side code wasn't
doing this due to an oversight...
2011-05-11 16:01:12 -05:00
Dan Williams
6109388df2 Revert "dispatcher: handle DHCP Options property correctly"
This reverts commit e5e3dbf415.

The patch fixes the issue but it should really be resolved by the
NM dispatcher code in NetworkManagerUtils.c flattening the DHCP
Options property instead, keeping the dispatcher code simpler.
2011-05-11 15:24:40 -05:00
Dan Williams
bcba83592e wimax: make sure current NSP is cleared when appropriate
When removing all NSPs in the scan list clearly we should be clearing
out the current NSP as well, since it just got removed from the scan
list.  And make sure the current NSP is cleared when activation fails
or when the device becomes disconnected, since it's not connected to
anything and thus can't have a current NSP either.

The current NSP should only be set during the activation attempt and
while the device is connected.
2011-05-11 15:21:05 -05:00
Dan Williams
f74c9ebe8f wimax: don't attempt to connect while device is scanning
The WiMAX SDK will reject connect requests while the device is scanning,
which happens when right after suspend or when the wimax radio is
turned on.  Postpone the connect attempt until the device says it's
not scanning anymore instead of having the connect attempt fail
and be retried.
2011-05-11 15:21:05 -05:00
Jiří Klimeš
e5e3dbf415 dispatcher: handle DHCP Options property correctly 2011-05-11 16:16:48 +02:00
Bill Nottingham
0ce4b6b412 systemd: tweak NM-wait-online.service
1) Don't require NM, but run after it. This allows this service
to be installed without bringing up NetworkManager. Add -x so that
it exits if NM isn't running.

2) Install as a want of network.target, instead of multi-user.target.
This allows us to skip it if nothing requires network.target or the
legacy $network SysV capability.
2011-05-10 16:34:11 -05:00
Dan Williams
9ff4914ccc libnm-util: fix some GObject Introspection annotations
Unfortunately, GObject Introspection can no longer describe deeper
types, like those inside nested hash tables, which NM uses extensively
for the NMConnection type and other places.  So we have to remove
those descriptions.  But this moves us back into compliance with
GOI annotation formats.
2011-05-10 13:24:07 -05:00
Dan Williams
ab56b8e925 libnm-util: clarify certificate and key argument names
Clarify that these are supposed to be paths in the argument name;
this shouldn't break API as it's just an argument rename.  Helps
users figure out what the argument should be without as much trouble
as 'value', which is what it was before.
2011-05-10 12:44:01 -05:00
Dan Williams
a08e9b928e core: fix dispatcher handling of empty VPN interface (bgo #649773)
We pass a VPN IP iface of "" through D-Bus (since dbus doesn't do NULL)
and the dispatcher code wasn't ignoring that as it should have been.
2011-05-10 11:33:43 -05:00
Dan Williams
5e2cda5c20 core: fix typo 2011-05-09 13:55:19 -05:00
Dan Williams
4ae83f2d93 libnm-util: remove unused #include 2011-05-09 13:34:21 -05:00
Kristjan SCHMIDT
77e78df1bd po: update Esperanto translation (bgo #649580) 2011-05-06 13:10:47 -05:00
Dan Williams
1e5cff5fa2 libnm-glib: export nm_device_get_ip_iface()
This got forgotten somehow.
2011-05-05 12:59:45 -05:00
Dan Williams
b0f831ab0a Revert "libnm-glib: export nm_device_get_iface()"
This reverts commit 3116e3c980.

Commit message is wrong.
2011-05-05 12:58:45 -05:00
Dan Williams
3116e3c980 libnm-glib: export nm_device_get_iface()
This got forgotten somehow.
2011-05-05 12:38:29 -05:00
Dan Williams
429a05e675 libnm-glib: rename some internal symbols
To ensure they don't show up in the exported symbol check, even
though they aren't currently exported.
2011-05-05 12:37:21 -05:00
Dan Williams
3c6d2088e0 libnm-glib: rename some internal symbols in legacy compat library
To ensure they don't show up in the exported symbol check, even
though they aren't currently exported.
2011-05-05 12:33:49 -05:00
Dan Williams
07c9de48df libnm-util: fix symbol export checks to catch un-exported ones too
The current check caught stuff in the .ver file that was outdated, but
didn't quite get stuff that was supposed to be exported but wasn't,
in some cases.  Update the regex to ensure that symbols that are
not exported, but that start with "nm_" (and aren't GObject
boilerplate) get flagged during the check.

Update internal code to return to a previous pattern of treating symbols
that start with "_" internal, and expecting symbols that start with
"nm_" to be exported.

Also fixes cases where random glibc symbols would get flagged:

00040ff4 l     O *ABS*  00000000              .hidden _GLOBAL_OFFSET_TABLE_
00041380 l     O .data  00000000              .hidden __dso_handle
000406e8 l     O .dtors 00000000              .hidden __DTOR_END__
0000fbe4 l     F .text  00000000              .hidden __i686.get_pc_thunk.cx
0002f980 l     F .text  00000014              .hidden __stack_chk_fail_local
0000b1e7 l     F .text  00000000              .hidden __i686.get_pc_thunk.bx
00040e60 l     O *ABS*  00000000              .hidden _DYNAMIC
2011-05-05 12:26:17 -05:00
Dan Williams
9ee83c18aa api: clarify usage of SetLogging 2011-05-04 17:22:05 -05:00
Dan Williams
2bcd4016b4 settings: clean up signal handlers when destroying connections
Otherwise we might get crashes later.
2011-05-04 17:13:03 -05:00
Dan Williams
30c63ddcb7 settings: fix assertion checks 2011-05-04 17:12:35 -05:00
Dan Williams
0105be530e release: bump version to 0.8.999 (0.9-rc2) 2011-05-03 13:35:08 -05:00
Dan Williams
c4b922ed21 core: emit textual descriptions of device state changes
Throw users a bone about what's happening.
2011-05-03 11:57:26 -05:00
Dan Williams
2e740fe308 core: fix up checks for s390 CTC device type (bgo #649025)
The original check had incorrect logic; correct it.
2011-05-03 10:38:32 -05:00
Dan Williams
f898dbf1a9 dispatcher: enhance dispatcher script environment (bgo #648382)
For VPN connections, the interface name would be that of the VPN's
IP interface, but the script environment would be the that of the
VPN's parent device.  Enhance the environment by adding any VPN
specific details as additional environment variables prefixed by
"VPN_".  Leave the existing environment setup intact for backwards
compatiblity.

Additionally, the dispatcher never got updated for IPv6 support,
so push IPv6 configuration and DHCPv6 configuration into the
environment too.

Even better, push everything the dispatcher needs to it instead
of making the dispatcher make D-Bus requests back to NM, which
sometimes fails if NM has already torn down the device or the
connection which the device was using.

And add some testcases to ensure that we don't break backwards compat,
the testcases here were grabbed from a 0.8.4 machine with a hacked up
dispatcher to dump everything it was given from NM.
2011-05-02 22:54:28 -05:00
Dan Williams
a2fc80b0ea libnm-util: document nm_utils_ip6_dns_to_gvalue() 2011-05-02 22:54:28 -05:00
Dan Williams
6115ef9f71 libnm-util: add IPv6 DNS <-> GValue functions to symbol filter
Not sure how these weren't there in the first place...
2011-05-02 22:54:28 -05:00
Dan Williams
55dde4f89d libnm-glib: fix WINS server handling
Copy & paste error, it seems.
2011-05-02 18:48:16 -05:00
Dan Williams
3620353050 core: add --version and allow it and --help to be run without root 2011-04-28 16:55:35 -05:00
Jiří Klimeš
08fda12858 libnm-util: fix loading/verifying certificates to allow DER format (rh #699591)
The start and end tags '-----BEGIN/END CERTIFICATE-----' was checked first,
which ruled out DER format. This is fixed now and a test is added.
2011-04-28 05:31:15 -04:00
Dan Williams
a0fd14500e wifi: enable background scanning for WPA Enterprise
Enable the supplicant's optimized background scanning functionality
for WPA Enterprise setups so that roaming works correctly.  Otherwise
there are issues pingponging between APs and having an up-to-date
scan list for roaming, since NM only scans every 2 minutes.  The
supplicant can trigger optimized scans based on signal quality
thresholds and such and make these roaming decisions much better
than NM can.
2011-04-27 16:22:54 -05:00
Dan Williams
bb7e03f846 dispatcher: put WINS servers into dispatcher script environment (bgo #624238) 2011-04-26 14:18:51 -05:00
Dan Williams
db9b1df0e4 build: don't use -Wstrict-prototypes (bgo #584947)
First, -Wstrict-prototypes wasn't actually getting used because
-Werror was already in CFLAGS and AC_TRY_COMPILE doesn't produce
main() functions with valid strict prototypes.  Suck.  But even
fixing that, the WiMAX SDK won't build with the flag, so just rip
it out.
2011-04-26 13:55:52 -05:00
Dan Williams
aeb7123368 ppp: make prototypes more valid
So they pass -Wstrict-prototypes which we aren't using but might
some day.
2011-04-26 13:49:05 -05:00
Dan Williams
779215c742 libnm-glib: add *_connection_valid() utility functions
Like the *_filter_connections() functions, but for just one connection,
and now the *_filter_connections() functions call these new ones so
it's really just moving code around and not anything new.

These new functions more closely match the usage I've seen from
gnome-shell's network.js and elsewhere.
2011-04-25 17:07:38 -05:00
Dan Williams
c790c95e75 libnm-glib: add a missing GObject Introspection annotation 2011-04-25 16:14:55 -05:00
Dan Williams
45c8dee74c build: fix subsequent builds when reconfigured (bgo #648451)
AC_PROG_CXX should be unconditionally run, as it doesn't fail out
if a C++ compiler is not found, which is fine.  It'll check for
one, but we only use it if --enable-qt=yes is given at configure
time.  If --enable-qt=no is set, we do not want to do anything
C++ related, which is why it was conditionalized (incorrectly)
the first time around.
2011-04-25 10:09:44 -05:00
Dan Williams
67e092abcb core: better handling of rfkill for WiMAX and WiFi (bgo #629589) (rh #599002)
This commit changes rfkill state handling slightly in the following
ways:

- when checking whether a user toggle request can change radio state,
ignore states we can change in radio_enabled_for_rstate() as a result
of the toggle; this fixes WiMAX enable/disable because a softblock
can be changed by telling wimaxd to enable the radio.  As a side-effect
this also fixes handling of WiFi when altering the rfkill state as well.

- make WiFi user toggle requests change wifi killswitch state; this has
been long requested and on the TODO list for a while and it turns out
to be a lot easier to do these days.  This provides the expected
behavior when disabling wireless from user agent menus since there's
not an easy way to do this other than dropping to shell and running
rfkill.
2011-04-22 14:56:31 -05:00
Dan Williams
8cce42f2a5 core: add GetDeviceByIpIface method
Allow clients to get a device by its IP interface name instead
of having to get the device list and iterate through each one,
and read the interface name to get what they want.
2011-04-22 12:29:07 -05:00
Dan Williams
4cae0bb0fa settings: add a GetConnectionByUuid method
If the client knows the UUID, add a convenience function to get
the connection path directly, instead of having to iterate the
whole connection list and get each connection's details and then
check the UUID.
2011-04-22 12:29:07 -05:00