summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* core: allow multiple devices with the same interface namedcbw/devices-for-all-1-squashedDan Williams2015-05-156-133/+192
| | | | | | | | | | | | | | | | | | | | | | | | | But, of course, only one realized device can have the same interface name at a time. This commit effectively reverts most of: 1b37cd03409fa3c0fb26fb6e8093b54b2b7c5d8d core: allow ActiveConnections to be created without a device But it's not easy to do a separate revert of that code due to interdependencies with nm-manager.c. Creating devices when they are defined by a connection also makes makes it possible to require the NMDevice to be present when activating it, which means we can remove a bunch of code from NMManager that had to handle software devices not existing yet at the time of the activation request. But it also means we must be more careful when finding master interfaces during slave activation, since we cannot simply match by interface name alone. Instead we must find the master which matches both the interface name and can control slaves of the type which is being activated.
* libnm/libnm-glib: add NMClient.get_all_devices() method and "all-devices" ↵Dan Williams2015-05-159-36/+298
| | | | | | | property Mirror new NetworkManager API to return both real devices and device placeholders.
* api/manager: add GetAllDevices() method and AllDevices propertyDan Williams2015-05-154-10/+102
| | | | Returns both realized and un-realized devices.
* core: ensure platform links are compatible with the NMDeviceDan Williams2015-05-1519-26/+122
| | | | | | | | Ensure the platform link with the same interface name as the NMDevice is actually compatible with it before using the link for initialization of device properties. If not, remove the NMDevice and create a new one since there are kernel resources with a different type.
* core: create devices first and realize them laterDan Williams2015-05-1512-233/+288
| | | | | | | | | | Unrealized devices aren't backed by kernel resources and so won't know all of their attributes. That means three things: 1) they must update their attributes when they become realized 2) they must clear those attributes when unrealized 3) they must be looser in checking compatible connections until they are realized
* core: add class function for device unrealizationDan Williams2015-05-154-14/+150
|
* libnm-glib/libnm: add support for Realized device propertyDan Williams2015-05-156-0/+82
|
* core: add "realized" NMDevice propertyDan Williams2015-05-154-6/+66
| | | | | | | This property is TRUE for devices that exist either as a kernel device or are backed by some other resource (eg, ModemManager object, Bluez device, etc). It will eventually be FALSE for software devices that are not yet instantiated.
* core: split device creation and device setupDan Williams2015-05-1529-760/+824
| | | | | | | | | | | | | | | | | | | Future patches will create devices long before they are backed by kernel resources, so we need to split NMDevice object creation from actual setup based on the backing resources. This patch combines the NMDeviceFactory's new_link() and create_virtual_device_for_connection() class methods into a single create_device() method that simply creates an unrealized NMDevice object; this method is not expected to fail unless the device is supposed to be ignored. This also means that the NMDevice 'platform-device' property is removed, because a platform link object may not be available at NMDevice object creation time. After the device is created, it is then "realized" at some later time from a platform link (for existing/hardware devices via the realize_existing() method) or from an NMConnection (for newly created software devices via the realize_new() method).
* settings: shortcut nm_settings_get_connection_by_uuid() if @uuid is invalidThomas Haller2015-05-141-0/+3
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: rearrange some VLAN code and clean up dispose()Dan Williams2015-05-141-44/+33
| | | | | Move parent-related stuff before its callers and clean up dispose so that we no longer need priv->disposed.
* platform: move InfiniBand property reading into the platformDan Williams2015-05-145-16/+167
|
* core: earlier software capability detectionDan Williams2015-05-146-21/+39
| | | | | | | We need to know whether we can create interfaces of any given NMDevice subclass or not. So don't rely on just the NMPlatformLink for that information, because we won't have a platform link for software devices before we create them.
* core: check duplicate devices by interface name not UDIDan Williams2015-05-141-15/+17
| | | | | | We can't have devices with duplicate interface names so we might as well use that for dupe checking instead of the (mostly useless) UDI.
* ifcfg-rh/tests: add missing file to EXTRA_DISTBeniamino Galvani2015-05-141-1/+2
| | | | | 'ifcfg-test-dns-options' was not included in the archive for distribution and 'make distcheck' failed. Add it.
* dns: merge branch 'bg/dns-options-rh1200131'Beniamino Galvani2015-05-1321-126/+1530
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1200131
| * ifcfg-rh: use GLib test functions in new testcases for DNS optionsBeniamino Galvani2015-05-131-60/+17
| |
| * ifcfg-rh/tests: add tests for RES_OPTIONS parsingBeniamino Galvani2015-05-132-0/+219
| |
| * core: capture DNS options from resolv.confBeniamino Galvani2015-05-137-16/+192
| |
| * libnm-core/trivial: rename 'i' function argument to 'idx'Beniamino Galvani2015-05-133-76/+76
| |
| * cli: add support for DNS optionsBeniamino Galvani2015-05-131-44/+140
| |
| * ifcfg-rh: support RES_OPTIONSBeniamino Galvani2015-05-132-0/+103
| |
| * dns-manager: add support for DNS optionsBeniamino Galvani2015-05-131-8/+54
| |
| * core: add DNS options property to NMIP4Config and NMIP6ConfigBeniamino Galvani2015-05-136-2/+310
| |
| * libnm-core/test: add tests for DNS option utilitiesBeniamino Galvani2015-05-131-0/+88
| |
| * libnm-core: add dns-options property to NMSettingIPConfigBeniamino Galvani2015-05-136-0/+411
|/
* platform: merge branch 'th/platform_refact_caching-bgo747981' (early part)Thomas Haller2015-05-139-79/+99
|\ | | | | | | | | | | Merge a first part of th/platform_refact_caching-bgo747981 https://bugzilla.gnome.org/show_bug.cgi?id=747981
| * platform/test: include call location in signal assertionsThomas Haller2015-05-132-21/+29
| | | | | | | | | | Hard to debug failures, if we don't print where the failure happens.
| * platform/test: make asserting signals more flexibleThomas Haller2015-05-134-29/+37
| | | | | | | | | | | | | | Support accepting more then one signal at a time. It is to be expected, that one change in platform raises several signals. Extend the assertion helpers to express that.
| * route-manager/test: fix missing initialization of temporary variables on stackThomas Haller2015-05-131-3/+3
| | | | | | | | | | | | | | | | | | Up to now, this code was correct. Later we will add another field to NMPlatformIP4Route which causes the test to operate on uninitialized data. Instead of explicitly initializing the field, just clear the whole struct.
| * test: fix wrong use of memcmp() in nmtst_platform_ip4_routes_equal()Thomas Haller2015-05-131-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | And nmtst_platform_ip6_routes_equal(). As already indicated by the comment, using memcmp() doesn't really work here. It worked up to now, because the NMPlatformIP4Route structure has no padding at the end. If we would have a last 'guint8' member (as we will add later), initializing an arry of routes on the stack would not clear the bytes from the padding and the comparison using memcmp() would fail.
| * platform: fix nm_platform_link_cmp() to consider ifindexThomas Haller2015-05-131-0/+1
| |
| * valgrind: disable suppression for libnlThomas Haller2015-05-131-19/+24
| | | | | | | | | | Not sure why (and whether!) this is really needed. Disable it for now, resurrect it later if need be.
| * platform: fix memleak in link_delete()Thomas Haller2015-05-132-17/+1
| | | | | | | | Turns out, the valgrind suppression was hiding a memleak
| * valgrind: add libnl suppressionThomas Haller2015-05-131-2/+17
| | | | | | | | | | | | | | | | | | | | Add a comment about the upstream bug that fixes the suppressed memleak in libnl. Also, add a different backtrace for the same bug. It currently doesn't hit easily, because we don't call nl_msg_parse() often. In the future we will though.
| * trivial: add comment to valgrind suppression fileThomas Haller2015-05-131-0/+5
|/
* ppp: merge branch 'bg/kernel-pppoe-mtu-bgo742939'Beniamino Galvani2015-05-134-43/+36
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=742939
| * device: set Ethernet MTU for PPPoE connections in stage2/configBeniamino Galvani2015-05-131-0/+23
| | | | | | | | | | | | Try to set the MTU of the parent Ethernet interface to match the requested PPP MTU and MRU. This allows the negotiation of a PPP MTU and MRU greater than 1492.
| * Revert "ppp-manager: don't use kernel pppoe (rh #1034860, rh #1061641)"Dan Williams2015-05-132-42/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We switched to user-mode PPPoE client to work around a bug in kernel PPPoE code that caused pppd not to be notified when the connection was terminated with a PADT before the LCP Termination Request. The kernel bug has now been fixed upstream with commit 287f3a943fef "pppoe: Use workqueue to die properly when a PADT is received", queued for v4.1. Since the issue affected only very particular scenarios and could somehow be solved with the right configuration (see bugzilla entry), we can safely revert the patch and restore the use of kernel mode PPPoE. This reverts commit 7955806a02db64b20079267743056d7d9d45af3b. https://bugzilla.gnome.org/show_bug.cgi?id=742939
| * device: set MTU on IP interfaceBeniamino Galvani2015-05-131-1/+1
|/ | | | Fixes: 7ba2a058f201ac237e2c5ddf6f513f8c306f314d
* core: fix compile error due to missing pointer castThomas Haller2015-05-131-1/+1
| | | | Fixes: 72baf9fa2498d54dd9f545af0054dd6de7d5ff2e
* manager: AddAndActivateConnection(): don't save until the connection is ↵Lubomir Rintel2015-05-122-3/+5
| | | | | | activatable https://bugzilla.redhat.com/show_bug.cgi?id=1174164
* core: use explict NMLogDomain enum instead of intThomas Haller2015-05-123-12/+14
| | | | | A while ago (f4f3f4d69b6ff89b5ec7cb9b2ca3758c149f15f5) we added an enum to represent the logging domain. Use it.
* libnm: add ifcfg-rh description for 802-11-wireless.powersave propertyJiří Klimeš2015-05-121-0/+8
| | | | so that it is displayed in nm-settings-ifcfg-rh manual page.
* platform/test: fix valgrind warning about NULL arguments to mount()Thomas Haller2015-05-121-2/+2
| | | | | | | | | | | | | | | | | ==21573== Syscall param mount(type) points to unaddressable byte(s) ==21573== at 0x854B9BA: mount (syscall-template.S:81) ==21573== by 0x158922: main (test-common.c:295) ==21573== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==21573== { <insert_a_suppression_name_here> Memcheck:Param mount(type) fun:mount fun:main } Fixes: d6aef9c188468224d6e1dd670844c3f0e7482c35
* po: update Polish (pl) translation (bgo #749164)Piotr Drąg2015-05-121-696/+704
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749164
* device: fix configuring static ip addressesThomas Haller2015-05-111-5/+4
| | | | | | | | | | | | When a connection had static IP addresses, an early event from plaform would clear them from priv->con_ip4_config. Fix that, by don't initializing priv->con_ip4_config before we commit the first time. https://bugzilla.gnome.org/show_bug.cgi?id=749052 Fixes: 557667df12fc05b76326d6406553985effeeb2ac
* linux-platforms: don't enumerate devices via udev if udevd is not runningLubomir Rintel2015-05-111-5/+7
| | | | | | We'd be able to do so for already existing devices, but not for devices that are added afterwards, since gudev is hardwired not to listen for events from kernel.
* platform/test: unshare the netns namespace so that root tests don't mess ↵Lubomir Rintel2015-05-111-0/+38
| | | | | | | | | | | | | | | with the system Mount a private sysfs instance. Otherwise gudev sees the devices from the parent netns as opposed to our netns. We do, however need a writable /sys/devices subtree for testing the bridge code. There doesn't seem to be any other way to get a writable subtree of a read-only filesystem than remounting it with no parameters after the initial mount. We use this to get a writable sysfs instance and then bindmount it so that it fits properly in the sysfs hierarchy. Co-Authored-By: Thomas Haller <thaller@redhat.com>
* build: correct help message about missing readline + termcap librariesDan Williams2015-05-111-1/+1
|