summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dns: rewrite "resolv.conf" on SIGHUP and SIGUSR1th/dns-update-on-sigusr1-rh1062301Thomas Haller2015-06-251-9/+13
| | | | | | | | Also rewrite resolv.conf if the configuration didn't actually change. Especially, react on SIGUSR1 which does not reload the configuration but only writes "resolv.conf". https://bugzilla.redhat.com/show_bug.cgi?id=1062301
* config: pass signals to nm_config_reload()Thomas Haller2015-06-257-29/+77
| | | | | | | Also react on SIGUSR1 and SIGUSR2, beside SIGHUP. Only for SIGHUP actually reload the configuration from disc. For the other signals only emit a config-changed signal.
* platform: fix inverting guint8 value inet6_addr_gen_mode_invThomas Haller2015-06-253-5/+6
| | | | Fixes: e8e455817b340f60b396ba5d41425ed4de4c8554
* team: fix potential crash if team binary doesn't existThomas Haller2015-06-251-1/+1
| | | | | | | | | warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') # 552| if (!teamd_kill (self, NULL, &error)) { # 553|-> _LOGW (LOGD_TEAM, "existing teamd config mismatch; failed to kill existing teamd: %s", error->message); # 554| *reason = NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED; Fixes: 24a764e831bff27647bb5025c1368582fade21cf
* platform/coverity: add workarounds to suppress coverify warningsThomas Haller2015-06-252-12/+14
|
* platform/test: minor test fix in "test-nmp-object.c"Thomas Haller2015-06-251-1/+0
|
* libnm-glib: avoid coverity warningThomas Haller2015-06-251-1/+1
| | | | | | | | | | 5. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:493: var_compare_op: Comparing "error" to null implies that "error" might be null. 8. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:508: var_deref_op: Dereferencing null pointer "error". # 506| g_hash_table_remove (priv->pending, path); # 507| # 508|-> if (print_once && error->code == DBUS_GERROR_LIMITS_EXCEEDED) { # 509| g_printerr ("Warning: libnm-glib:%s(): a D-Bus limit exceeded: %s. The application might not work properly.\n" # 510| "Consider increasing max_replies_per_connection limit in /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf "
* device: fix handling of ignore-auto-dns and ignore-auto-routesBeniamino Galvani2015-06-251-3/+26
| | | | | | | | | | | | | | Since commit ab6548c62134 ("device: better accept external IP changes"), ipX_config_merge_and_apply() applies the configuration static settings to an intermediate, initially empty configuration (priv->con_ipX_config) instead of the composite configuration, and thus the handling of ignore-auto-routes and ignore-auto-dns options done in nm_ipX_config_merge_setting() has no effect. Fix this by clearing the routes and the DNS information when needed before merging static settings to the composite configuration. Fixes: ab6548c62134518ba2871306397e7fb9c84260ca
* core: return more meaningful error when no device is found for activationJiří Klimeš2015-06-251-1/+1
| | | | | | | | | | | | Example: $ nmcli con add type eth con-name profile ifname nosuch $ nmcli con up profile or # ip link set eth0 down $ nmcli con add type eth con-name my-eth0 ifname eth0 $ nmcli con up my-eth0 Related to: 6fc3736c7ac139e40cb9f72b722b95b93c474979
* merge: branch 'lr/master-activations'Lubomir Rintel2015-06-243-12/+34
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=750595
| * manager: reuse an active connection, if the same activation is pendinglr/master-activationsLubomir Rintel2015-06-241-1/+25
| | | | | | | | | | When a master & slaves get activated at the same time, they all submit separate active connections which race for the device after activation.
| * active-connection: fail the activation if the master AC disconnectLubomir Rintel2015-06-241-2/+3
| | | | | | | | | | The master may not have successfully activated even though we know the device already.
| * ifcfg-rh,vlan: fall back to VLAN_ID if vlan id can't be determined from DEVICELubomir Rintel2015-06-241-7/+4
| | | | | | | | | | If the device begins with "vlan", but a VLAN ID does not follow, the reader would fail and ignore the actual VLAN_ID.
| * manager: log the address, not the path of the master active connectionLubomir Rintel2015-06-241-2/+2
|/ | | | | The connection might not be exported on D-Bus at that point yet and thus shows up as (null) in logs, which is not too helpful.
* default-route-manager: merge platform signal handlerThomas Haller2015-06-241-49/+28
|
* device: merge device_ipx_changed() signal handlerThomas Haller2015-06-241-24/+20
|
* platform: pass object type with platform changed signalThomas Haller2015-06-2412-30/+38
|
* platform/trivial: fix name of enum value OBJECT_TYPE_UNKNOWNThomas Haller2015-06-244-13/+13
| | | | Fixes: 518cf76de74ca11b736c27a4265c8b592d021bc4
* platform: declare NMPObjectType in nm-types.hThomas Haller2015-06-242-11/+11
| | | | | We want to use it outside of NMPlatform, but users should not be required to include "nmp-object.h".
* platform: generate gtype for NMPObjectType enumThomas Haller2015-06-241-1/+1
|
* core: delay handling of link-changed platform event in managerThomas Haller2015-06-241-29/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backtrace: NetworkManager[10972]: <debug> [1435142179.593334] [platform/nm-platform.c:2962] log_ip4_route(): signal: route 4 removed: 0.0.0.0/0 via 192.168.100.1 dev 85 metric 300 mss 0 src user scope global NetworkManager[10972]: <debug> [1435142179.593421] [platform/nm-platform.c:2944] log_link(): signal: link removed: 85: bond0 <DOWN;broadcast,multicast,master> mtu 1500 arp 1 bond* init addr 7A:AB:BE:0D:19:3D driver bond NetworkManager[10972]: <debug> [1435142179.593446] [nm-manager.c:779] remove_device(): (bond0): removing device (allow_unmanage 1, managed 1) NetworkManager[10972]: <debug> [1435142179.596995] [devices/nm-device.c:7232] nm_device_set_unmanaged(): [0x5555559d2a40] (bond0): now unmanaged NetworkManager[10972]: (devices/nm-device.c:8040):_set_state_full: runtime check failed: (priv->in_state_changed == FALSE) #0 0x00007ffff4a538c3 in g_logv () at /lib64/libglib-2.0.so.0 #1 0x00007ffff4a53a3f in g_log () at /lib64/libglib-2.0.so.0 #2 0x00007ffff4a53d56 in g_warn_message () at /lib64/libglib-2.0.so.0 #3 0x00005555555b9dca in _set_state_full (self=0x5555559d2a40, state=NM_DEVICE_STATE_UNMANAGED, reason=NM_DEVICE_STATE_REASON_REMOVED, quitting=0) at devices/nm-device.c:8040 #4 0x0000555555626d7b in remove_device (manager=0x5555559631e0, device=0x5555559d2a40, quitting=0, allow_unmanage=<optimized out>) at nm-manager.c:801 #5 0x00007ffff28b7dac in ffi_call_unix64 () at /lib64/libffi.so.6 #6 0x00007ffff28b76d5 in ffi_call () at /lib64/libffi.so.6 #7 0x00007ffff4d4a628 in g_cclosure_marshal_generic () at /lib64/libgobject-2.0.so.0 #8 0x00007ffff4d49de8 in g_closure_invoke () at /lib64/libgobject-2.0.so.0 #9 0x00007ffff4d5b70d in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0 #10 0x00007ffff4d63471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #11 0x00007ffff4d63c78 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0 #12 0x00005555555ce4ea in do_emit_signal (platform=platform@entry=0x55555594c8b0, obj=0x555555a74c50, cache_op=NMP_CACHE_OPS_REMOVED, was_visible=<optimized out>, reason=reason@entry= NM_PLATFORM_REASON_INTERNAL) at platform/nm-linux-platform.c:1425 #13 0x00005555555ce826 in cache_prune_candidates_prune (platform=platform@entry=0x55555594c8b0) at platform/nm-linux-platform.c:1704 #14 0x00005555555d32d3 in do_request_link (platform=platform@entry=0x55555594c8b0, ifindex=ifindex@entry=85, name=name@entry=0x0, handle_delayed_action=handle_delayed_action@entry=0) at platform/nm-linux-platform.c:1951 #15 0x00005555555d356b in delayed_action_handle_all (ifindex=85, platform=0x55555594c8b0) at platform/nm-linux-platform.c:1491 #16 0x00005555555d356b in delayed_action_handle_all (platform=0x55555594c8b0) at platform/nm-linux-platform.c:1573 #17 0x00005555555d356b in delayed_action_handle_all (platform=platform@entry=0x55555594c8b0, read_netlink=read_netlink@entry=0) at platform/nm-linux-platform.c:1588 #18 0x00005555555d32e2 in do_request_link (platform=platform@entry=0x55555594c8b0, ifindex=ifindex@entry=7, name=name@entry=0x0, handle_delayed_action=handle_delayed_action@entry=1) at platform/nm-linux-platform.c:1954 #19 0x00005555555d5177 in do_change_link (platform=platform@entry=0x55555594c8b0, nlo=nlo@entry=0x55555597f0f0, complete_from_cache=complete_from_cache@entry=1) at platform/nm-linux-platform.c:2753 #20 0x00005555555d56b4 in link_enslave (platform=0x55555594c8b0, master=0, slave=7) at platform/nm-linux-platform.c:3141 #21 0x00005555555976de in release_slave (device=0x5555559d2a40, slave=0x5555559c6be0, configure=<optimized out>) at devices/nm-device-bond.c:437 #22 0x00005555555b7bc3 in nm_device_release_one_slave (self=self@entry=0x5555559d2a40, slave=0x5555559c6be0, configure=configure@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_CONNECTION_REMOVED) at devices/nm-device.c:1049 #23 0x00005555555b7f0e in nm_device_master_release_slaves (self=self@entry=0x5555559d2a40) at devices/nm-device.c:1781 #24 0x00005555555b9592 in nm_device_cleanup (self=0x5555559d2a40, reason=<optimized out>, deconfigure=1) at devices/nm-device.c:7752 #25 0x00005555555ba161 in _set_state_full (self=self@entry=0x5555559d2a40, state=state@entry=NM_DEVICE_STATE_DISCONNECTED, reason=reason@entry=NM_DEVICE_STATE_REASON_CONNECTION_REMOVED, quitting=quitting@entry=0) at devices/nm-device.c:8128 #26 0x00005555555bb297 in nm_device_state_changed (self=self@entry=0x5555559d2a40, state=state@entry=NM_DEVICE_STATE_DISCONNECTED, reason=reason@entry=NM_DEVICE_STATE_REASON_CONNECTION_REMOVED) at devices/nm-device.c:8319 #27 0x00005555555bd9a5 in queued_set_state (user_data=<optimized out>) at devices/nm-device.c:8343 #28 0x00007ffff4a4c79a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #29 0x00007ffff4a4cae8 in g_main_context_iterate.isra.24 () at /lib64/libglib-2.0.so.0 #30 0x00007ffff4a4cdba in g_main_loop_run () at /lib64/libglib-2.0.so.0 #31 0x000055555559556f in main (argc=1, argv=0x7fffffffdb88) at main.c:518
* device: split IP config changes signal handling to IPv4 and IPv6Jiří Klimeš2015-06-241-26/+87
| | | | So that we don't process IPv4 changes for IPv6 and vice versa.
* device: split ensure_ipx_config() into IPv4 and IPv6 (bgo #751430)Jiří Klimeš2015-06-241-10/+26
| | | | | | | | | | | | | | | | Without that we can remove addresses from con-ip6-config due to external changes *before* it is applied and thus manual IPv6 addresses are not applied together with ipv6.method=auto. Testcase: $ nmcli con add type ether con-name AAA ifname eth0 autoconnect no $ nmcli con mod AAA ipv4.addresses 1.1.1.1/24 ipv6.addresses 99::99/64 $ nmcli con up AAA Fixes:Beaker:NetworkManager_Test37_run_once_new_connection Fixes:Beaker:NetworkManager_Test84_ipv6_addresses_no_when_static_switch_asked https://bugzilla.gnome.org/show_bug.cgi?id=751430
* platform: (trivial) rename @managed to @unmanaged in link_get_unmanaged()Jiří Klimeš2015-06-243-11/+10
| | | | | | | It returns unmanaged state (reads NM_UNMANAGED from udev), so "managed" was very misleading. Fixes: 85ee1f4a9c04cad8f2486f858efd5ca10cb09077
* platform: prettify and line-wrap route_to_string() print statementsThomas Haller2015-06-231-6/+25
|
* route-manager/logging: fix wording in logging statementThomas Haller2015-06-231-1/+1
|
* test: add NMTST_BUSY_WAIT() utilThomas Haller2015-06-231-0/+12
|
* examples: python: add an D-Bus example creating and activating a bondJiří Klimeš2015-06-232-1/+116
|
* examples: add wifi-hotspot.py script to Makefile.amJiří Klimeš2015-06-231-1/+2
| | | | Fixes: 1af8e2f132f64a9f3c012a57f4b67422ccf62ad5
* nmcli: don't hang activation of masters that progress beyond ip-configLubomir Rintel2015-06-231-1/+1
| | | | | | Some master connetions are able to progress beyond activating/ip-config -- the slaves might have appeared during the activation, or the connection doesn't need slaves to obtain the configuration (it could be method=manual or shared).
* manager: fix a typo when iterating possible master connectionLubomir Rintel2015-06-221-1/+1
| | | | | | | Compare against the interface of the candidate master connection, not the slave connection itself. Fixes: 179d56c73c35e83368589b40a8a2d429b41a4dbf
* platform: g_hash_table_add doesn't return a value before 2.40Lubomir Rintel2015-06-221-0/+4
|
* glib-compat: include string.hLubomir Rintel2015-06-221-0/+1
| | | | Needed for memmove().
* platform: fix build on 32-bit systemsLubomir Rintel2015-06-221-5/+5
| | | | | The decimal literals are signed by default and these are too large to fit in a signed 32-bit int.
* trivial: fix spelling error in code commentThomas Haller2015-06-211-1/+1
|
* platform: don't assert for valid ifindex in nm_platform_link_get()Thomas Haller2015-06-211-12/+13
| | | | | | | It's not uncommon to lookup a platform parameter with invalid ifindex or ifname. Be more resilient and just return "no link found". Fixes: e8e455817b340f60b396ba5d41425ed4de4c8554
* platform: refactor virtual methods for link objects in NMPlatformThomas Haller2015-06-2113-537/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change nm_platform_link_get() to return the cached NMPlatformLink instance. Now what all our implementations (fake and linux) have such a cache internal object, let's just expose it directly. Note that the lifetime of the exposed link object is possibly quite short. A caller must copy the returned value if he intends to preserve it for later. Also add nm_platform_link_get_by_ifname() and modify nm_platform_link_get_by_address() to return the instance. Certain functions, such as nm_platform_link_get_name(), nm_platform_link_get_ifindex(), etc. are solely implemented based on looking at the returned NMPlatformLink object. No longer implement them as virtual functions but instead implement them in the base class (nm-platform.c). This removes code and eliminates the redundancy of the exposed NMPlatformLink instance and the nm_platform_link_get_*() accessors. Thereby also fix a bug in NMFakePlatform that tracked the link address in a separate "address" field, instead of using "link.addr". That was a case where the redundancy actually led to a bug in fake platform. Also remove some stub implementations in NMFakePlatform that just bail out. Instead allow for a missing virtual functions and perform the "default" action in the accessor. An example for that is nm_platform_link_get_permanent_address().
* nmp-object: check for non-empty ifname in _vt_cmd_obj_is_visible_link()Thomas Haller2015-06-201-1/+3
|
* platform: fix ip4_check_reinstall_device_route() implementationThomas Haller2015-06-191-11/+46
| | | | | | | | | | | We must check if a conflicting route/address is configured on *any* interface, not only on the target ifindex. This at least restores the previous behavior. Note that this whole check_reinstall_device_route() still has problems and it might be better to move it all to NMRouteManager. Fixes: 470bcefa5f259cb752660ac0069afe22dee8052e
* platform/trivial: rename ObjectType to NMPObjectTypeThomas Haller2015-06-194-138/+138
| | | | | | | After doing all the refactoring, rename the ObjectType enum to NMPObjectType. I didn't do this earlier to avoid problems with rebasing. But since I will backport the platform changes to nm-1-0, this is the right time to get the name right.
* platform: add nm_platform_process_events() functionThomas Haller2015-06-193-0/+28
|
* trivial: move some code around in nm-device.cDan Williams2015-06-191-23/+23
|
* all: fix additional compiler warningis about function declarationsJiří Klimeš2015-06-194-4/+4
| | | | | | | | | warning: function declaration isn’t a prototype [-Wstrict-prototypes] In C function() and function(void) are two different prototypes (as opposed to C++). function() accepts an arbitrary number of arguments function(void) accepts zero arguments
* merge: activate slaves when master is activated (bgo #735052) (rh #1158529)Jiří Klimeš2015-06-199-7/+287
|\ | | | | | | | | | | | | | | | | When a master connection is activated, check all its slaves and decide whether they should be activated as well. This is done according to the connection.autoconnect-slaves property. https://bugzilla.gnome.org/show_bug.cgi?id=735052 https://bugzilla.redhat.com/show_bug.cgi?id=1158529
| * man: mention that connection.autoconnect-slaves property supports default valueJiří Klimeš2015-06-191-0/+4
| |
| * core: activate slaves when master is activated (bgo #735052) (rh #1158529)Jiří Klimeš2015-06-191-0/+124
| | | | | | | | | | | | | | | | | | When a master connection is activated, check all its slaves and decide whether they should be activated as well. This is done according to the autoconnect-slaves property. https://bugzilla.gnome.org/show_bug.cgi?id=735052 https://bugzilla.redhat.com/show_bug.cgi?id=1158529
| * cli: add support for connection.autoconnect-slaves propertyJiří Klimeš2015-06-191-6/+58
| |
| * ifcfg-rh: read/write autoconnect-slaves property as AUTOCONNECT_SLAVESJiří Klimeš2015-06-193-2/+18
| | | | | | | | | | | | | | | | AUTOCONNECT_SLAVES is an NetworkManager extension. initscripts always activate slaves with the master connection for bond and team, and doesn't activate automatically slaves for bridge. NetworkManager behaviour is controlled by this variable. If the variable is missing the default value from configuration file is used.
| * libnm: add autoconnect-slaves property to NMSettingConnectionJiří Klimeš2015-06-194-0/+84
|/ | | | | | | | The property is used for controlling whether slaves should be brought up with a master connection. If 0, activating the master will not activate slaves. But if set to 1, activating the master will bring up slaves as well. The property can have the third state (-1), meaning that the value is default. That is either a value set in the configuration file for the property, or 0.
* vxlan: o.fd.NM.Device.Proxy is a booleanLubomir Rintel2015-06-181-1/+1
|