Commit Graph

7740 Commits

Author SHA1 Message Date
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
Dan Williams
bb8e9a0b18 api: add "Uuid" property to ActiveConnection interface
A convenience so that clients which might key certain operations off
which connections are active (checking work mail only when on VPN for
example) can more easily get which connections are active.  This would
allow those apps to store the UUID (which they would already be doing)
and not have to create a Connection proxy and then get the connection
properties just to retrieve the UUID of the connection.  Instead they
can now get it from GetAll of the ActiveConnection object, which they
would already be doing.
2011-04-22 12:29:07 -05:00
Jiří Klimeš
5f627a52e5 cli: fix 'nmcli nm' producing critical assertion when NM is not running 2011-04-21 04:45:57 -04:00
Eckhart Wörner
ff0ab192b9 examples: add another Qt example for listing connections 2011-04-20 19:49:41 -05:00
Eckhart Wörner
f8aa9f38da examples: add some Qt examples and build infrastructure 2011-04-20 19:48:32 -05:00
Dan Williams
d98f3f226a examples: move glib examples to a subdir 2011-04-20 19:25:50 -05:00
Dan Williams
3b0916d6f6 examples: rename another example 2011-04-20 19:15:33 -05:00
Dan Williams
4812fef794 examples: rename an example 2011-04-20 19:14:03 -05:00
Jiří Klimeš
e30287aa84 ifcfg-rh: fix emitting signal for unmanaged specs when removing connection (rh #698202)
The signal was emitted in case the removed connection was managed instead of
for unmanaged connection. Thus the signal had no effect.
That caused incorrect behaviour in case of changing NM_CONTROLLED=no to yes.
That didn't enable the device; only after the file was changed for the second time.
2011-04-20 12:26:20 -04:00
Dan Williams
258912524e ifcfg-rh: fix writing out WPA connection which is changed to open (rh #695604)
We need to remember to clear out keys that aren't getting used since
we're not rewriting the whole ifcfg file.
2011-04-19 15:42:08 -05:00
Dan Williams
aeb02e457a api: clarify meaning of 'hints' property in Agent interface
At some point we'll be passing other info like whether we need
the 802.1x identity too, or unknown CA certificate data for the
Agent to accept, etc.  Basically state that instead of only
hints from the setting, we can pass other stuff as well.
2011-04-19 12:57:49 -05:00
Dan Williams
2e33be3385 ppp: be more paranoid about cleaning PPP manager up
Make sure the dispose won't run twice for the same code and
make sure we never schedule a handler for monitor_cb() more
than once, though it's really hard to see how that could ever
happen anyway.

Another attempt to blindly fix lp:752143
2011-04-19 12:11:58 -05:00
Dan Williams
6d9c4c64b4 modem: ensure PPP manager is always cleaned up
While this should never happen while the PPP manager is alive, modems
can switch their IP method while alive, since the net port is sometimes
discovered after the serial ports have been.  This happens for some
devices that have separate drivers for the net and serial sides, like
ZTE Icera-based devices (cdc-ether and cdc-acm) and newer Sierra
devices (sierra and sierra-net).  Just be paranoid here and ensure
that the PPP manager gets cleaned up.

Partial attempt at fixing lp:752143
2011-04-19 12:01:24 -05:00
Dan Williams
ee3d29107f modem: remove dead code 2011-04-19 11:58:47 -05:00
Dan Williams
8b445c0872 policy: don't recheck auto-activation when device is UNMANAGED or UNAVAILABLE
Pointless, since we're not going to activate it anyway when it's
in one of those states.
2011-04-19 00:31:53 -05:00
Dan Williams
1eae713a63 policy: clarify device auto-activation code
Instead of having new/delete code sprinkled around, consolidate it.
2011-04-19 00:26:37 -05:00
Dan Williams
b946cbb3b8 settings: simplify some code 2011-04-19 00:26:07 -05:00
Dan Williams
6cbaf8a7ef settings: fix refcount mismatch (bgo #647066)
The default wired connection should own a reference to the device
it's made for, but that got dropped in
78df8c49a1, which used to use a
set_property handler with g_value_dup_object() which obviously
increments the reference count.  But that ref got dropped when
the object initialization was simplified.
2011-04-19 00:23:43 -05:00
Dan Williams
a234c6b80c trivial: remove some dead code 2011-04-19 00:22:46 -05:00
Dan Williams
834315eb95 dns: write usable resolv.conf on shutdown if DNS plugins are used
If any ethernet devices were left up (because we can assume control
over them seamlessly when NM starts up again) make sure we write
out a usable resolv.conf for the device on shutdown, otherwise the
users networking is broken with an empty resolv.conf.  This only
happened when DNS plugins were active, in which case the user
would be left with a localhost-pointing resolv.conf but no
local caching nameserver running since NM shut it down when NM
terminated.
2011-04-18 12:41:16 -05:00
Dan Williams
c91cda8364 wifi: use AP flag types consistently
We've got types for this stuff in NetworkManager.h, let's use them.
2011-04-15 12:24:14 -05:00
Dan Williams
688da0fe4f core: better fix for ignoring return value of write(2)
Casting to (void) still doesn't do it, so just assign it to
something and ignore it, in conjunction with
-Wno-unused-but-set-variable
2011-04-14 17:10:05 -05:00
Dan Williams
f7428864ae core: fix ignoring return value of write(2) 2011-04-14 17:09:54 -05:00