1. 06 Mar, 2017 1 commit
  2. 10 Feb, 2017 1 commit
  3. 08 Feb, 2017 1 commit
  4. 16 Jan, 2017 2 commits
  5. 10 Jan, 2017 1 commit
    • Beniamino Galvani's avatar
      platform: don't update IPv6 temporary addresses · 1dbd9d79
      Beniamino Galvani authored
      The kernel already takes care of adding and updating temporary
      addresses when an address with IFA_F_MANAGETEMPADDR flag is added or
      updated; doing it also in nm_platform_ip6_address_sync() can overwrite
      the changes done by kernel, especially because since commit
      0a0bca9c ("ip6-config: sort addresses only when reading the
      property value") there is no guarantee that temporary addresses are
      before the public ones in the IPv6 configuration.
      
      Still delete temporary addresses, but don't add or update them.
      1dbd9d79
  6. 04 Jan, 2017 1 commit
  7. 13 Dec, 2016 6 commits
  8. 05 Dec, 2016 1 commit
    • Beniamino Galvani's avatar
      platform: fix the order of addition of primary and secondary IPv4 addresses · 2f68a500
      Beniamino Galvani authored
      nm_platform_ip4_address_sync() tries to apply the new configuration
      with the minimum effort and doesn't delete addresses if they are
      already present on the interface. This can break the ordering, as an
      existing address would be promoted by kernel to primary, even if it
      was last in our configuration.
      
      Add some logic to ensure the correct order of addresses is always
      enforced. This fixes situations like:
      
       # nmcli connection add type ethernet ifname eth0 con-name t \
                              ipv4.method manual \
                              ipv4.addresses "1.1.1.1/24,1.1.1.2/24,1.1.1.5/24"
       # nmcli connection up t
      
        => addresses are applied in the right order:
           inet 1.1.1.1/24 brd 1.1.1.255 scope global eth0
           inet 1.1.1.2/24 brd 1.1.1.255 scope global secondary eth0
           inet 1.1.1.5/24 brd 1.1.1.255 scope global secondary eth0
      
       # nmcli connection mod t ipv4.addresses "1.1.1.5/24,1.1.1.2/24,1.1.1.1/24"
       # nmcli device reapply eth0
      
        => order is wrong:
           inet 1.1.1.2/24 brd 1.1.1.255 scope global eth0
           inet 1.1.1.5/24 brd 1.1.1.255 scope global secondary eth0
           inet 1.1.1.1/24 brd 1.1.1.255 scope global secondary eth0
      Co-Authored-By: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
      2f68a500
  9. 22 Nov, 2016 1 commit
  10. 22 Oct, 2016 2 commits
  11. 19 Oct, 2016 1 commit
    • Thomas Haller's avatar
      build: merge "src/Makefile.am" into toplevel Makefile · b219eb19
      Thomas Haller authored
      Had to rename "nm-enum-types.h" because it works badly with
      "libnm/nm-enum-types.h". Maybe I could fix that differently,
      but duplicate names is anyway error prone.
      
      Note that "nm-core-enum-types.h" is already taken too, so
      "nm-src-enum-types.h" it is.
      b219eb19
  12. 07 Oct, 2016 1 commit
  13. 03 Oct, 2016 2 commits
  14. 17 Aug, 2016 4 commits
  15. 05 Jul, 2016 2 commits
    • Thomas Haller's avatar
      device: tune down warning about failure to set userspace IPv6LL on non-existing device · e8518b2a
      Thomas Haller authored
      When a device gets removed externally, we still try to clear userspace IPv6LL address handling.
      That fails, due to non-existing device. Such a failure should not be logged as warning.
      
          <debug> [1467723214.2078] device[0x558c59335ca0] (enp0s25): disposing
          <debug> [1467723214.2079] device[0x558c59335ca0] (enp0s25): remove_pending_action (0): 'dhcp6' not pending (expected)
          <debug> [1467723214.2079] device[0x558c59335ca0] (enp0s25): remove_pending_action (0): 'autoconf6' not pending (expected)
          <debug> [1467723214.2079] device[0x558c59335ca0] (enp0s25): will disable userland IPv6LL
          <debug> [1467723214.2079] platform-linux: link: change 20: user-ipv6ll: set IPv6 address generation mode to eui64
          <trace> [1467723214.2080] platform-linux: delayed-action: schedule wait-for-nl-response (seq 92, timeout in 0.199998611)
          <trace> [1467723214.2080] platform-linux: delayed-action: schedule refresh-link (ifindex 20)
          <trace> [1467723214.2080] platform-linux: delayed-action: handle refresh-link (ifindex 20)
          <debug> [1467723214.2080] platform-linux: do-request-link: 20
          <trace> [1467723214.2080] platform-linux: netlink: recvmsg: new message type 2, seq 92
          <debug> [1467723214.2080] platform-linux: netlink: recvmsg: error message from kernel: No such device (19) for request 92
          <trace> [1467723214.2081] platform-linux: delayed-action: complete wait-for-nl-response (seq 92, timeout in 0.199895684, failure 19 (No such device))
          <trace> [1467723214.2081] platform-linux: delayed-action: schedule wait-for-nl-response (seq 93, timeout in 0.199999306)
          <trace> [1467723214.2081] platform-linux: delayed-action: handle wait-for-nl-response (any)
          <trace> [1467723214.2081] platform-linux: netlink: recvmsg: new message type 2, seq 93
          <debug> [1467723214.2081] platform-linux: netlink: recvmsg: error message from kernel: No such device (19) for request 93
          <trace> [1467723214.2082] platform-linux: delayed-action: complete wait-for-nl-response (seq 93, timeout in 0.199921142, failure 19 (No such device))
          <debug> [1467723214.2082] platform-linux: do-change-link[20]: failure changing link: failure 19 (No such device)
          <warn>  [1467723214.2082] device (enp0s25): failed to disable userspace IPv6LL address handling
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1323571
      e8518b2a
    • Thomas Haller's avatar
      core: don't warn when setting address of non-existing link · f9852821
      Thomas Haller authored
      Trying to set a property on a device that does not exist is not something
      necessarily wrong. Don't print error/warning messages.
      
          <trace> [1467707267.2887] device[0x55a74adbdaf0] (enp0s25): set-hw-addr: setting MAC address to 'AA:BB:CC:DD:EE:FF' (reset, unmanage)...
          <debug> [1467707267.2887] platform: link: setting '(null)' (2) hardware address
          <debug> [1467707267.2887] platform-linux: link: change 2: address: 68:F7:28:61:68:F7 (6 bytes)
          <debug> [1467707267.2887] platform-linux: do-request-link: 2
          <debug> [1467707267.2888] platform-linux: netlink: recvmsg: error message from kernel: No such device (19) for request 226
          <debug> [1467707267.2888] platform-linux: netlink: recvmsg: error message from kernel: No such device (19) for request 227
          <error> [1467707267.2888] platform-linux: do-change-link[2]: failure changing link: failure 19 (No such device)
          <warn>  [1467707267.2888] device (enp0s25): set-hw-addr: failed to reset MAC address to 68:F7:28:61:68:F7 (unmanage)
      f9852821
  16. 30 May, 2016 4 commits
  17. 28 Apr, 2016 5 commits
    • Thomas Haller's avatar
      platform: change order in which fields are compared in nm_platform_ip4_route_cmp() · d9331640
      Thomas Haller authored
      ..., nm_platform_ip6_route_cmp(), nm_platform_ip4_address_cmp() and
      nm_platform_ip6_address_cmp().
      
      Compare those fields first, for which we expect that their properties
      differ. E.g. usually, each route destination in a set is unique, thus by
      comparing those fields first we shortcut some comparisons.
      d9331640
    • Thomas Haller's avatar
      platform: refactor marking cloned routes in platform · e26fcce0
      Thomas Haller authored
      We handle cloned routes (that have rtm_flags RTM_F_CLONED) differently.
      We used to mark such routes by hacking NMIPConfigSource to have a special
      value. No longer do this, because it mixes different concepts.
      
      Note that the rt_cloned filed fits into a hole in the aligment
      of NMPlatformIPRoute. Thus there is almost no overhead to this
      change.
      e26fcce0
    • Thomas Haller's avatar
      platform: add nmp_utils_ip_config_source_to_string() · 9e833832
      Thomas Haller authored
      Expose nmp_utils_ip_config_source_to_string() in the header file and
      implement it via NM_UTILS_ENUM2STR_DEFINE().
      9e833832
    • Thomas Haller's avatar
      core/trivial: rename "source" field of addresses and routes · 6bf02235
      Thomas Haller authored
      The "source" field of NMPlatformIPRoute (now "rt_source") maps to the
      protocol field of the route. The source of NMPlatformIPAddress (now
      "addr_source") has no direct equivalent in the kernel.
      
      As their use is different, they should have different names. Also,
      the name "source" is used all over the place. Hence give the fields
      a more distinct name.
      6bf02235
    • Thomas Haller's avatar
      platform: sort links by ifindex in nm_platform_link_get_all() · 44753a59
      Thomas Haller authored
      This way, we get a defined order at startup.
      
      Also, get rid of the logging statements. It was used for
      debugging, but a "getter" really should not log the stuff it
      is returning.
      44753a59
  18. 20 Apr, 2016 4 commits