Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
5e4761a3a9 core: take over IPv6LL address management if kernel supports it (bgo #734149)
NM keeps interfaces IFF_UP when possible to receive link layer
events like carrier changes.  Unfortunately, the kernel also
uses IFF_UP as a flag to assign an IPv6LL address to the interface,
which results in IPv6 connectivity on the link even if the interface
is not supposed to be activated/connected.

NM sets disable_ipv6=1 to ensure that the kernel does not set up
IPv6LL connectivity on interfaces when they are not supposed to
be active and connected.  Unfortunately, that prevents users from
manually adding IPv6 addresses to the interface, since they expect
previous kernel behavior where IPv6 is enabled whenever the
interface is IFF_UP.

Furthermore, interfaces like PPP and some WWAN devices provide
misleading information to the kernel which causes the kernel to
create the wrong IPv6LL address for the interface.  The IPv6LL
address for these devices is obtained through control channels
instead (IPV6CP for PPP, proprietary protocols for WWAN devices)
and should be used instead of the kernel address.  So we'd like
to suppress kernel IPv6LL address generation on these interfaces
anyway.

This patch makes use of the netlink IFLA_INET6_ADDR_GEN_MODE
attribute to take over assignment of IPv6LL addresses while
keeping the interface IFF_UP, to ensure there is only IPv6
connectivity when the user requests it.

To remain compliant with standards, if a user adds IPv6 addresses
externally, NetworkManager must also immediately add an IPv6LL
address for that interface too.

https://bugzilla.gnome.org/show_bug.cgi?id=734149
2014-09-04 15:11:04 -05:00
Dan Williams
37f11fbdf8 platform: add support for kernel IPv6LL address generation modes
This patch requires both upstream kernel support for
IFLA_INET6_ADDR_GEN_MODE which was merged in this patch:

ipv6: addrconf: implement address generation modes
bc91b0f07ada5535427373a4e2050877bcc12218

and corresponding libnl support, merged in these patches:

veth: add kernel header linux/veth.h for VETH defines
9dc6e6da90016a33929f262bea0187396e1a061b

link: update copy of kernel header include/linux/if_link.h
b51815a9dbd8e45fd2558bbe337fb360ca2fd861

link/inet6: add link IPv6 address generation mode support
558f966782539f6d975da705fd73cea561c9dc83
2014-09-04 15:10:26 -05:00
Dan Winship
22b92a7574 libnm-core: change DCB DBUS_TYPE_G_UINT_ARRAY properties to G_TYPE_ARRAY
Change NMSettingDCB's guint-array properties to G_TYPE_ARRAY, with
annotations indicating the element type.

Since DBUS_TYPE_G_UINT_ARRAY was already represented as a GArray, this
does not require any changes anywhere else.
2014-09-04 09:20:12 -04:00
Dan Winship
c43f88907b libnm-core: change DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES
Change all DBUS_TYPE_G_UCHAR_ARRAY properties to G_TYPE_BYTES, and
update corresponding APIs. Notably, this means they are now refcounted
rather than being copied.

Update the rest of NM for the changes. The daemon still converts SSIDs
to GByteArrays internally, because changing it to use GBytes has lots
of trickle-down effects. It can possibly be changed later.
2014-09-04 09:20:11 -04:00
Dan Winship
3fbabde4c3 libnm-core: replace GByteArray with pointer + length in some APIs
APIs that take arbitrary data should take it in the form of a pointer
and length, not a GByteArray, so that you can use them regardless of
what format you have the data in (GByteArray, GBytes, plain array,
etc).
2014-09-04 09:20:11 -04:00
Dan Winship
9837565789 libnm-core: improve NMSettingIP4Config / NMSettingIP6Config property types
Make the :addresses and :routes properties be GPtrArrays of
NMIP4Address, etc, rather than just reflecting the D-Bus data.

Make the :dns properties be arrays of strings rather than arrays of
binary IP addresses (and update the corresponding APIs as well).
2014-09-04 09:20:11 -04:00
Dan Winship
9ed6bd2be5 libnm-core: change map-of-string properties to G_TYPE_HASH_TABLE
Change all DBUS_TYPE_G_MAP_OF_STRING properties to G_TYPE_HASH_TABLE,
with annotations indicating they are string->string. Not much outside
libnm-core needs to changed for this, since DBUS_TYPE_G_MAP_OF_STRING
was already represented as a hash table.

(One change needed within libnm-core is that we now need to copy the
hash tables in get_property(), or else the caller will receive a
reffed copy of the object's own hash table, which we don't want.)
2014-09-04 09:20:11 -04:00
Dan Winship
6a4127cfa0 libnm-core: change list-of-string and array-of-string properties to G_TYPE_STRV
Change all DBUS_TYPE_G_LIST_OF_STRING and DBUS_TYPE_G_ARRAY_OF_STRING
properties to G_TYPE_STRV, and update everything accordingly.

(This doesn't actually require using
_nm_setting_class_transform_property(); dbus-glib is happy to transform
between 'as' and G_TYPE_STRV.)
2014-09-04 09:20:10 -04:00
Dan Winship
3a54d05098 libnm-core: change all mac-address properties to G_TYPE_STRING
Make all mac-address properties (including NMSettingBluetooth:bdaddr,
NMSettingOlpcMesh:dhcp-anycast-addr, and NMSettingWireless:bssid) be
strings, using _nm_setting_class_transform_property() to handle
translating to/from binary form when dealing with D-Bus.

Update everything accordingly for the change, and also add a test for
transformed setting properties to test-general.
2014-09-04 09:20:10 -04:00
Dan Winship
7d233cc956 core: abstract out the duplicated default-ifname-generating code
NMDeviceBond, NMDeviceBridge, and NMDeviceTeam all used basically the
same code to generate a default interface name. Move it into
nm_utils_complete_generic().
2014-09-04 09:18:44 -04:00
Dan Winship
6217c1e74c libnm-core: drop :interface-name properties on virtual NMSetting types
Remove the virtual :interface-name properties and their getters, and
use property overrides to do backward-compat handling when
serializing/deserializing.

Now when constructing an NMConnection from a hash, if the virtual
property is set and the NMSettingConnection property isn't, then the
override for NMSettingConnection:interface-name will set that property
to the value of the virtual interface-name. And when converting an
NMConnection to a hash, the overrides for the virtual properties will
return the value of NMSettingConnection:interface-name.
2014-09-04 09:18:44 -04:00
Dan Winship
ee3467e531 libnm-core: add nm_connection_is_virtual()
Add a method to determine if a connection applies to a virtual device.

Perhaps eventually the logic should be spread across the NMSetting
classes, but for now it's better off having it in NMConnection than
once in NMManager and once in nmcli.
2014-09-04 09:18:43 -04:00
Dan Winship
ab26964c56 all: stop using virtual interface-name properties
The virtual :interface-name properties (eg,
NMDeviceBond:interface-name) are deprecated in favor of
NMSettingConnection:interface-name, and nm_connection_verify() ensures
that their values are kept in sync. So (a) there is no need to set
those properties when we can just set
NMSettingConnection:interface-name instead, and (b) we can replace any
calls to the setting-specific get_interface_name() methods with
nm_connection_get_interface_name() or
nm_setting_connection_get_interface_name().
2014-09-04 09:18:43 -04:00
Dan Winship
7314256b77 libnm-core: drop nm_{setting,connection}_get_virtual_iface_name()
Since we enforce the fact that bond, bridge, team, and vlan
interface-name properties match NMSettingConnection:interface-name,
nm_connection_get_virtual_iface_name() can be replaced with
nm_connection_get_interface_name() basically everywhere.

The one place this doesn't work is with InfiniBand partitions (where
get_virtual_iface_name() was actually computing the name), but for the
most part we only need to care about the interface names of InfiniBand
partitions in places where we also already need to do some other
InfiniBand-specific handling as well, so we can use an
InfiniBand-specific method
(nm_setting_infiniband_get_virtual_interface_name()) to get it.

(Also, while updating nm_device_get_virtual_device_description(), fix
it to handle InfiniBand partitions too.)
2014-09-04 09:18:43 -04:00
Dan Winship
a5ac95ca4b libnm-core: drop previously-deprecated NMSetting properties
Drop the NMSetting properties that were marked deprecated in
libnm-util in 0.9.10, but use nm_setting_class_add_dbus_property() to
deal with them appropriately when serializing/deserializing.
2014-09-04 09:17:37 -04:00
Dan Winship
773d3f0ab6 libnm-core: rename NMConnection to/from_hash methods
Rename nm_connection_to_hash() to nm_connection_to_dbus(), and
nm_connection_new_from_hash() to nm_connection_new_from_dbus(). In
addition to clarifying that this is specifically the D-Bus
serialization format, these names will also work better in the
GDBus-based future where the serialization format is GVariant, not
GHashTable.

Also, move NMSettingHashFlags to nm-connection.h, and rename it
NMConnectionSerializationFlags.
2014-09-04 09:17:36 -04:00
Dan Williams
968f7958c9 ifcfg-rh: fix testcase to expect error reading iBFT configurations 2014-09-03 09:51:00 -05:00
Dan Winship
1838db9e71 all: remove a bunch of unnecessary dbus/dbus-glib includes 2014-09-03 10:45:24 -04:00
Jiří Klimeš
151645a648 bluetooth: don't crash when switching off bluetooth
Testcase:
- add a bluetooth connection (with auto-activate)
  $ nmcli con add type blue con-name phone bt-type panu addr 00:17:EA:84:E7:41
- make NM go to sleep (close a lid of laptop to suspend)
- switch off hardware wireless button
- resume the computer (open the lid)

Trace (from RHEL 7):
 (NetworkManager:3619): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'NMDeviceBt'
 (NetworkManager:3619): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
 NetworkManager[3619]: <warn> Error connecting with bluez: Timeout was reached
 (NetworkManager:3619): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'NMDevice'
 (NetworkManager:3619): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion 'instance != NULL && instance->g_class != NULL' failed
 Program received signal SIGSEGV, Segmentation fault.
 nm_device_state_changed (device=0x7f8ffe63c7f0, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=
     NM_DEVICE_STATE_REASON_BT_FAILED) at devices/nm-device.c:6685
 6685            g_warn_if_fail (priv->in_state_changed == FALSE);
 Missing separate debuginfos, use: debuginfo-install ModemManager-glib-1.1.0-6.git20130913.el7.x86_64 dbus-glib-0.100-7.el7.x86_64 dbus-libs-1.6.12-8.el7.x86_64 glib2-2.40.0-2.el7.x86_64 glibc-2.17-58.el7.x86_64 gvfs-1.16.4-7.el7.x86_64 libbluray-0.2.3-5.el7.x86_64 libffi-3.0.13-11.el7.x86_64 libgcc-4.8.3-5.el7.x86_64 libgudev1-208-11.el7_0.2.x86_64 libndp-1.2-4.el7.x86_64 libnl3-3.2.21-6.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libsoup-2.46.0-2.el7.x86_64 libuuid-2.23.2-16.el7.x86_64 libxml2-2.9.1-5.el7.x86_64 nspr-4.10.6-2.el7.x86_64 nss-3.16.2-4.el7.x86_64 nss-softokn-3.16.2-2.el7.x86_64 nss-softokn-freebl-3.16.2-2.el7.x86_64 nss-util-3.16.2-2.el7.x86_64 pcre-8.32-13.el7.x86_64 polkit-0.112-5.el7.x86_64 sqlite-3.7.17-4.el7.x86_64 systemd-libs-208-11.el7_0.2.x86_64 teamd-1.12-1.el7.x86_64 xz-libs-5.1.2-8alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
 (gdb) DHCPREQUEST on enp0s25 to 255.255.255.255 port 67 (xid=0x566289d3)
 DHCPACK from 10.34.0.254 (xid=0x566289d3)
 bt
 #0  nm_device_state_changed (device=0x7f8ffe63c7f0, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=
     NM_DEVICE_STATE_REASON_BT_FAILED) at devices/nm-device.c:6685
 #1  0x00007f8fee0847bf in bluez_connect_cb (object=<optimized out>, res=<optimized out>, user_data=<optimized out>)
     at nm-device-bt.c:738
 #2  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe67d8a0) at gsimpleasyncresult.c:763
 #3  0x00007f8fee07ec85 in bluez_connect_cb (dbus_connection=<optimized out>, res=0x7f8ffe67d730, user_data=<optimized out>)
     at nm-bluez-device.c:484
 #4  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe67d730) at gsimpleasyncresult.c:763
 #5  0x00007f8ff944637f in g_dbus_connection_call_done (source=<optimized out>, result=<optimized out>, user_data=0x7f8ffe64a840)
     at gdbusconnection.c:5492
 #6  0x00007f8ff93eb557 in g_simple_async_result_complete (simple=0x7f8ffe66de30) at gsimpleasyncresult.c:763
 #7  0x00007f8ff93eb5b9 in complete_in_idle_cb (data=<optimized out>) at gsimpleasyncresult.c:775
 #8  0x00007f8ff8c3b9ea in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
 #9  0x00007f8ff8c3bd38 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
 #10 0x00007f8ff8c3c00a in g_main_loop_run () from /lib64/libglib-2.0.so.0
 #11 0x00007f8ffcaba9ba in main (argc=1, argv=0x7ffff6b335b8) at main.c:642
 (gdb)
2014-09-02 14:53:47 +02:00
Dan Williams
a175ff090c core: allow connection assumption on pre-configured software devices
In the specific case that triggered this bug, both eth0 and eth0.123
existed and were configured before NM started, and a valid saved connection
existed for eth0.123.  eth0 was ordered before eth0.123 in the Platform's
link list.  When the end of add_devices() was reached for eth0 and
system_create_virtual_devices() was called, NM created an NMDevice for
the pre-existing eth0.123 link due to the saved connection, and
ignored the existing configuration because system_create_virtual_device()
re-calls add_device() with generate_con = FALSE.

Instead, we should allow system_create_virtual_device() to call add_device()
with generate_con = TRUE if the interface existed before NM created it. We
only want to skip connection assumption if the device was actually just
created by NM, in which case it cannot have any configuration to assume.
2014-08-29 18:46:11 -05:00
Dan Williams
af13376e2b core: allow plugin/factory originated devices to assume connections
This didn't previously matter because BT/WWAN/WiFi/ADSL can't easily
assume existing connections due to the external helpers involved, but
when we converted Team support to a plugin we now want to allow this.
2014-08-29 18:46:11 -05:00
Dan Williams
b9d8fe8085 ifcfg-rh: more conversions to g_assert() 2014-08-29 18:46:11 -05:00
Dan Williams
7b714524b9 ifcfg-rh: remove iBFT handling (use the ibft plugin instead) (bgo #734009) (rh #990480)
Now that the ibft plugin handles iBFT data, no reason to do so from the
ifcfg-rh plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=734009
2014-08-29 18:46:11 -05:00
Dan Williams
448254f761 ibft: add settings plugin for reading iBFT configuration (bgo #734009)
Instead of handling iBFT (iSCSI Boot Firmware Table) in the ifcfg-rh plugin,
create a new plugin for it.  This allows all distributions to use iBFT
configuration, and makes both iBFT handling and ifcfg-rh less complicated.

The plugin (like the old ifcfg-rh code) creates read-only connections backed
by the data exported by iscsiadm.  The plugin does not support adding new
connections or modifying existing connections (since the iBFT data is
read-only anyway).  Instead, users should change their iBFT data through
the normal firmware interfaces.

Unmanaged devices can be configured through NetworkManager.conf and the
normal 'keyfile' mechanisms.

(In the future, we'll read this data directly from the kernel's
/sys/firmware/ibft/ethernetX directory instead of iscsiadm, since the
kernel has all the information we need and that's where iscsiadm gets
it from anyway.)

https://bugzilla.gnome.org/show_bug.cgi?id=734009
2014-08-29 18:46:11 -05:00
Dan Williams
a27c7e3721 ifcfg-rh: trivial: remove unused parameter 2014-08-29 18:15:44 -05:00
Dan Williams
cbcca18149 core: complete IPv6 even if RA times out when there are manual/external addresses
Even if we never receive an RA, if there are manually-specified or external
addresses, consider IPv6 to complete successfully.  No reason to fail IPv6
if we have IP configuration already, but RA doesn't respond.  If RA shows
up again, we're still listening for it and will apply the config at that
time.
2014-08-29 16:03:37 -05:00
Dan Williams
c69531041a core: apply manual IPv6 configuration earlier when RA is also used (rh #1101809)
Reporter left SLAAC enabled (because it's default and requires being
explicitly turned off) and added manual IPv6 address.  They expected that
address to be assigned very soon after starting the connection, but it was
not assigned.

This happened because NM waits for RA before assigning any IPv6 configuration,
including the manually specified addresses.  In the reporters case, there was
no IPv6 router on the network, so NM waited indefinitely for a router
advertisement and never applied any IPv6 configuration.

It seems reasonable to apply any IPv6 configuration we have available, when
we have it.  We already apply RA configuration before starting DHCP, and
apply DHCP configuration if/when we get that.
2014-08-29 16:03:37 -05:00
Dan Williams
17e323fd22 core: sync IPv6 pre-commit hook with IPv4 behavior
The IPv4 pre-commit hook was called right before the config was
committed, while the IPv6 one was called before commit in only
one case (from nm_device_activate_ip6_config_commit).  The IPv4
behavior is the intended behavior.

Note that this doesn't have any actual effect yet, since nothing
actually implements the IPv6 pre-commit hook
2014-08-29 16:03:36 -05:00
Dan Williams
7c9d4e8f5a rdisc: add RA wait timeout
Add an advisory timeout when waiting for router advertisements so
we can fail IPv6 addressing attempts when no router advertisement
has been received.
2014-08-29 16:03:36 -05:00
Jiří Klimeš
f6b4ab7d3b settings: fix a crash in emit_updated() accessing invalid pointer
by disconnecting signal handlers in dispose().

Commit 6a19e68a moved nm_connection_clear_secrets() from plugins' finalize() to
NMSettingsConnection's dispose(). But clearing secrets emits "changed" signal
which cause changed_cb() to be called and emit_updated() scheduled. And
emit_updated() was called later after finalize() on released object.

The crash can be invoked by having two keyfile connection files with the same
uuid in them.

Backtrace:
 (NetworkManager:12262): GLib-GObject-WARNING **: attempt to retrieve private data for invalid type 'NMSettingsConnection'
 Program received signal SIGSEGV, Segmentation fault.
 emit_updated (self=0xf38dd0 [NMSettingConnection]) at settings/nm-settings-connection.c:401
 401		NM_SETTINGS_CONNECTION_GET_PRIVATE (self)->updated_idle_id = 0;
 (gdb) bt
 #0  emit_updated (self=0xf38dd0 [NMSettingConnection]) at settings/nm-settings-connection.c:401
 #1  0x0000003c49647825 in g_main_dispatch (context=0x785970) at gmain.c:2539
 #2  g_main_context_dispatch (context=context@entry=0x785970) at gmain.c:3075
 #3  0x0000003c49647b58 in g_main_context_iterate (context=0x785970, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3146
 #4  0x0000003c49647f52 in g_main_loop_run (loop=0x7857c0) at gmain.c:3340
 #5  0x000000000042d4e9 in main (argc=1, argv=0x7fffffffe508) at main.c:679
2014-08-28 09:44:04 +02:00
Geoffrey Thomas
cf10c8de8e supplicant/ifnet: fix spelling of "private_key2_passwd" option
This wpa_supplicant option is not named "private_key_passwd2". Looks
like this regressed in e5ed391f28.

Signed-off-by: Geoffrey Thomas <gthomas@mokafive.com>
2014-08-27 09:20:02 -05:00
Thomas Haller
ed20177d27 core: refactor nm_utils_complete_generic() not to use a dynamic format string
For NMDeviceWifi and NMDeviceWimax, the printf format string for
nm_utils_complete_generic() was created based on ssid/nsp. Since
these input strings are untrusted, this is a serious bug.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-25 16:46:14 +02:00
Thomas Haller
8bb4c54090 libnm-core: fix NMSettingConnection:verify() not to modify interface-name
verify() used to modify interface-name of the base settings. This is
discouraged, because verify() should not touch the connection.

For libnm-core we can change behavior and only modify the connection
in normalize().

Also, be more strict not to verify() sucessfully on invalid
interface-name.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
c9be5a32da keyfile/tests: test reading minimal keyfiles that needs normalization of type and slave-type
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
b8a475ba3f tests: refactor tests to use g_test framework (g_test_add_func)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
78edf6f581 keyfile/tests: add keyfile_read_connection_from_file() utility function
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
54ff670423 keyfile: don't add [connection].type base setting which is done by nm_connection_normalize()
This undoes commit 9f8b7ff51d
but the same functionality is now provided via normalize().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
cf44a15874 keyfile: remove ensure_slave_setting() when reading connection
nm_connection_normalize() can now add the slave setting as needed. Remove
the duplicate functionality.

This undoes commit 664d64e0c0
but the same functionality is now provided via normalize().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
7279e7e150 libnm-core: normalize slave-type and slave-settings of connections
Some NMSettingConnection:slave-type types require a matching slave #NMSetting.
Add normalization of either the 'slave-type' property or the slave-setting.

Also be more strict in NMSettingConnection:verify() to enforce an
existing slave-setting depending on the slave-type.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:31 +02:00
Thomas Haller
686e912b82 ifcfg-rh: remove verify() connection during reading
At the end of reading the connection, reader calls nm_connection_normalize()
to normalize the connection. Normalization inplicitly verifies the
connection.

Doing a verify along the way is not needed and even harmful. Soon further
checks will be added that make verify() fail, but normalize()
can fix the connection. So, while reading, we might actually have
an invalid connection, that will be normalized as last step.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:30 +02:00
Thomas Haller
92d8286660 keyfile: let reader normalize() the connection, not only verify()
The new nm_connection_normalize() function allows to fixup an incomplete connection.
The keyfile reader should call normalize on a connection, so that we can implement
common normalizations there instead of inside the settings plugin.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:30 +02:00
Thomas Haller
7d924d725a keyfile/tests: refactor tests to use nmtst_assert_connection_equals() function
Needed in the next commit when we have to normalize the connection
before comparing.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:30 +02:00
Thomas Haller
5f26a9c11f keyfile: add NMSettingConnection in reader if missing
The recent change c88b832ce9 allows for
missing 'id' and 'uuid' entries. Further make the keyfile reader
more accepting, by creating a missing NMSettingConnection.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:30 +02:00
Thomas Haller
e478d1fb71 all: use _nm_utils_hash_values_to_slist()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:24:30 +02:00
Thomas Haller
8fe1b79012 libnm-core: declare NM_SETTING_COMPARE_FLAG_INFERRABLE flag in "nm-core-internal.h"
As this flag is used by NM-core, move it to nm-core-internal.h
header file.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:22:16 +02:00
Thomas Haller
ef32da01fa all: add nm-core-internal.h header
Add a header file to expose private utility functions from libnm-core
that can be used by NetworkManager (core) and libnm.so. The header
is also used to give privileged access to libnm-core. Since NM links
statically, these functions are not exported and not part of public ABI.

This also removes the NM_UTILS_PRIVATE_CALL() macro and libnm.so no
longer exports nm_utils_get_private().

Before, this functionality was partly declared in nm-utils-private.h.
This was wrong because nm-utils-private.h is for functionality
entirely private to libnm-core.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:22:16 +02:00
Jiří Klimeš
6999a688b0 platform: (trivial) don't shadow link(3) in NMLinuxPlatform
Reported by Jordan Messina

(cherry picked from commit c54e6a95ff0957fb9d5c51505c8c3dd036600ff5)
2014-08-21 11:16:43 +02:00
Dan Williams
32a53f786d trivial: don't shadown link(3) in NMFakePlatform 2014-08-20 14:57:49 -05:00
Dan Williams
e7381662fe trivial: don't shadow rand(3)
Reported by Jordan Messina

(cherry picked from commit 365ca198c0d688e759cd2481d9446ba16f8e78ca)
2014-08-20 14:18:14 -05:00
Thomas Haller
b59a82d82e core: print warning message when skipping invalid device plugin file
https://mail.gnome.org/archives/networkmanager-list/2014-August/msg00042.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-20 19:14:44 +02:00