summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fixup! ipv4ll: use internal implementationbg/ipv4ll-bgo747463Beniamino Galvani2015-04-301-7/+5
|
* fixup! ipv4ll: use internal implementationBeniamino Galvani2015-04-271-1/+1
|
* contrib/rpm: remove avahi-autoipd dependency and filesBeniamino Galvani2015-04-251-3/+0
|
* callouts: avahi-autoipd-action is no moreBeniamino Galvani2015-04-253-151/+2
|
* ipv4ll: use internal implementationBeniamino Galvani2015-04-257-163/+77
|
* device: fix device state transition after IPv4LL failureBeniamino Galvani2015-04-251-9/+11
| | | | | | Don't terminate the entire connection if IPv4LL configuration fails but instead call nm_device_check_ip_failed() to check the result of IPv6 as well.
* device/trivial: move nm_device_check_ip_failed()Beniamino Galvani2015-04-251-36/+36
| | | | | Move nm_device_check_ip_failed() upwards as it will be used by IPv4LL code.
* device/trivial: rename 'aipd' and 'autoip4' to 'ipv4ll'Beniamino Galvani2015-04-253-45/+45
|
* systemd: ensure every file includes 'nm-sd-adapt.h' firstBeniamino Galvani2015-04-255-0/+11
|
* Merge branch 'systemd' into bg/ipv4ll-bgo747463Beniamino Galvani2015-04-2511-370/+1172
|\ | | | | | | | | | | Conflicts: src/systemd/src/shared/strv.c src/systemd/src/shared/util.c
| * build: update systemd codesystemd-dhcpBeniamino Galvani2015-04-0811-370/+1172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2015-04-08, git commit 431c3b6bab9c; it updates the existing files and imports systemd IPv4LL implementation. SYSTEMD_DIR=../systemd COMMIT=431c3b6bab9ceb54cd144d8df24d764a8a5f8fcc ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) /bin/cp "$SYSTEMD_DIR"/src/libsystemd/sd-id128/sd-id128.c ./src/systemd/src/libsystemd/sd-id128/sd-id128.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-identifier.c ./src/systemd/src/libsystemd-network/dhcp-identifier.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-identifier.h ./src/systemd/src/libsystemd-network/dhcp-identifier.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-internal.h ./src/systemd/src/libsystemd-network/dhcp-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-lease-internal.h ./src/systemd/src/libsystemd-network/dhcp-lease-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-network.c ./src/systemd/src/libsystemd-network/dhcp-network.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-option.c ./src/systemd/src/libsystemd-network/dhcp-option.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-packet.c ./src/systemd/src/libsystemd-network/dhcp-packet.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-protocol.h ./src/systemd/src/libsystemd-network/dhcp-protocol.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-internal.h ./src/systemd/src/libsystemd-network/dhcp6-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-lease-internal.h ./src/systemd/src/libsystemd-network/dhcp6-lease-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-network.c ./src/systemd/src/libsystemd-network/dhcp6-network.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-option.c ./src/systemd/src/libsystemd-network/dhcp6-option.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-protocol.h ./src/systemd/src/libsystemd-network/dhcp6-protocol.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.c ./src/systemd/src/libsystemd-network/network-internal.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.h ./src/systemd/src/libsystemd-network/network-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-client.c ./src/systemd/src/libsystemd-network/sd-dhcp-client.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-lease.c ./src/systemd/src/libsystemd-network/sd-dhcp-lease.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-client.c ./src/systemd/src/libsystemd-network/sd-dhcp6-client.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-lease.c ./src/systemd/src/libsystemd-network/sd-dhcp6-lease.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/ipv4ll-internal.h ./src/systemd/src/libsystemd-network/ipv4ll-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/ipv4ll-internal.h ./src/systemd/src/libsystemd-network/ipv4ll-internal.h /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/ipv4ll-network.c ./src/systemd/src/libsystemd-network/ipv4ll-network.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network//ipv4ll-packet.c ./src/systemd/src/libsystemd-network//ipv4ll-packet.c /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-ipv4ll.c ./src/systemd/src/libsystemd-network/sd-ipv4ll.c /bin/cp "$SYSTEMD_DIR"/src/shared/async.h ./src/systemd/src/shared/async.h /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.c ./src/systemd/src/shared/fileio.c /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.h ./src/systemd/src/shared/fileio.h /bin/cp "$SYSTEMD_DIR"/src/shared/list.h ./src/systemd/src/shared/list.h /bin/cp "$SYSTEMD_DIR"/src/shared/log.h ./src/systemd/src/shared/log.h /bin/cp "$SYSTEMD_DIR"/src/shared/macro.h ./src/systemd/src/shared/macro.h /bin/cp "$SYSTEMD_DIR"/src/shared/path-util.c ./src/systemd/src/shared/path-util.c /bin/cp "$SYSTEMD_DIR"/src/shared/path-util.h ./src/systemd/src/shared/path-util.h /bin/cp "$SYSTEMD_DIR"/src/shared/refcnt.h ./src/systemd/src/shared/refcnt.h /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.c ./src/systemd/src/shared/siphash24.c /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.h ./src/systemd/src/shared/siphash24.h /bin/cp "$SYSTEMD_DIR"/src/shared/socket-util.h ./src/systemd/src/shared/socket-util.h /bin/cp "$SYSTEMD_DIR"/src/shared/sparse-endian.h ./src/systemd/src/shared/sparse-endian.h /bin/cp "$SYSTEMD_DIR"/src/shared/strv.c ./src/systemd/src/shared/strv.c /bin/cp "$SYSTEMD_DIR"/src/shared/strv.h ./src/systemd/src/shared/strv.h /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.c ./src/systemd/src/shared/time-util.c /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.h ./src/systemd/src/shared/time-util.h /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.c ./src/systemd/src/shared/utf8.c /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.h ./src/systemd/src/shared/utf8.h /bin/cp "$SYSTEMD_DIR"/src/shared/util.c ./src/systemd/src/shared/util.c /bin/cp "$SYSTEMD_DIR"/src/shared/util.h ./src/systemd/src/shared/util.h /bin/cp "$SYSTEMD_DIR"/src/shared/unaligned.h ./src/systemd/src/shared/unaligned.h /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.c ./src/systemd/src/shared/in-addr-util.c /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.h ./src/systemd/src/shared/in-addr-util.h /bin/cp "$SYSTEMD_DIR"/src/systemd/_sd-common.h ./src/systemd/src/systemd/_sd-common.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-client.h ./src/systemd/src/systemd/sd-dhcp-client.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-lease.h ./src/systemd/src/systemd/sd-dhcp-lease.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-client.h ./src/systemd/src/systemd/sd-dhcp6-client.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-lease.h ./src/systemd/src/systemd/sd-dhcp6-lease.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-event.h ./src/systemd/src/systemd/sd-event.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-id128.h ./src/systemd/src/systemd/sd-id128.h /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-ipv4ll.h ./src/systemd/src/systemd/sd-ipv4ll.h
* | Merge branch 'systemd' into bg/ipv4ll-bgo747463Beniamino Galvani2015-04-2554-70/+70
|\ \ | |/ | | | | | | | | | | | | In addition, update src/Makefile.am with new paths and move src/{dhcp-manager/systemd-dhcp => systemd}/nm-sd-adapt.[ch] as well.
| * build: move systemd DHCP files to a common directoryBeniamino Galvani2015-04-0851-0/+0
| | | | | | | | | | | | Create a new directory 'src/systemd' and move systemd DHCP files there. This new directory will contain all the files imported from systemd.
* | logging: define _LOGT() macro to check valid argumentsThomas Haller2015-04-242-3/+3
| | | | | | | | | | | | With NM_MORE_LOGGING disabled, we still want the compiler to evaluate the argument list. By wrapping it in "if(FALSE)", we get compile time checks, but the logging statement will be optimized out.
* | dbus-manager: harden registering/unregistering objectDan Williams2015-04-231-4/+8
| | | | | | | | | | | | | | | | | | | | | | Saw some g_warning() about g_object_weak_unref() trying to unref a non registed reference. While this does not fix it, let's assert that situation a step earlier to ease debugging. Also, move g_object_weak_ref() closer to adding the object into the @exported hash. [thaller@redhat.com: rewrote commit message, change to register_object()]
* | ifcfg-rh: don't try to read DEVTIMEOUT from file for in-memory connectionsLubomir Rintel2015-04-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #0 0x00007ffff4a2c970 in g_logv (log_domain=0x7fffe9201115 "NetworkManager-ifcfg-rh", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd710) at gmessages.c:1046 #1 0x00007ffff4a2cbaf in g_log (log_domain=log_domain@entry=0x7fffe9201115 "NetworkManager-ifcfg-rh", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff4a9bc1d "%s: assertion '%s' failed") at gmessages.c:1079 #2 0x00007ffff4a2cbe9 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7fffe9201115 "NetworkManager-ifcfg-rh", pretty_function=pretty_function@entry=0x7fffe9204b70 <__FUNCTION__.30626> "devtimeout_from_file", expression=expression@entry=0x7fffe9202d97 "filename != NULL") at gmessages.c:1088 #3 0x00007fffe91fbfa2 in devtimeout_from_file (filename=<optimized out>) at reader.c:4884 #4 0x00007fffe91ef845 in nm_ifcfg_connection_new (self=0x8d2200 [NMIfcfgConnection]) at nm-ifcfg-connection.c:159 #5 0x00007fffe91ef845 in nm_ifcfg_connection_new (source=source@entry=0x83ba40, full_path=full_path@entry=0x0, error=error@entry=0x7fffffffd980) at nm-ifcfg-connection.c:240 #6 0x00007fffe91ec7e6 in update_connection (self=self@entry=0x80c2a0 [SCPluginIfcfg], source=source@entry=0x83ba40, full_path=0x0, connection=connection@entry=0x0, protect_existing_connection=protect_existing_connection@entry=0, protected_connections=protected_connections@entry=0x0, error=0x7fffffffd980) at plugin.c:225 #7 0x00007fffe91eddf2 in add_connection (config=<optimized out>, connection=0x83ba40, save_to_disk=<optimized out>, error=0x7fffffffd980) at plugin.c:715 #8 0x000000000048fc1d in nm_settings_add_connection (self=<optimized out>, connection=0x83ba40, save_to_disk=0, error=<optimized out>) at settings/nm-settings.c:1045 #9 0x0000000000490858 in pk_add_cb (chain=0x8b1fc0, chain_error=<optimized out>, context=<optimized out>, user_data=<optimized out>) at settings/nm-settings.c:1151 #10 0x00000000004ca98c in auth_chain_finish (user_data=0x8b1fc0) at nm-auth-utils.c:82 #11 0x00007ffff4a257fb in g_main_context_dispatch (context=0x7cd3e0) at gmain.c:3111 #12 0x00007ffff4a257fb in g_main_context_dispatch (context=context@entry=0x7cd3e0) at gmain.c:3710 #13 0x00007ffff4a25b98 in g_main_context_iterate (context=0x7cd3e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781 #14 0x00007ffff4a25ec2 in g_main_loop_run (loop=0x7cd4a0) at gmain.c:3975 #15 0x0000000000444c81 in main (argc=<optimized out>, argv=<optimized out>) at main.c:486
* | core: refactor nm_ethernet_address_is_valid() and reject invalid addressesThomas Haller2015-04-232-25/+28
| | | | | | | | | | | | | | | | | | nm_ethernet_address_is_valid() did not check whether @addr was a valid address in the first place. It only checked whether the address was not equal to a few notorious MAC addresses. At the same time, be more forgiving and accept %NULL as argument. This fixes an assertion nm_ap_match_in_hash().
* | core/test: add test for nm_ethernet_address_is_valid()Thomas Haller2015-04-231-0/+25
| |
* | wifi: avoid assertion in request_wireless_scan() passing NULL to ↵Thomas Haller2015-04-231-1/+3
| | | | | | | | nm_utils_ssid_to_utf8()
* | platform: remove wrong assertionThomas Haller2015-04-231-1/+0
| | | | | | | | | | | | This is a well known issue that we cannot convert some libnl objects to NMPlatformObject. The to-string function for libnl objects is only used for debug logging. No need to assert.
* | cli: stop waiting for deactivation if device reaches unmanaged stateLubomir Rintel2015-04-231-3/+3
| | | | | | | | | | default-unmanaged devices enter unmanaged state right after they're disconnected.
* | build/trivial: reorder and break lines in Makefile.amThomas Haller2015-04-221-2/+9
| |
* | platform: merge branch 'th/platform-div-bgo748131'Thomas Haller2015-04-225-108/+140
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=748131
| * | platform: add NM_PLATFORM_SIGNAL_NONE enum valueThomas Haller2015-04-221-0/+1
| | |
| * | platform: refactor detection of support_user_ipv6llThomas Haller2015-04-221-44/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move detection of @support_user_ipv6ll to a separate function _support_user_ipv6ll_detect() and call it immediately after the places where we receive libnl objects from kernel, i.e. get_kernel_object(), event_notification(), and cache_repopulate_all(). Also, whether we have support depends on the kernel and is per-system, not per-platform-instance. Make @_support_user_ipv6ll a global variable. This way, we don't need to pass around a NMLinuxPlatform instance.
| * | platform: don't assert against success of nl_msg_parse()Thomas Haller2015-04-221-1/+2
| | |
| * | platform: use new _LOG() logging macros in nm-linux-platform.cThomas Haller2015-04-221-3/+3
| | |
| * | platform: add _LOG() logging macros to linux platformThomas Haller2015-04-221-0/+42
| | |
| * | platform: add nm_platform_try_get() functionThomas Haller2015-04-222-0/+7
| | |
| * | platform: drop nm_platform_free() and register weak-refThomas Haller2015-04-223-19/+8
| | | | | | | | | | | | | | | | | | Instead of having a nm_platform_free() function, use NM_DEFINE_SINGLETON_WEAK_REF() and register a weak reference. That way, users who want to free the platform instance can just unref it.
| * | platform: drop virtual setup() initalization functionThomas Haller2015-04-223-25/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have nm_*_platform_setup() that gets specified via -DSETUP. This SETUP() hook gives us all the flexiblity we need to customize our singleton, so just do any required setup there. Also, it would be easier to add an alternative (hypotetical) nm_fake_platform_setup_custom() to customize the singleton then to parametrize the NMPlatform:setup() implementation. So this virtual function is less flexible and redundant.
| * | platform: pass singleton instance to nm_platform_setup()Thomas Haller2015-04-224-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two hooks to modify setup of the platform singleton: nm_linux_platform_setup() and the virtual setup() function. On the other hand, nm_platform_setup() limits us by accepting only a GType, instead of a prepeared platform instance. Make the nm_platform_setup() method more flexible, so that we can later drop the setup() hook.
| * | platform: initialize NMLinuxPlatform in constructed() methodThomas Haller2015-04-222-9/+9
|/ / | | | | | | | | | | | | | | | | | | setup() can be used to initialize a NMPlatform instance that is registered as singleton via nm_platform_setup(). It should not be used to initialize the object. Prior to c6529a9d748ad3c8ee37431d020a7b9223992a23, this change was not possible because constructed() will call back into nm_platform_*() functions, without having the singleton instance setup.
* | logging: use _nm_log() to avoid duplicate check of whether logging is enabledThomas Haller2015-04-223-9/+9
| | | | | | | | | | Use _nm_log() in places that already checked whether logging is enabled. No need to check again as done by nm_log().
* | logging: add logging macro _nm_log() that logs unconditionallyThomas Haller2015-04-221-1/+9
| |
* | logging/trivial: rename _nm_log() to _nm_log_impl()Thomas Haller2015-04-223-18/+18
| | | | | | | | | | | | | | | | | | The actual logging implementation is not supposed to be called directly, because there are macros that capture the call site information __FILE__, __LINE__, and G_STRFUNC. Rename the function to make clear that this is the actual implementation.
* | logging: ensure that the first argument of the logging statement is a C stringThomas Haller2015-04-221-1/+1
| | | | | | | | | | We don't want to pass unknown format strings to the logging macro. Catch that by concatenating "" with the format string.
* | logging: always pass a static format string to logging functionsThomas Haller2015-04-221-2/+2
| |
* | ibft/logging: don't localize logging stagementsThomas Haller2015-04-221-3/+3
| | | | | | | | We don't localize any other nm-logging messages either.
* | nm-ip[64]-config: set ifindex when replacing a duplicate routeLubomir Rintel2015-04-222-0/+2
| | | | | | | | | | | | | | | | | | Otherwise it stays zero and hits an assertion when the route is applied: NetworkManager:ERROR:nm-route-manager.c:179:nm_route_manager_ip4_route_sync: assertion failed: (known_route->ifindex) https://bugzilla.gnome.org/show_bug.cgi?id=745844
* | cli: fix allowed slave-typesJiří Klimeš2015-04-221-1/+1
| |
* | platform/test: refactor detection of root-testThomas Haller2015-04-213-6/+13
| |
* | platform: pass @platform instance to build_rtnl_addr()Thomas Haller2015-04-211-7/+8
| |
* | platform: add self argument to platform functionsThomas Haller2015-04-2146-1017/+1206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most nm_platform_*() functions operate on the platform singleton nm_platform_get(). That made sense because the NMPlatform instance was mainly to hook fake platform for testing. While the implicit argument saved some typing, I think explicit is better. Especially, because NMPlatform could become a more usable object then just a hook for testing. With this change, NMPlatform instances can be used individually, not only as a singleton instance. Before this change, the constructor of NMLinuxPlatform could not call any nm_platform_*() functions because the singleton was not yet initialized. We could only instantiate an incomplete instance, register it via nm_platform_setup(), and then complete initialization via singleton->setup(). With this change, we can create and fully initialize NMPlatform instances before/without setting them up them as singleton. Also, currently there is no clear distinction between functions that operate on the NMPlatform instance, and functions that can be used stand-alone (e.g. nm_platform_ip4_address_to_string()). The latter can not be mocked for testing. With this change, the distinction becomes obvious. That is also useful because it becomes clearer which functions make use of the platform cache and which not. Inside nm-linux-platform.c, continue the pattern that the self instance is named @platform. That makes sense because its type is NMPlatform, and not NMLinuxPlatform what we would expect from a paramter named @self. This is a major diff that causes some pain when rebasing. Try to rebase to the parent commit of this commit as a first step. Then rebase on top of this commit using merge-strategy "ours".
* | trivial: fix spelling in commentsThomas Haller2015-04-202-5/+5
| |
* | merge: add new nm-plugin-missing property for devices (bgo #747851)Jiří Klimeš2015-04-208-45/+153
|\ \ | | | | | | | | | | | | | | | | | | | | | The property indicates that a device type is supported by NetworkManager, but the plugin for handling the device is missing. The property is accessible through D-Bus API, libnm and nmcli. https://bugzilla.gnome.org/show_bug.cgi?id=747851
| * | cli: add NM-PLUGIN-MISSING to devicesJiří Klimeš2015-04-201-10/+12
| | |
| * | core: set nm-plugin-missing device propertyJiří Klimeš2015-04-201-0/+4
| | |
| * | libnm: add nm-plugin-missing property indicating NM device plugin not availableJiří Klimeš2015-04-203-0/+43
| | |
| * | device: add nm-plugin-missing property indicating NM device plugin not availableJiří Klimeš2015-04-203-0/+45
| | | | | | | | | | | | | | | It is useful for indicating that the device type is supported but the required plugin is not installed.