1. 17 Sep, 2018 2 commits
  2. 15 Sep, 2018 1 commit
  3. 14 Sep, 2018 2 commits
    • Thomas Haller's avatar
      libnm: drop API nm_connection_get_setting_{6lowpan,sriov,wpan}() · fe866fbe
      Thomas Haller authored
      Note that NMSettingEthtool and NMSettingMatch don't have such
      functions either.
      
      We have API
      
        nm_connection_get_setting (NMConnection *, GType)
        nm_connection_get_setting_by_name (NMConnection *, const char *)
      
      which can be used generically, meaning: the requested setting type
      is an argument to the function. That is generally more useful and
      flexible.
      
      Don't add API which duplicates existing functionality and is (arguably)
      inferiour. Drop it now. This is an ABI/API break for the current development
      cycle where the 1.14.0 API is still unstable. Indeed it's already after
      1.14-rc1, which is ugly. But it's also unlikely that somebody already uses
      this API/ABI and is badly impacted by this change.
      
      Note that nm_connection_get_setting() and nm_connection_get_setting_by_name()
      are slightly inconvenient in C still, because they usually require a cast.
      We should fix that by changing the return type to "void *". Such
      a change may be possibly any time without breaking API/ABI (almost, it'd
      be an API change when taking a function pointer without casting).
      
      (cherry picked from commit a10156f5)
      fe866fbe
    • Thomas Haller's avatar
      libnm: drop API nm_connection_get_setting_{6lowpan,sriov,wpan}() · a10156f5
      Thomas Haller authored
      Note that NMSettingEthtool and NMSettingMatch don't have such
      functions either.
      
      We have API
      
        nm_connection_get_setting (NMConnection *, GType)
        nm_connection_get_setting_by_name (NMConnection *, const char *)
      
      which can be used generically, meaning: the requested setting type
      is an argument to the function. That is generally more useful and
      flexible.
      
      Don't add API which duplicates existing functionality and is (arguably)
      inferiour. Drop it now. This is an ABI/API break for the current development
      cycle where the 1.14.0 API is still unstable. Indeed it's already after
      1.14-rc1, which is ugly. But it's also unlikely that somebody already uses
      this API/ABI and is badly impacted by this change.
      
      Note that nm_connection_get_setting() and nm_connection_get_setting_by_name()
      are slightly inconvenient in C still, because they usually require a cast.
      We should fix that by changing the return type to "void *". Such
      a change may be possibly any time without breaking API/ABI (almost, it'd
      be an API change when taking a function pointer without casting).
      a10156f5
  4. 13 Sep, 2018 2 commits
  5. 12 Sep, 2018 2 commits
  6. 11 Sep, 2018 2 commits
    • 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
    • Andrew Zaborowski's avatar
      wifi/iwd: handle new GetOrderedNetworks() return type · 32506c87
      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
      32506c87
  7. 10 Sep, 2018 8 commits
  8. 08 Sep, 2018 1 commit
  9. 07 Sep, 2018 4 commits
  10. 06 Sep, 2018 3 commits
  11. 05 Sep, 2018 12 commits
    • Beniamino Galvani's avatar
      device: clear queued IP config sources when the device is unrealized · 9ed07fbb
      Beniamino Galvani authored
      If the device is later realized again, we assert that there aren't any
      IP config changes queued. Therefore, they must be cleared on
      unrealize().
      9ed07fbb
    • Thomas Haller's avatar
      wifi/iwd: fix tracking of IWD-side known networks · 09988689
      Thomas Haller authored
      - since commit d17d2688, a
        NMSettingsConnection no longer "is-a" NMConnection. Instead,
        we must call nm_settings_connection_get_connection() to obtain
        the NMConnection instance. Adjust this in mirror_8021x_connection()
      
      - don't leak "ssid" in mirror_8021x_connection()
      
      - move deletion of the mirror-connection to known_network_data_free().
        Previously, we must have made sure that every g_hash_table_remove()
        and g_hash_table_insert()(!!) first deletes the mirror connection.
        Likewise, in got_object_manager() when we call g_hash_table_remove_all(),
        delete created mirror connections.
      
      - rework interface_added() to make it robust against calling
        interface_added() more than once without removing the interface
        in between. Essentially, this just means that we first look into
        "priv->known_networks" to see whether the @id is already tracked.
        And if so, delete an existing mirror-connection as necessary.
      09988689
    • Thomas Haller's avatar
      wifi/iwd: various minor cleanups in nm-iwd-manager.c · 1181f88e
      Thomas Haller authored
      - prefer "gsize" instead of "size_t".
      1181f88e
    • Thomas Haller's avatar
      wifi/iwd: use NMHashState (siphash24) for hashing · ccf36ff4
      Thomas Haller authored
      We shall use nm_hash_*() functions everywhere where
      we need a hash for a dictionary.
      ccf36ff4
    • Thomas Haller's avatar
      wifi/iwd: in manager's interface_added() ensure known-network ID is not wrongly destroyed · be875fe3
      Thomas Haller authored
      Calling g_hash_table_insert() with a key which is already hashed
      will destroy the *new* key. Since @id is used below, that would
      be use after free.
      
      Fixes: d635caf9
      be875fe3
    • Andrew Zaborowski's avatar
      wifi/iwd: Create connections for IWD-side known networks · 2c816186
      Andrew Zaborowski authored
      IWD's mechanism for connecting to EAP networks requires a network config
      file to be present in IWD's storage.  NM and its clients however won't
      allow a connection to be attempted until a valid NMConnection is created
      on the NM side for the network.  To avoid duplicating the settings from
      the IWD-side profiles in NM, automatically create NMSettingConnections
      for EAP networks preconfigured on the IWD side, unless a matching
      connection already exists.  These connections will use the "external"
      EAP method to mean their EAP settings can't be modified through NM, also
      they won't be valid for devices configured to use the wpa_supplicant
      backend unfortunately.
      
      Those nm-generated connections can be modified by NM users (makes sense
      for settings not related to the wifi authentication) in which case they
      get saved as normal profiles and will not be recreated as nm-generated
      connections on the next run.
      
      I want to additionally handle deleting connections from NM clients so
      that they're also forgotten by IWD, in a later patch.
      2c816186
    • Andrew Zaborowski's avatar
      wifi: Move get_connection_iwd_security to nm-wifi-utils.c · 43ea446a
      Andrew Zaborowski authored
      Make this function public.  I'm not sure if at this point it makes
      much sense to add a new file for iwd-specific utilities.
      While there add a way for the function to return error if security
      type can't be mapped to an IWD-supported security type.
      43ea446a
    • Andrew Zaborowski's avatar
      wifi/iwd: Track known networks using interface-added/-removed signals · 142d83b0
      Andrew Zaborowski authored
      The known networks hash table is indexed by the (ssid, security) tuple
      for fast lookups both on DBus signals related to an IWD known network
      and local NMConnection signals such as on removal.
      142d83b0
    • Andrew Zaborowski's avatar
    • Andrew Zaborowski's avatar
      wifi/iwd: Drop nm_iwd_manager_network_connected · 2f941c07
      Andrew Zaborowski authored
      There's no need anymore for NMIwdManager to know when a network has been
      connected to, InterfaceAdded signals are now emitted when a network is
      saved as a Known Network.
      2f941c07
    • Andrew Zaborowski's avatar
      wifi/iwd: Drop usage of the KnownNetworks IWD API · eec61a8e
      Andrew Zaborowski authored
      Before 0.5 IWD has changed the known networks API to expose separate
      objects for each known network and dropped the KnownNetworks
      manager-like interface so stop using that interface.  Following
      patches will add tracking of the known networks through
      ObjectManager.
      eec61a8e
    • Andrew Zaborowski's avatar
      wifi/iwd: Check g_dbus_proxy_get_cached_property return values · f2be625a
      Andrew Zaborowski authored
      Instead of passing the return values to g_variant_get_string or
      g_variant_boolean and then checking the return value of that call,
      add wrappers that first check's whether the variant is non-NULL
      and of the right type.
      g_variant_get_string doesn't allow a NULL parameter and will also never
      return NULL according to the docs.
      
      For the State property we assume a state "unknown" and emit a warning
      if the property can't be read, "unknown" is also a string in IWD itself
      which would be returned if something went really wrong.  In any case
      this shouldn't happen.
      
      [thaller@redhat.com: fix missing initialization of nm_auto() variable
        interfaces.]
      f2be625a
  12. 30 Aug, 2018 1 commit