Commit graph

11340 commits

Author SHA1 Message Date
Thomas Haller
f959cd404d ifcfg-rh: fix memleak in make_ip4_setting()
(cherry picked from commit d1a0229083)
2015-01-29 15:04:23 +01:00
Thomas Haller
d8ced83633 ifcfg-rh: fix memleak in make_ip4_setting()
(cherry picked from commit 9d04d62255)
2015-01-29 15:04:22 +01:00
Thomas Haller
cd5ba675ac ifcfg-rh: fix memleak in devtimeout_from_file()
(cherry picked from commit 9dddb4a918)
2015-01-29 15:04:22 +01:00
Thomas Haller
86382deed4 ifcfg-rh: fix memleak in connection_from_file_full()
(cherry picked from commit 93223112a1)
2015-01-29 15:04:22 +01:00
Thomas Haller
e2470c7d64 auth: fix memleak in _new_unix_process()
(cherry picked from commit 1c10cc51ff)
2015-01-29 15:04:22 +01:00
Thomas Haller
9d9a33a109 core: fix memleak releasing priv->path in NMIP4Config and NMIP6Config
(cherry picked from commit fe5c51726f)
2015-01-29 15:04:22 +01:00
Thomas Haller
4360b09f33 libnm: fix memleak in nm_utils_hwaddr_canonical()
(cherry picked from commit c4e197d064)
2015-01-29 15:04:22 +01:00
Thomas Haller
e0aa016399 core: fix memory leak in nm_properties_changed_signal_add_property()
valgrind complains (rightly):

    ==7702== 15 bytes in 2 blocks are definitely lost in loss record 411 of 6,278
    ==7702==    at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==7702==    by 0x8151E6E: g_malloc (gmem.c:104)
    ==7702==    by 0x816972E: g_strdup (gstrfuncs.c:364)
    ==7702==    by 0x1D6671: nm_properties_changed_signal_add_property (nm-properties-changed-signal.c:235)
    ==7702==    by 0x1AF2D5: nm_dbus_manager_register_exported_type (nm-dbus-manager.c:867)
    ==7702==    by 0x7EE0D3D: g_type_class_ref (gtype.c:2220)
    ==7702==    by 0x7EC9A78: g_object_new_valist (gobject.c:1928)
    ==7702==    by 0x7EC9C10: g_object_new (gobject.c:1559)
    ==7702==    by 0x14A5FC: new_link (nm-device-bridge.c:482)
    ==7702==    by 0x1CF8FD: platform_link_cb (nm-manager.c:2154)
    ==7702==    by 0x988FD8B: ffi_call_unix64 (unix64.S:76)
    ==7702==    by 0x988F6BB: ffi_call (ffi64.c:522)

(cherry picked from commit 8396c58167)
2015-01-29 15:04:22 +01:00
Dan Winship
37701ae6df libnm-core: fix docs typo
(cherry picked from commit 3debf80d82)
2015-01-29 07:01:55 -05:00
Lubomir Rintel
cdf17af657 ip6-config: remove the link-local address on address flush
If it stays after device dispose a connection is assumed.

https://bugzilla.redhat.com/show_bug.cgi?id=1184997
(cherry picked from commit 6771f836ce)
2015-01-28 17:54:31 +01:00
Thomas Haller
da7a47a33e contrib/rpm: add 10-ibft-plugin.conf config file
Taken from rhel-7.1 package

(cherry picked from commit 8eba28b9bd)
2015-01-28 13:24:21 +01:00
Dan Winship
d21c282f40 contrib: fix NetworkManager.spec after the dispatcher script change
(cherry picked from commit 9d3e0cff9f)
2015-01-28 12:19:37 +01:00
Jiří Klimeš
e26c98937f libnm-core: coverity fix
var_deref_op: Dereferencing null pointer "property->param_spec".

(cherry picked from commit 0acdd0e1e3)
2015-01-28 08:59:53 +01:00
Thomas Haller
ca17176223 NEWS: mention missing feature for 1.0
(cherry picked from commit d4b257b613)
2015-01-27 22:01:44 +01:00
Dan Winship
3e1b09b19f dispatcher: fix ifcfg-rh example dispatcher script (rh #1160013)
Routing table entries for a device get flushed when the device is
deactivated, but rules table entries don't, so we have to flush them
by hand.

(cherry picked from commit 8de1bec803)
2015-01-27 13:52:16 -05:00
Thomas Haller
16419a5467 device: schedule queued_ip_config_change() after constructing device
During queued_ip_config_change(), we eventually call update_ip_config()
and ip4_config_merge_and_apply(). These functions read the IP configuration
from platform and setup the private ip4_config instance.

Trigger this initialization after constructing the device to setup
the IP configuration.

Before, for unmanaged devices we would not call ip4_config_merge_and_apply()
until the first platform change event.

Note that in the worst case we do some unnecessary work due to this,
because queued_ip_config_change() must already be robust to be called
at any time.

(cherry picked from commit ddac52a61e)
2015-01-26 18:34:26 +01:00
Thomas Haller
70d7d8a177 default-route: don't return devices without active connection as best_config() or best_device()
Since 0c136c1e2, we also track the default route for devices
without active-connection (unmanaged). They must not be returned
as best_config() or as best_device(), because the caller don't
expect unmanaged devices here.

This also gets closer to the original behavior of get_best_device()
before merging default-route-manager in d4417e3460
where we also would ignore devices depending on the state.

This fixes an assertion when having an interface unmanaged
and activating it externally:

    #0  0x00007ffff6806187 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
    #1  0x00007ffff6807dea in __GI_abort () at abort.c:89
    #2  0x00007ffff6c0aec5 in g_assertion_message (domain=domain@entry=0x5332d5 "NetworkManager", file=file@entry=0x539460 "nm-default-route-manager.c", line=line@entry=1056, func=func@entry=0x539920 <__FUNCTION__.28934> "_ipx_get_best_config", message=message@entry=0x8c9cb0 "assertion failed: (req)") at gtestutils.c:2356
    #3  0x00007ffff6c0af5a in g_assertion_message_expr (domain=domain@entry=0x5332d5 "NetworkManager", file=file@entry=0x539460 "nm-default-route-manager.c", line=line@entry=1056, func=func@entry=0x539920 <__FUNCTION__.28934> "_ipx_get_best_config", expr=expr@entry=0x53132f "req") at gtestutils.c:2371
    #4  0x000000000049a196 in _ipx_get_best_config (self=<optimized out>, ignore_never_default=ignore_never_default@entry=1, out_ip_iface=out_ip_iface@entry=0x7fffffffd310, out_ac=out_ac@entry=0x0, out_device=0x0, out_vpn=0x7fffffffd318, vtable=0x7a0a00 <vtable_ip4>, vtable=0x7a0a00 <vtable_ip4>) at nm-default-route-manager.c:1056
    #5  0x000000000049a3f6 in nm_default_route_manager_ip4_get_best_config (self=<optimized out>, ignore_never_default=ignore_never_default@entry=1, out_ip_iface=out_ip_iface@entry=0x7fffffffd310, out_ac=out_ac@entry=0x0, out_device=out_device@entry=0x0, out_vpn=out_vpn@entry=0x7fffffffd318) at nm-default-route-manager.c:1079
    #6  0x00000000004b7518 in update_ip4_dns (self=0x7ecac0 [NMPolicy], out_vpn=0x7fffffffd318, out_device=0x0, out_ac=0x0, out_ip_iface=0x7fffffffd310, ignore_never_default=1) at nm-policy.c:390
    #7  0x00000000004b7518 in update_ip4_dns (dns_mgr=0x8623a0 [NMDnsManager], policy=0x7ecac0 [NMPolicy]) at nm-policy.c:406
    #8  0x00000000004b99d5 in device_ip4_config_changed (device=0x8844b0 [NMDeviceEthernet], new_config=0x908aa0 [NMIP4Config], old_config=0x908aa0 [NMIP4Config], user_data=0x7ecac0) at nm-policy.c:1260
    #9  0x000000368f405d60 in ffi_call_unix64 () at /lib64/libffi.so.6
    #10 0x000000368f4057d1 in ffi_call () at /lib64/libffi.so.6
    #11 0x00007ffff6ee5b8c in g_cclosure_marshal_generic_va (closure=0x886a40, return_value=0x0, instance=0x8844b0, args_list=<optimized out>, marshal_data=0x0, n_params=2, param_types=0x87d3a0) at gclosure.c:1541
    #12 0x00007ffff6ee5144 in _g_closure_invoke_va (closure=closure@entry=0x886a40, return_value=return_value@entry=0x0, instance=instance@entry=0x8844b0, args=args@entry=0x7fffffffd810, n_params=<optimized out>, param_types=0x87d3a0) at gclosure.c:831
    #13 0x00007ffff6eff900 in g_signal_emit_valist (instance=0x8844b0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd810) at gsignal.c:3201
    #14 0x00007ffff6f0014f in g_signal_emit (instance=instance@entry=0x8844b0, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3348
    #15 0x000000000044a1f4 in nm_device_set_ip4_config (self=self@entry=0x8844b0 [NMDeviceEthernet], new_config=new_config@entry=0x9089a0 [NMIP4Config], default_route_metric=default_route_metric@entry=100, commit=commit@entry=0, reason=reason@entry=0x0) at devices/nm-device.c:5866
    #16 0x000000000044a5af in ip4_config_merge_and_apply (self=self@entry=0x8844b0 [NMDeviceEthernet], config=config@entry=0x0, commit=commit@entry=0, out_reason=out_reason@entry=0x0) at devices/nm-device.c:3037
    #17 0x000000000044b4fd in update_ip_config (self=self@entry=0x8844b0 [NMDeviceEthernet], initial=initial@entry=0) at devices/nm-device.c:6617
    #18 0x000000000044bc39 in queued_ip_config_change (user_data=<optimized out>) at devices/nm-device.c:6688
    #19 0x00007ffff6be4e1b in g_main_context_dispatch (context=0x7ba3a0) at gmain.c:3122
    #20 0x00007ffff6be4e1b in g_main_context_dispatch (context=context@entry=0x7ba3a0) at gmain.c:3737
    #21 0x00007ffff6be51b0 in g_main_context_iterate (context=0x7ba3a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3808
    #22 0x00007ffff6be54d2 in g_main_loop_run (loop=0x7ba460) at gmain.c:4002
    #23 0x000000000043291d in main (argc=1, argv=0x7fffffffdef8) at main.c:442

Fixes: da708059da
(cherry picked from commit aadef137b4)
2015-01-26 18:34:25 +01:00
Piotr Drąg
5d00f4359e po: update Polish (pl) translation (bgo #743500)
https://bugzilla.gnome.org/show_bug.cgi?id=743500
(cherry picked from commit 2d08e701a0)
2015-01-26 12:15:26 +01:00
Thomas Haller
9ffda16a1d build: replace echo -n by printf '%s' in configure.ac
https://bugzilla.gnome.org/show_bug.cgi?id=743480
(cherry picked from commit a6aacde469)
2015-01-25 14:57:01 +01:00
Dan Williams
2e19011a68 vapi: add some missing device and setting types
(cherry picked from commit 091daaa60e)
2015-01-23 15:37:47 -06:00
Dan Winship
4638529b46 team: fix teamd startup code (rh #1184923)
Since 03a5a85d, NMDeviceTeam was trying to use priv->teamd_pid to
decide whether a teamd_dbus_vanished() call indicated "teamd hasn't
been started yet" or "teamd was previously started and has now
exited". But this resulted in a race condition, where at startup, a
device could call g_dbus_watch_name(), then launch teamd (causing
teamd_pid to get set), and then have gdbus report that teamd hasn't
been started yet before the newly-launched teamd managed to grab the
bus name. Since teamd_pid would already be set when
teamd_dbus_vanished() was called, it would decide that this meant
"teamd was previously started and has now exited", so it would call
teamd_cleanup(), killing the just-started teamd process.

Fix this by having teamd_dbus_vanished() check priv->tdc instead,
which doesn't get set until after the first teamd_dbus_appeared()
call.

(cherry picked from commit f0e74622cc)
2015-01-23 10:05:59 -05:00
Lubomir Rintel
293a507fa8 libnm: drop libdbus-glib from pkg-config file
libnm uses GIO DBus library instead.

https://mail.gnome.org/archives/networkmanager-list/2015-January/msg00065.html
(cherry picked from commit 799820f859)
2015-01-22 13:31:45 -06:00
Thomas Haller
b5433097e2 device: adjust default route metric for BRIDGE device type
We forgot to include the BRIDGE, so that bridge
devices got a default priority (route-metric) of 950
Add it between VLAN and MODEM type.

Also return a different metric for UNKNOWN
device types, but these priorities are not
actually expected.

(cherry picked from commit 8dce71be74)
2015-01-22 18:59:06 +01:00
Thomas Haller
95ac7673a8 core/trivial: fix documentation of nm_utils_uuid_generate_from_strings()
(cherry picked from commit 7d2e43a455)
2015-01-22 16:10:34 +01:00
Thomas Haller
f791750cd8 ifcfg-rh/tests: remove test artifact 'route6-Test_Write_Wired_Static'
This left-over file breaks `make distcheck`.

Fixes: 1600ed9c68
(cherry picked from commit ce032e6e14)
2015-01-21 17:46:56 -06:00
Dan Winship
b4ea599c39 bond: merge branch 'jk/numeric-bond-modes-nm-1-0' into nm-1-0 2015-01-21 12:18:28 -05:00
Jiří Klimeš
966ac6a558 ifcfg-rh: add a testcase for numeric bonding mode values in BONDING_OPTS
(cherry picked from commit c743670251)
2015-01-21 12:18:15 -05:00
Jiří Klimeš
ac501672f2 bond: normalize bond mode to string notation (rh #1171009)
Use descriptive string value as preferred bond mode representation.
Numeric modes still verify but with NM_SETTING_VERIFY_NORMALIZABLE,
suggesting a normalization action.

https://bugzilla.redhat.com/show_bug.cgi?id=1171009
(cherry picked from commit 3d1b6bd4d8)
2015-01-21 12:18:15 -05:00
Jiří Klimeš
d13f2ba3ca libnm-core: accept numeric bond modes (bgo #704666) (rh #1133544)
https://bugzilla.gnome.org/show_bug.cgi?id=704666
https://bugzilla.redhat.com/show_bug.cgi?id=1133544
(cherry picked from commit 93438dd092)
2015-01-21 12:18:15 -05:00
Dan Winship
ff174bbad6 utils: add functions for converting string <-> numeric bonding modes
(cherry picked from commit d787f0391b,
except with the prototypes moved from nm-utils.h to
nm-core-internal.h)
2015-01-21 12:18:08 -05:00
Dan Winship
97cd59e980 libnm-core, libnm-util: belatedly update NM_VERSION_CUR_STABLE 2015-01-21 12:10:48 -05:00
Jiří Klimeš
192b25e283 cli: add description for certificate properties in editor (rh #1182575)
(cherry picked from commit 8ed0e50ff1)
2015-01-20 14:37:39 +01:00
Jiří Klimeš
8a8af0a06a core: show better error for software device creation failures (rh #1182923)
https://bugzilla.redhat.com/show_bug.cgi?id=1182923

(cherry picked from commit 564b462dd3)
2015-01-20 14:21:34 +01:00
Thomas Haller
e7a3424c9e libnm-core: fix compile error in set_property_from_dbus() for missing return value
Fixes: 76d9fc9167
(cherry picked from commit 05212419e1)
2015-01-20 14:21:04 +01:00
Dan Winship
713bcf0282 libnm-core: merge branch 'validate-proptype-nm-1-0' into nm-1-0
Backport of f137d49
2015-01-16 09:11:26 -05:00
Dan Winship
f40a69f624 libnm-core: validate property types from D-Bus (rh #1182567)
In _nm_setting_new_from_dbus(), verify that the properties have the
right types, and return an error if not. (In particular, don't crash
if someone tries to assign a GBytes-valued property a non-'ay' value.)

(cherry picked from commit 76d9fc9167)
2015-01-16 09:11:14 -05:00
Dan Winship
25c61dc805 libnm-core: simplify _nm_setting_new_from_dbus()
libnm-util's nm_setting_new_from_hash() needed to call
g_type_class_ref(setting_type) to ensure that the class had been
initialized by the time we fetched its properties. But in libnm-core's
version, we create the setting object before fetching the list of
properties, so we know the class will already have been initialized by
that point.

(cherry picked from commit d80e100179)
2015-01-16 09:11:02 -05:00
Dan Winship
a177f443e0 libnm-core: fix a leak in _nm_setting_new_from_dbus()
(cherry picked from commit bbbbca2778)
2015-01-16 09:10:54 -05:00
Thomas Haller
ecd7227d45 connectivity: fix compile error no WITH_CONCHECK
Fixes: 53f2642c73
(cherry picked from commit 07be0f511d)
2015-01-16 14:18:44 +01:00
Aleksander Morgado
4953610846 platform: avoid storing unknown netlink object types (bgo #742928)
Testing WWAN connections through a Nokia Series 40 phone, addresses of family
AF_PHONET end up triggering an assert() in object_has_ifindex(), just because
object_type_from_nl_object() only handles AF_INET and AF_INET6 address.

In order to avoid this kind of problems, we'll try to make sure that the object
caches kept by NM only store known object types.

(fixup by dcbw to use cached passed to cache_remove_unknown())

https://bugzilla.gnome.org/show_bug.cgi?id=742928

    Connect: ppp0 <--> /dev/ttyACM0
    nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
    NetworkManager[27434]: <info>  (ppp0): new Generic device (driver: 'unknown' ifindex: 12)
    NetworkManager[27434]: <info>  (ppp0): exported as /org/freedesktop/NetworkManager/Devices/4
    [Thread 0x7ffff1ecf700 (LWP 27439) exited]
    NetworkManager[27434]: <info>  (ttyACM0): device state change: ip-config -> deactivating (reason 'user-requested') [70 110 39]
    Terminating on signal 15
    nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate'
    **
    NetworkManager:ERROR:platform/nm-linux-platform.c:1534:object_has_ifindex: code should not be reached

    Program received signal SIGABRT, Aborted.
    0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6
    (gdb) bt
    #0  0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6
    #1  0x00007ffff4693e6a in abort () from /usr/lib/libc.so.6
    #2  0x00007ffff4c8d7f5 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
    #3  0x00007ffff4c8d88a in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
    #4  0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534
    #5  0x0000000000472bec in check_cache_items (platform=0x7fe8a0, cache=0x7fda30, ifindex=12) at platform/nm-linux-platform.c:1549
    #6  0x0000000000472de3 in announce_object (platform=0x7fe8a0, object=0x8a8c30, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL) at platform/nm-linux-platform.c:1617
    #7  0x0000000000473dd2 in event_notification (msg=0x8a7970, user_data=0x7fe8a0) at platform/nm-linux-platform.c:1992
    #8  0x00007ffff5ee14de in nl_recvmsgs_report () from /usr/lib/libnl-3.so.200
    #9  0x00007ffff5ee1849 in nl_recvmsgs () from /usr/lib/libnl-3.so.200
    #10 0x00000000004794df in event_handler (channel=0x7fc930, io_condition=G_IO_IN, user_data=0x7fe8a0) at platform/nm-linux-platform.c:4152
    #11 0x00007ffff4c6791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    #12 0x00007ffff4c67cf8 in ?? () from /usr/lib/libglib-2.0.so.0
    #13 0x00007ffff4c68022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    #14 0x00000000004477ee in main (argc=1, argv=0x7fffffffeaa8) at main.c:447
    (gdb) fr 4
    #4  0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534
    1534                    g_assert_not_reached ();

(cherry picked from commit bf7865e859)
2015-01-15 11:15:58 -06:00
Dan Williams
45c7adb309 platform: don't read past end of address array (bgo #742937)
The address might be zero-size, and therefore nl_addr_get_binary_addr()
returns a pointer to a zero-size array.  We don't want to read past the
end of that array.  Since zero-size addresses really mean an address
of all zeros, just make that happen.

As an additional optimization, if the prefix length is zero, the whole
address is host bits and should be cleared.

==30286== Invalid read of size 4
==30286==    at 0x478090: clear_host_address (nm-linux-platform.c:3786)
==30286==    by 0x4784D4: route_search_cache (nm-linux-platform.c:3883)
==30286==    by 0x4785A1: refresh_route (nm-linux-platform.c:3901)
==30286==    by 0x4787B6: ip4_route_delete (nm-linux-platform.c:3978)
==30286==    by 0x47F674: nm_platform_ip4_route_delete (nm-platform.c:1980)
==30286==    by 0x4B279D: _v4_platform_route_delete_default (nm-default-route-manager.c:1122)
==30286==    by 0x4AEF03: _platform_route_sync_flush (nm-default-route-manager.c:320)
==30286==    by 0x4B043E: _resync_all (nm-default-route-manager.c:574)
==30286==    by 0x4B0CA7: _entry_at_idx_remove (nm-default-route-manager.c:631)
==30286==    by 0x4B1A66: _ipx_update_default_route (nm-default-route-manager.c:806)
==30286==    by 0x4B1A9C: nm_default_route_manager_ip4_update_default_route (nm-default-route-manager.c:813)
==30286==    by 0x45C3BC: _cleanup_generic_post (nm-device.c:7143)
==30286==  Address 0xee33514 is 0 bytes after a block of size 20 alloc'd
==30286==    at 0x4C2C080: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30286==    by 0x6B2B0B1: nl_addr_alloc (in /usr/lib/libnl-3.so.200.20.0)
==30286==    by 0x6B2B0E3: nl_addr_build (in /usr/lib/libnl-3.so.200.20.0)
==30286==    by 0x6B2B181: nl_addr_clone (in /usr/lib/libnl-3.so.200.20.0)
==30286==    by 0x66DB0D7: ??? (in /usr/lib/libnl-route-3.so.200.20.0)
==30286==    by 0x6B33CE6: nl_object_clone (in /usr/lib/libnl-3.so.200.20.0)
==30286==    by 0x6B2D303: nl_cache_add (in /usr/lib/libnl-3.so.200.20.0)
==30286==    by 0x472E55: refresh_object (nm-linux-platform.c:1735)
==30286==    by 0x473137: add_object (nm-linux-platform.c:1795)
==30286==    by 0x478373: ip4_route_add (nm-linux-platform.c:3846)
==30286==    by 0x47F375: nm_platform_ip4_route_add (nm-platform.c:1939)
==30286==    by 0x4AEC06: _platform_route_sync_add (nm-default-route-manager.c:254)

https://bugzilla.gnome.org/show_bug.cgi?id=742937
(cherry picked from commit d2871089a8)
2015-01-15 11:09:29 -06:00
Dan Winship
b3b06e23cb connectivity: merge branch 'connectivity-nm-1-0' into nm-1-0
Backported from 5828a4b
2015-01-15 10:26:25 -05:00
Dan Winship
3d49585b37 connectivity: avoid redundant connectivity checks
Don't start an automatic connectivity check right when NMManager tells
us we're online; only do it if the manager doesn't request an explicit
connectivity check immediately afterward.

(cherry picked from commit 66b8f2b7a0)
2015-01-15 10:25:57 -05:00
Dan Winship
57249a2d05 connectivity: simplify redundant code
Merge the two nm_connectivity_set_online() calls into one, after
tweaking NMConnectivity to always update its internal state before
alerting callers to the new state.

(cherry picked from commit 0997c4b245)
2015-01-15 10:25:49 -05:00
Dan Winship
e042bb09a5 connectivity: fix manager state during connectivity check (bgo #742823)
When a connection has finished activating, but we don't know yet that
we have full connectivity, then find_best_device_state() should return
CONNECTED_SITE, not CONNECTING. Fixes a bug where the manager state
would repeatedly switch between those two states.

(cherry picked from commit 5e182d5577)
2015-01-15 10:25:34 -05:00
Dan Winship
0a22ce64a6 connectivity: improve debug logging
nm-connectivity was logging both "started" and "finished" for periodic
connectivity checks, but was only logging "finished" for manual ones,
which made the logs look weird. Fix it to log both periodic and manual
starts, and differentiate them.

Also add some additional logging to indicate when set_online() is
called, and when :state changes.

(cherry picked from commit 53f2642c73)
2015-01-15 10:25:29 -05:00
Jiří Klimeš
29e6b7628d ifcfg-rh: update test files not to use obsolete GATEWAY<n> variables
But add a dedicated test reading GATEWAY1 to ensure we are still backwards
compatible.
(cherry picked from commit 233498e0a4)
2015-01-15 13:24:18 +01:00
Jiří Klimeš
ffdbf5ab0f man: add description of BOOTPROTO to nm-settings-ifcfg-rh manpage
(cherry picked from commit a3c52d7a33)
2015-01-15 13:24:18 +01:00
Jiří Klimeš
cc0f92db13 ifcfg-rh: read custom IP address for shared connections (rh #1174632)
Custom IP ranges for shared connection were implemeted in bgo #6759732
(commit 32a001f526). The first IP address
is used and a range is calculated.
However, the commit missed to update ifcfg-rh plugin to read the address.

Test case:
* use ifcfg-rh plugin for NetworkManager
$ nmcli con add type eth con-name shared-ip ifname eth0
$ nmcli con mod shared-ip ipv4.addresses 9.8.7.6/24 ipv4.method shared
$ nmcli con show shared-ip
$ nmcli con show shared-ip  <--- ip address 9.8.7.6 was missing

https://bugzilla.redhat.com/show_bug.cgi?id=1174632
(cherry picked from commit c8fe3bbabc)
2015-01-15 13:24:18 +01:00
Dan Winship
f8551df8ed ifcfg-rh: merge branch 'policy-based-routing-nm-1-0' into nm-1-0
Backport of danw/policy-based-routing-rh1160013
2015-01-14 11:35:17 -05:00