Commit graph

6372 commits

Author SHA1 Message Date
Jiří Klimeš
29a4239f43 policy: make auto-activation retries really work for RETRIES_DEFAULT attempts
Retries counter was not initialized when connections were loaded. That forced
the counter to start from -1 and continue decreasing on connection failures.
And connection attempts never stopped.
2011-05-20 13:01:04 +02:00
Philip Balister
0e45771126 core: yet more consistent usage of libnl CFLAGS and LIBS
This patch has been used in OpenEmbedded [1] since commit b167a9a9 [2][3].

[1] http://www.openembedded.org/
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/recipes/networkmanager/networkmanager/0002-respect-libnl-flags-also-in-dns-manager-vpn-manager-.patch?id=b167a9a9e55a7a493a7ee565cec9c7dd463362ff
[3] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=b167a9a9e55a7a493a7ee565cec9c7dd463362ff

Signed-off-by: Philip Balister <philip@balister.org>
2011-05-19 15:40:07 -05:00
Martin Jansa
a23f3da669 core: use libnl CFLAGS and LIBS consistently
This patch is used in OpenEmbedded [1] since commit 154bd72b [2][3].

[1] http://www.openembedded.org/
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/log/recipes/networkmanager/networkmanager/0001-respect-libnl-flags-also-in-backends-ip6-manager.patch
[3] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=154bd72b1ca859afcae5ed4fe99ed611a13a475c

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2011-05-19 15:31:02 -05:00
Dan Williams
6dae3c2f33 ppp: enable pppd debug logging when PPP log domain is enabled for debuggin
Instead of just with the old environment variable.  This means we'll
log pppd debug output when the log level is changed via the D-Bus
interface now too.
2011-05-19 13:31:52 -05:00
Dan Williams
e083cd5c63 settings: when checking for system-owned secrets ignore NOT_SAVED
Previously a secret marked NOT_SAVED or NOT_REQUIRED would be
treated as a system secret when checking returned secrets.  That's
incorrect since unsaved or not required secrets aren't stored
by system settings.
2011-05-19 13:14:51 -05:00
David Woodhouse
05a959d1d6 settings: fix VPN secret flag handling in secrets returned from agents
We need to push one more level down into VPN secrets when checking
the secret flags on VPN settings.
2011-05-19 13:11:49 -05:00
Dan Williams
304d0b869b core: openconnect migration hack
Evil hack; but the problem is that before this commit anyone who
migrated connections wouldn't have the right secrets flag set in
their openconnect connections.  Figuring out some way of updating
those connections now is harder and we don't want people to have
to go through the delete-connection-file-change-applet-stamp-rerun
dance.  So we'll live with this for now...
2011-05-18 22:45:24 -05:00
Dan Williams
b6a63ff025 core: allow build-time enable/disable of PolicyKit
When PK is turned off, everything is authorized.
2011-05-18 22:38:39 -05:00
Dan Williams
f79dcb9560 core: consolidate PolicyKit code
Use one global PolkitAuthority object; we only really need to use it
in one place anyway.  So consolidate the code that uses polkit into
nm-manager-auth.c.
2011-05-18 22:20:24 -05:00
Dan Williams
487cd8a301 libnm-util: fix possible crash passing in NULL secret flags 2011-05-18 17:47:03 -05:00
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