1. 13 Sep, 2018 7 commits
  2. 12 Sep, 2018 11 commits
  3. 11 Sep, 2018 3 commits
    • Thomas Haller's avatar
      ppp-manager: avoid crash with nonexisting link in impl_ppp_manager_set_ifindex() · 7c50748d
      Thomas Haller authored
      Fixes: dd98ada3
      (cherry picked from commit 30a469e0)
      7c50748d
    • Frederic Danis's avatar
      ppp-manager: fix pppd not exiting correctly on modem hangup · b3ca8abe
      Frederic Danis authored
      When unplugging an USB 3G modem device, pppd does not exit correctly and
      we have the following traces:
      
      Sep 10 07:58:24.616465 ModemManager[1158]: <info>  (tty/ttyUSB0): released by device '/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb4/4-1'
      Sep 10 07:58:24.620314 pppd[2292]: Modem hangup
      Sep 10 07:58:24.621368 ModemManager[1158]: <info>  (tty/ttyUSB1): released by device '/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/usb4/4-1'
      Sep 10 07:58:24.621835 ModemManager[1158]: <warn>  (ttyUSB1): could not re-acquire serial port lock: (5) Input/output error
      Sep 10 07:58:24.621358 NetworkManager[1871]: <debug> ppp-manager: set-ifindex 4
      Sep 10 07:58:24.621369 NetworkManager[1871]: <warn>  ppp-manager: can't change the ifindex from 4 to 4
      Sep 10 07:58:24.623982 NetworkManager[1871]: <info>  device (ttyUSB0): state change: activated -> unmanaged (reason 'removed', sys-iface-state: 'removed')
      Sep 10 07:58:24.624411 NetworkManager[1871]: <debug> kill child process 'pppd' (2292): wait for process to terminate after sending SIGTERM (15) (send SIGKILL in 1500 milliseconds)...
      Sep 10 07:58:24.624440 NetworkManager[1871]: <debug> modem-broadband[ttyUSB0]: notifying ModemManager about the modem disconnection
      Sep 10 07:58:24.626591 NetworkManager[1871]: <debug> modem-broadband[ttyUSB0]: notifying ModemManager about the modem disconnection
      Sep 10 07:58:24.681016 NetworkManager[1871]: <warn>  modem-broadband[ttyUSB0]: failed to disconnect modem: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.ModemManager1.Modem.Simple' on object at path /org/freedesktop/ModemManager1/Modem/0
      Sep 10 07:58:26.126817 NetworkManager[1871]: <debug> kill child process 'pppd' (2292): process not terminated after 1502368 usec. Sending SIGKILL signal
      Sep 10 07:58:26.128121 NetworkManager[1871]: <info>  device (ppp0): state change: disconnected -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
      Sep 10 07:58:26.135571 NetworkManager[1871]: <debug> kill child process 'pppd' (2292): terminated by signal 9 (1511158 usec elapsed)
      
      This is due to nm-ppp-plugin waiting on SetIfIndex call until timeout,
      which is longer than termination process timeout.
      
      Calling g_dbus_method_invocation_return_value() on error fixes this.
      
      Fixes: dd98ada3
      
      https://mail.gnome.org/archives/networkmanager-list/2018-September/msg00010.html
      (cherry picked from commit e66e4d0e)
      b3ca8abe
    • Andrew Zaborowski's avatar
      wifi/iwd: handle new GetOrderedNetworks() return type · 592ee02e
      Andrew Zaborowski authored
      The Station.GetOrderedNetworks dbus method's return type has changed in
      IWD commit 0a42f63d42be903a46c595693884772c1c84d39f as the last incompatible
      API change before IWD 0.8 (docs change was made earlier in
      0453308134a3aadb6a2ec6a78ea642e19427704c) so that network names and
      types are no longer included in the reply.  Expect this new reply
      signature although still handle the old signature if we're using the
      Device interface for IWD <= 0.7 compatibility.
      
      It may be good idea to eventually pass the object manager instance from
      nm-iwd-manager.c to nm-device-iwd.c to avoid using g_dbus_proxy_new_sync
      and g_dbus_proxy_new_for_bus_sync in act_stage2_config, which possibly
      generates a lot of DBus property queries.
      
      https://github.com/NetworkManager/NetworkManager/pull/197
      (cherry picked from commit 32506c87)
      592ee02e
  4. 10 Sep, 2018 5 commits
  5. 08 Sep, 2018 3 commits
  6. 07 Sep, 2018 11 commits
    • Thomas Haller's avatar
      shared: change nm_utils_strbuf_seek_end() handling truncated strings · c3808550
      Thomas Haller authored
      Ok, I changed my mind.
      
      The new behavior seems to make more sense to me. Not that it matters,
      because we always use nm_utils_strbuf*() API with buffers that we expect
      to be large enough to contain the result. And when truncation occurs,
      we usually don't care much about it. That is, there is no code that
      uses nm_utils_strbuf*() API and handles string truncation in particular.
      c3808550
    • Thomas Haller's avatar
    • Andrew Zaborowski's avatar
      wifi/iwd: add new DBus interface name defines · 61856836
      Andrew Zaborowski authored
      New IWD DBus interfaces added before 0.4 and before 0.8
      61856836
    • Andrew Zaborowski's avatar
      wifi/iwd: use NM_IN_STRSET for strings · 436c2a1c
      Andrew Zaborowski authored
      NM_IN_SET will only compare string pointers and isn't useful for
      checking if nm_setting_wireless_get_mode (s_wifi) is infrastructure.
      
      Fixes: 570e1fa7
      436c2a1c
    • Andrew Zaborowski's avatar
      wifi/iwd: fix leaking agent DBus objects · 910dc39c
      Andrew Zaborowski authored
      Make sure we free our IWD agent objects whenever we're freeing the
      IWD Object Manager.  We're registering those objects on the same DBus
      connection as the Object Manager so that they're visible to IWD, and
      our only reference to that connection is through priv->object_manager
      so even though the connection isn't changing when we free the object
      manager and create a new one, we still need to free the agent object.
      We could maybe keep a reference to the connection, but I'm not sure
      there's any warranty that it doesn't get closed.  We could also use
      nm_dbus_manager_get_connection (nm_dbus_manager_get ()) and only
      register and free the agent once, since it happens to be the same
      connection but it'd perhaps be a hack to rely on this.
      910dc39c
    • Thomas Haller's avatar
      release: update NEWS · 1df7ed0c
      Thomas Haller authored
      1df7ed0c
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      ec17242f
    • Thomas Haller's avatar
      platform/wireguard: rework parsing wireguard links in platform · 62d14e18
      Thomas Haller authored
      - previously, parsing wireguard genl data resulted in memory corruption:
      
        - _wireguard_update_from_allowedips_nla() takes pointers to
      
            allowedip = &g_array_index (buf->allowedips, NMWireGuardAllowedIP, buf->allowedips->len - 1);
      
          but resizing the GArray will invalidate this pointer. This happens
          when there are multiple allowed-ips to parse.
      
        - there was some confusion who owned the allowedips pointers.
          _wireguard_peers_cpy() and _vt_cmd_obj_dispose_lnk_wireguard()
          assumed each peer owned their own chunk, but _wireguard_get_link_properties()
          would not duplicate the memory properly.
      
      - rework memory handling for allowed_ips. Now, the NMPObjectLnkWireGuard
        keeps a pointer _allowed_ips_buf. This buffer contains the instances for
        all peers.
        The parsing of the netlink message is the complicated part, because
        we don't know upfront how many peers/allowed-ips we receive. During
        construction, the tracking of peers/allowed-ips is complicated,
        via a CList/GArray. At the end of that, we prettify the data
        representation and put everything into two buffers. That is more
        efficient and simpler for user afterwards. This moves complexity
        to the way how the object is created, vs. how it is used later.
      
      - ensure that we nm_explicit_bzero() private-key and preshared-key. However,
        that only works to a certain point, because our netlink library does not
        ensure that no data is leaked.
      
      - don't use a "struct sockaddr" union for the peer's endpoint. Instead,
        use a combintation of endpoint_family, endpoint_port, and
        endpoint_addr.
      
      - a lot of refactoring.
      62d14e18
    • Thomas Haller's avatar
      platform/trivial: rename local variables for nla_policy/nlattr · cb23779e
      Thomas Haller authored
      We have such variables with similar purpose at various places.
      Name them all the same.
      cb23779e
    • Thomas Haller's avatar