Commit Graph

7740 Commits

Author SHA1 Message Date
Alfredo Matos
638d3beb01 libnl: Use compat return for nl_route_add() 2011-08-16 17:08:57 -05:00
Alfredo Matos
2e32003fd2 libnl3: Fix ESRCH return types
ESRCH becomes NLE_OBJ_NOTFOUND. Includes workaround for libnl
  aliased return value where ESRCH is being converted to a generic
  unspecified error by libnl [1].

  [1] http://git.kernel.org/?p=libs/netlink/libnl.git;a=commit;h=7e9d5f
2011-08-16 16:58:19 -05:00
Alfredo Matos
790c16c9f2 libnl3: Add ESRCH to compat error translation 2011-08-16 16:48:30 -05:00
Dan Williams
7addf3009a Merge remote-tracking branch 'origin/master' into libnl3 2011-08-16 16:45:41 -05:00
Daniel Gnoutcheff
f14d8b18ee modem: fix race with nm_modem_set_mm_enabled
Once we've sent a method call over DBus requesting that the modem be
disabled, we should assume that the modem is disabled unless we hear
otherwise.  Otherwise, code that checks the modem state immediately
after it gets disabled might think that it's enabled when it almost
certainly is not.
2011-08-16 16:37:01 -05:00
Daniel Gnoutcheff
ac27e33f0c policy: don't autoconnect disabled modems
Normally, a device disabled via nm_device_interface_set_enabled() will
shift into the UNAVAILABLE state.  Modems, however, don't do that.
Rather, they pretend that they are in the DISCONNECTED state, presumably
to make it easier to re-enable them.  To avoid accidentally re-enabling
and autoconnecting a disabled modem, we need to explicitly make
nm_device_interface_get_enabled() == true a prerequisite for
autoconnecting.
2011-08-16 16:34:21 -05:00
Dan Williams
2b2404bbef settings: preserve agent secrets the right way
What we want to do here is keep separate caches of system and
agent secrets.  For system secrets, we cache them because NM
periodically clears secrets using nm_connection_clear_secrets() to
ensure they don't stay around in memory, and that transient secrets
get requested again when they are needed.  For agent secrets, we
only want them during activation, but a connection read from disk
will not include agent secrets becuase by definition they aren't
stored in system settings along with the connection.  Thus we need
to keep the agent/transient secrets somewhere for the duration of
the activation to ensure they don't get deleted.

This removes the copy-back hack in update_auth_cb() which copied
agent/transient secrets back into the connection over top of the
transient secrets that had been copied back in
nm_settings_connection_replace_settings().  No reason to copy
them twice if we keep an agent/transient secrets hash and do
the right thing with it.
2011-08-16 16:19:23 -05:00
Dan Williams
e2d88f59e6 settings: preserve agent secrets over Update operation
The core problem was that the Update would trigger a write to
disk to save the connection's new settings, which called
nm_settings_connection_replace_settings().  Which saved existing
transient (agent/unsaved) secrets, replaced settings with the
new ones from Update(), then copied back the old transient
secrets.  This was to ensure that changes triggered from getting
agent secrets during activation (which might write the connection
out to disk if new system secrets were provided, which triggered
an inotify read-back of the connection, which blew away the
transient secrets just returned from the agent) didn't blow away
transient secrets.  Unfortunately that fix was too general.

As a quick hack for now, copy the new secrets and re-apply them
after nm_connection_replace_settings() has run.  We'll do the
actual fix later, but it's more involved and needs more testing
so we don't want to apply it this close to release.
2011-08-16 15:48:38 -05:00
Dan Williams
4d635844ec cli: remove unused libraries from the makefile
Nothing in cli uses the marshalller stuff.
2011-08-12 11:05:08 -05:00
Dan Williams
0cb27772f3 docs: update VPN setting 'user-name' property documentation
Lamarque wanted clarification about how it's supposed to be used.
2011-08-12 10:23:25 -05:00
Dan Williams
6c901ab040 api: update version based on configure version
Instead of manually which is error-prone.
2011-08-06 11:19:33 +02:00
Dan Williams
310880a104 api: fix up node names
Not sure if it really makes a difference, but...
2011-08-06 10:46:21 +02:00
Dan Williams
bf89da140c examples: fix up active connection example 2011-08-06 10:44:50 +02:00
Dan Williams
c957fdfb52 examples: make some examples executable 2011-08-05 15:55:51 +02:00
Dan Williams
dab37276d2 examples: new example for printing active connection list 2011-08-05 15:55:14 +02:00
Dan Williams
f1a8227436 nm-tool: show WiMAX info when available
libnm-glib will always be built with WiMAX enabled so we might as well
show it.  It's only NM itself that gets built with/without WiMAX
support.
2011-08-04 14:22:15 -05:00
Jiří Klimeš
9a112d8eeb man: updated man pages 2011-08-02 15:25:40 +02:00
Jiří Klimeš
adc7ec170d ifcfg-rh: make NM_CONTROLLED changes function properly (rh #727501)
Changing NM_CONTROLED from "no" to "yes" worked just the first time.
Fix that by storing unmanaged spec when interface becomes unmanaged
and adjust condition identifying "no-change" updates to the ifcfg
file.
2011-08-02 12:18:52 +02:00
Jiří Klimeš
312c7c952c ifcfg-rh: emit "updated" signal when connection file is changed (rh #727501)
Chain up to parent's commit_changes() even if in-memory and on-disk data are the
same; they are the same when another process changes the on-disk file. Just make
sure not to write out the data needlessly when same.

This fixes a regression caused by 9cba854fa0.
It exhibits e.g. by not auto-activating connection when ONBOOT is changed from
"no" to "yes". Connection "updated" signal was not emitted and listeners like
NMPolicy was not prodded.
2011-08-02 12:18:43 +02:00
Dan Williams
76ecc09989 core: don't warn if loopback address already exists 2011-07-30 16:53:42 -05:00
Dan Williams
7c06436822 Merge remote-tracking branch 'origin/master' into libnl3 2011-07-30 16:48:46 -05:00
Dan Williams
b562839df8 core: misc style fixes to libnl compat code 2011-07-30 15:47:39 -05:00
Alfredo Matos
daeb181fa2 core: add libnl-3 API compatibility 2011-07-30 15:47:33 -05:00
Alfredo Matos
a6c6556831 core: add libnl-2 support with libnl-1 compatibility 2011-07-30 15:47:26 -05:00
Daniel Gnoutcheff
1a98391dc4 supplicant: fix DBus signal signatures
The DBus signatures registered (via dbus_g_proxy_add_signal) for the
fi.w1.wpa_supplicant.Interface.{BSSAdded,ScanDone} signals were
incorrect.  That prevented us from receiving wifi ap scan results, at
least in the case where wpa_supplicant has DBus introspection disabled.
2011-07-29 16:34:03 -05:00
Seongho Cho
54f41031c4 po: updated Korean translation (bgo #655332) 2011-07-28 13:59:23 -05:00
Krzesimir Nowak
c2fffd76d2 build: put test source code into AC_LANG_PROGRAM (bgo #655225)
This change silences autotools warnings about source code not
being inside AC_LANG_SOURCE in AC_LANG_CONFTEST.
2011-07-28 13:53:36 -05:00
Dan Williams
f742b06304 wifi: handle a few more possible D-Bus activation errors
There's two possibilities for errors from D-Bus when trying to
activate the supplicant; either we ignore the error and wait
for the supplicant to restart or be started, or it's a hard
error and we can't continue without risking worse behavior (ie
out of memory, supplicant spawns but exits immediately, etc).
This adds a few more harmless errors to the first category
which can happen if the supplicant's .service file exists
but the supplicant does not, in which case we just wait for
it to magically show up later.
2011-07-28 09:54:06 -05:00
Dan Williams
73ddc1e307 core: move route creation to nm-netlink-utils.c 2011-07-22 18:10:28 -05:00
Dan Williams
11c2824ef1 core: remove dead libnl code 2011-07-22 18:09:37 -05:00
Dan Williams
abb89a7d2a core: move route iteration to nm-netlink-utils.c 2011-07-22 18:09:32 -05:00
Dan Williams
7461e33ce1 core: move route logging to nm-netlink-utils.c 2011-07-22 16:17:10 -05:00
Dan Williams
8b075fcdf2 core: move route deletion to nm-netlink-utils.c 2011-07-22 16:12:44 -05:00
Dan Williams
3a86b5ae34 core: move address checking functionality into separate file
Start to consolidate netlink stuff so we can eventually keep all
the API changes for libnl1 vs. libnl3 in fewer places.
2011-07-22 15:28:35 -05:00
Dan Williams
2fabdbff15 core: finish conversion of nm-system functions to ifindex not iface name 2011-07-22 14:24:18 -05:00
Dan Williams
efb5735ad1 core: more conversion to ifindex instead of iface 2011-07-22 14:09:16 -05:00
Dan Williams
c742cc83fd core: convert up/down check to netlink and use interface index not iface 2011-07-22 13:49:49 -05:00
Dan Williams
d2d1f2e9e0 core: use interface indexes more 2011-07-22 13:37:29 -05:00
Dan Williams
88cd34feef core: remove unused includes 2011-07-22 12:50:54 -05:00
Mathieu Trudel-Lapierre
36db194ae9 libnm-util: default to allowing IPv6 connections to fail
Allow IPv6 connections to fail by changing the default value of the may-fail
property for ipv6 settings to TRUE.

This makes sure connections created manually using nm-connection-editor
will default to having the "Require ..." checkbox unchecked; in other words,
IPv6 timing out will still allow the interface to be configured if
IPv4 succeeds.
2011-07-20 23:56:48 -05:00
Dan Williams
9cdc5021ab keyfile: fix integer list SSID parsing after 30c41a4b80
The regex was capturing integers larger than 3 digits, which aren't
valid SSID integer list items because each byte of the SSID cannot be
larger than 255.  Add an explicit testcase for intlist SSIDs too.
The previous regex was causing a testcase failure with an SSID of
'1337' which it was interpreting as a single element intlist, but
should have been interpreted as a string since it's clear > 255.
2011-07-20 17:44:14 -05:00
Dan Williams
5fb8efbb19 docs: another trivial doc fix 2011-07-19 12:27:44 -05:00
Dan Williams
809e791f02 docs: trivial doc fix 2011-07-19 12:22:08 -05:00
Dan Williams
50df7397a5 docs: document the VPN setting 2011-07-19 12:06:47 -05:00
Dan Williams
2a020de944 docs: document PPP setting 2011-07-19 11:34:11 -05:00
Dan Williams
86854167d6 libnm-util: add some missing GObject introspection annotations 2011-07-19 11:14:01 -05:00
Dan Williams
2c401887aa docs: document the PPPoE setting 2011-07-19 11:08:38 -05:00
Dan Williams
d45e9cb062 libnm-util: rename symbol to fix export check
The export check looks for symbols that begin with "nm_" (except
for GObject class stuff) which indicate that the symbol should be
exported.  If the symbols is 'l' (local) as reported by objdump
that probably means we forgot to add it to the .ver file and it
really should be exported.  nm_gvalue_dup() shouldn't be exported
though, so rename it such that it's obviously internal.
2011-07-19 09:56:46 -05:00
Dan Williams
ba390d2430 ifcfg-rh: add testcase for PEAP anonymous identity (rh #708436) 2011-07-18 22:40:45 -05:00
Jiří Klimeš
3c0bf572c4 ifcfg-rh: read IEEE_8021X_ANON_IDENTITY for PEAP too (rh #708436) 2011-07-15 11:28:27 +02:00