Commit Graph

15047 Commits

Author SHA1 Message Date
Thomas Haller
c469e81f96 core/test: move src/tests/test-general over to nm-test-utils.h (nmtst)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-10 13:27:12 +02:00
Thomas Haller
362c4fe188 nmtst: ensure call to nm_utils_get_monotonic_timestamp_s() in nmtst_init()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-10 13:27:12 +02:00
Thomas Haller
734203e12e libnm-glib/tests: remove waiting time for initializing NMClient
This waiting time significantly increases the runtime of the tests.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-08 19:01:01 +02:00
Thomas Haller
97c7cc8b94 build: unset G_DEBUG variable before calling vapigen
Defining G_DEBUG=fatal-warnings is useful for debugging, but it causes
the build to fail due to asserts during vapigen.

Unset G_DEBUG before calling vapigen.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-08 16:26:14 +02:00
Dan Winship
da25a788fa trivial: add a missing word to documentation 2014-07-07 14:04:51 -04:00
Thomas Haller
40a3e20006 contrib/rpm: add --quick argument to build_clean.sh script
Before, build_clean.sh always required building all NetworkManager
and doing another `make distcheck` before calling rpmbuild.

That is still a good idea, to ensure that we get a proper build.
For some quick testing however, lets speed this up with a new
--dist argument that only calls `make dist`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 19:59:08 +02:00
Thomas Haller
d2be2ac78d contrib/rpm: update spec file to make ppp_version dependent on fedora version
Fedora 21 (rawhide) needs ppp version 2.4.6.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 13:44:44 +02:00
Thomas Haller
63070fff02 build: call generate-setting-docs.py directly instead of through strace
This was added for debugging, but is no longer necessary.
Also, strace might not be installed on any system so don't depend on it.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 13:43:59 +02:00
Thomas Haller
3cfd8b8eec contrib/rpm: add new package NetworkManager-config-connectivity-fedora
Provides config file 20-connectivity-fedora.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-04 12:25:51 +02:00
Dan Williams
8c113e4fc8 bluez: ignore child BNEP interfaces
The interface is owned by the parent NMDeviceBt and is not independently
usable.  If not ignored, NM tries to assume a connection on the bnep
interface and messes the Bluetooth connection up.
2014-07-03 18:50:57 -05:00
Dan Williams
275eea195d bluez: suppress warning when already disconnected 2014-07-03 18:50:50 -05:00
Dan Williams
a949c38d8e bluez: handle Bluez4 PropertyChanged events
The addition of Bluez5 support mistakenly broke support for Bluez4 property
change events.  Bluez4 uses a custom D-Bus interface that we must explicitly
handle.

This caused NM to ignore BT devices immediately after pairing, since the UUIDs
only show up through a custom Bluez4 PropertyChanged even when pairing is
complete.  Only then do we finally know priv->capabilities, and only then is
the NMBluezDevice usable.
2014-07-03 18:50:41 -05:00
Dan Williams
3ee9c3be57 ifcfg-rh: fix reading 802.1x phase2 EAP-GTC method 2014-07-03 14:05:04 -05:00
Thomas Haller
bbdae859f6 keyfile: avoid assertion reading keyfile without connection.type property
Avoids the following warning:
  (NetworkManager:26113): libnm-util-CRITICAL **: nm_connection_get_setting_by_name: assertion 'name != NULL' failed

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-03 14:00:37 +02:00
Dan Winship
ebeaeaed4d core: make veth devices default-unmanaged for now
We only want to treat a veth device as ethernet if (a) NM is running
inside a container, and (b) the veth in question is the "inside" end
of the veth, not the outside. Unfortunately, we don't have good
heuristics for this at the moment, so just ignore veths for now.

https://bugzilla.gnome.org/show_bug.cgi?id=731014
2014-07-02 14:58:53 -05:00
Dan Williams
6cb6d39725 libnm-util: merge nm-util-private and nm-utils-private
No reason to have two differently named files for the
same general purpose.
2014-07-02 13:33:58 -05:00
Thomas Haller
62dd70e1d1 core: use singleton nm_firewall_manager_get() throughout without taking additional ref
No need to keep references of the singleton and take an additional ref
when accessing nm_firewall_manager_get().
Especially, since the firewall manager instance was nowhere passed in from
externally, it doesn't even sense for some vague testing purporse. Not to
mention, that there are no tests that actually inject a firewall manager stub.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-02 15:27:32 +02:00
Thomas Haller
e343c45ebb supplicant: fix crash passing invalid parameter to AddBlob when adding network
The DBUS method 'AddBlob' expects a data argument of type 'ay'.
Instead we passed the hash table 'blobs'.

This must be broken for a long time and surprisingly stayed unnoticed.

https://mail.gnome.org/archives/networkmanager-list/2014-July/msg00001.html

Fixes: fb6cde508c
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-02 13:08:23 +02:00
Thomas Haller
0ce2d2618c core: remove unused @state variable from nm_device_activate_schedule_stage3_ip_config_start()
Fixes: 5affa446aa
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-07-02 13:08:23 +02:00
Dan Williams
ca2e2a7ec8 docs: ignore a private header 2014-07-01 15:47:59 -05:00
Dan Williams
2428401f5e docs: fix multi-line Since notation 2014-07-01 15:47:54 -05:00
Jiří Klimeš
4dcfdec347 device: test dhcp[46]_config when getting properties, not dhcp[46]_client
An assertion in nm_dhcp4_config_get_dbus_path() has been actually fixed
by 3d6936b2cc (hopefully for all cases).
But still I think we should check _config here instead of _client.
2014-07-01 12:56:52 +02:00
Thomas Haller
392d4e4831 merge branch 'th/rh979425_set_virtual_iface_name'
https://bugzilla.redhat.com/show_bug.cgi?id=979425
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:43:37 +02:00
Thomas Haller
f600f31289 core: remove nm_utils_normalize_connection function
This functionality is now provided by nm_connection_normalize().

Contrary to nm_utils_normalize_connection(), nm_connection_normalize()
is in libnm-util and available to clients as well.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:46 +02:00
Thomas Haller
29d538239f libnm-util: normalize IP settings in connection
This is the same behaviour as nm_utils_normalize_connection(),
which will soon be removed in favor of nm_connection_normalize().

This takes care, that normal connections always have an IP4 and IP6 setting,
and that slave connections never have it.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:46 +02:00
Thomas Haller
794ed1c9ef libnm-util: validate master/slave-type property in NMSettingConnection::verify()
- Before, when setting the slave-type to an invalid type, the setting
  was silently accepted. Now verification fails with "Unknown slave type '%s'"

- Before, the @master property was not checked. So you could have a @slave-type,
  without having @master set. And similarly, you could have @master, but
  no @slave-type. Fix both issues.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:46 +02:00
Thomas Haller
2deaa5397a libnm-util: normalize virtual_iface_name in NMSettings
Some type-specific NMSetting implementations (bond, bridge, team, vlan)
have their own 'interface-name' property. This property will be
deprecated in favour of 'interface-name' in NMSettingConnection.

Change verify() and normalize() to check that the redundant
values match and repair/normalize the properties.

Force the virtual interface name of the type-specific setting to be
equal to NMSettingConnection:interface_name. This way, the depreacted
field stays valid and backward compatible.

NMSettingInfiniband is special, because it does not have a backing
property for the interface name, although it implements
get_virtual_iface_name(). To account for this, some special handling
is needed in order not to change the behaviour of get_virtual_iface_name().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:46 +02:00
Thomas Haller
de5656a570 libnm-util: add function nm_connection_normalize
This function behaves like verify(), but it also performs some
normalization/fixing of inconsistent connections.

Contrary to verify(), this function might modify the settings.
This will be mainly used, to repair connections from older versions
and to fix deprecated options.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:46 +02:00
Thomas Haller
542f1fe3c9 test: nm_connection_verify() sets the interface-name to virtual_iface_name.
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:16 +02:00
Thomas Haller
28169725d7 libnm-util: add function nm_connection_get_interface_name()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 18:35:16 +02:00
Thomas Haller
d44d526c00 contrib/nm-live-vm: merge branch 'contrib/nm-live-vm'
Merge script to create a VM image with NetworkManager.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:43:17 +02:00
Thomas Haller
031142000a contrib/nm-live-vm: install required packages readline, gobject-introspection, and pygobject3
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
04591cfa2e contrib/nm-live-vm: fix run.sh script to into script directory
run.sh refers to the image file via relative path.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
c274725dc3 contrib/nm-live-vm: start the VM with less memory (1024 mb)
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
6a5c05e61a contrib/nm-live-vm: install wget and setup bashrc and git
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
acfb0b1bbf contrib/nm-live-vm: enable option main.debug for NM in VM
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
cd7c97eb1d contrib/nm-live-vm: write /etc/fstab
Everytime you call mock again, the fstab file will be reset.
So, we have to write it shortly before creating the image.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
0178d73699 contrib/nm-live-vm: disable rate limiting in the journal of the VM
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
0689efc768 contrib/nm-live-vm: don't remove the temporary directory with the extracted VM image
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
fe267b0fd2 contrib/nm-live-vm: enable ssh server and add port forward from localhost:10022
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
78f94726a7 contrib/nm-live-vm: share a directory with the live-vm
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
fbc9c41e96 contrib/nm-live-vm: include the NetworkManager source in the live-mv file for debugging
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
f2878b7633 contrib/nm-live-vm: compile live-vm build without compiler optimization
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš
ef052ead88 contrib/nm-live-vm: add dnsmasq to the VM 2014-06-30 17:42:09 +02:00
Jiří Klimeš
84b3e924df contrib/nm-live-vm: fix build - libndp-devel is now required 2014-06-30 17:42:09 +02:00
Jiří Klimeš
f20f706d34 contrib/nm-live-vm: also build nmtui 2014-06-30 17:42:09 +02:00
Jiří Klimeš
dc872b7e52 contrib/nm-live-vm: add rootfstype=ramfs kernel parameter to run.sh
Kernel changed default filesystem for roots from ramfs to tmpfs.
See http://lwn.net/Articles/559176/ for more information.
The change caused our initramfs to be mounted with size= parameter that equals
to the actual size of unpacked initramfs. That's why mounted / was full and no
space was available (without manual remounting: mount -o remount,size=100% /).

So we explicitly require usage of ramfs to have all RAM of the virtual machine
available for /.

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš
26626c75c3 contrib/nm-live-vm: put qemu network-related options into a variable
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Jiří Klimeš
9b3922390c contrib/nm-live-vm: update scripts to make VM based on Fedora 20
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
2014-06-30 17:42:09 +02:00
Thomas Haller
e9ed87a920 contrib/nm-live-vm: adjust build script to enable DEBUG logging
Enable more logging when starting NM.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-30 17:42:09 +02:00