1. 20 Nov, 2018 2 commits
    • Beniamino Galvani's avatar
      cli: wait for changed signal after updating a connection · a370faeb
      Beniamino Galvani authored
      In editor_menu_main(), after saving a connection we wait that the
      Update2() D-Bus call returns and then we copy the NMRemoteConnection
      instance over to @connection.
      
      This assumes that when Update2() returns the remote connection
      instance is already updated with new settings. Indeed, on server side
      the NMSettingsConnection first emits the "Updated" signal and then
      returns to Update2(). However, the Updated signal doesn't include the
      new setting values and so libnm has to fire an asynchronous
      nmdbus_settings_connection_call_get_setting() to fetch the new
      settings, which terminates after the Update2().
      
      So, to be sure that the remote connection got updated we have also to
      listen to the connection-changed signal, which is always emitted after
      an update.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1546805
      a370faeb
    • Beniamino Galvani's avatar
      cli: editor: reload secrets after updating connection · 096eef61
      Beniamino Galvani authored
      Connection secrets are lost after calling
      nm_connection_replace_settings_from_connection() because @con_tmp
      doesn't contain secrets; refetch them like we do when starting the
      editor.
      096eef61
  2. 22 Oct, 2018 1 commit
  3. 11 Oct, 2018 1 commit
    • Beniamino Galvani's avatar
      cli: check we have an active connection before showing hint · c0fc85f3
      Beniamino Galvani authored
      If the activation fails even before the active connection instance is
      created, we get the following:
      
       $ nmcli connection up vpn1
       libnm-CRITICAL **: nm_active_connection_get_connection: assertion 'NM_IS_ACTIVE_CONNECTION (connection)' failed
       nmcli-CRITICAL **: active_connection_hint: assertion 'connection' failed
       Error: Connection activation failed: Not authorized to control networking.
      
      Check that we have an active connection before showing the hint.
      
      Fixes: bc6c042d
      c0fc85f3
  4. 10 Oct, 2018 5 commits
  5. 09 Oct, 2018 2 commits
  6. 07 Oct, 2018 1 commit
  7. 01 Oct, 2018 1 commit
  8. 21 Sep, 2018 1 commit
  9. 20 Sep, 2018 1 commit
  10. 15 Sep, 2018 1 commit
  11. 14 Sep, 2018 2 commits
  12. 27 Aug, 2018 2 commits
    • Beniamino Galvani's avatar
      cli: fix autocompletion for connection commands · d868788e
      Beniamino Galvani authored
      Autocompletion doesn't work in some cases because we present a prompt
      ending with ":", but compare it with the string without ":" in the
      autocomplete function. Fix this.
      
      While at it, also add missing colon after prompt where needed.
      d868788e
    • Beniamino Galvani's avatar
      cli: fix connection type completion on connection add · 16693771
      Beniamino Galvani authored
      The array returned by the completion function follows a special
      convention. If the first element is set, it is used as the
      completion. Otherwise, the remaining entries are the possible
      completions.
      
      _meta_abstract_complete() just returned an array of matching words and
      so the first element was always used as completion. Instead, we must
      use rl_completion_matches() to generate the array passing a generator
      function.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1588952
      16693771
  13. 11 Aug, 2018 2 commits
  14. 10 Aug, 2018 1 commit
    • Thomas Haller's avatar
      libnm, cli, ifcfg-rh: add NMSettingEthtool setting · df30651b
      Thomas Haller authored
      Note that in NetworkManager API (D-Bus, libnm, and nmcli),
      the features are called "feature-xyz". The "feature-" prefix
      is used, because NMSettingEthtool possibly will gain support
      for options that are not only -K|--offload|--features, for
      example -C|--coalesce.
      
      The "xzy" suffix is either how ethtool utility calls the feature
      ("tso", "rx"). Or, if ethtool utility specifies no alias for that
      feature, it's the name from kernel's ETH_SS_FEATURES ("tx-tcp6-segmentation").
      If possible, we prefer ethtool utility's naming.
      
      Also note, how the features "feature-sg", "feature-tso", and
      "feature-tx" actually refer to multiple underlying kernel features
      at once. This too follows what ethtool utility does.
      
      The functionality is not yet implemented server-side.
      df30651b
  15. 25 Jul, 2018 2 commits
  16. 11 Jul, 2018 2 commits
    • Beniamino Galvani's avatar
      a2f12994
    • Thomas Haller's avatar
      all: don't use gchar/gshort/gint/glong but C types · e1c7a2b5
      Thomas Haller authored
      We commonly don't use the glib typedefs for char/short/int/long,
      but their C types directly.
      
          $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l
          587
          $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l
          21114
      
      One could argue that using the glib typedefs is preferable in
      public API (of our glib based libnm library) or where it clearly
      is related to glib, like during
      
        g_object_set (obj, PROPERTY, (gint) value, NULL);
      
      However, that argument does not seem strong, because in practice we don't
      follow that argument today, and seldomly use the glib typedefs.
      Also, the style guide for this would be hard to formalize, because
      "using them where clearly related to a glib" is a very loose suggestion.
      
      Also note that glib typedefs will always just be typedefs of the
      underlying C types. There is no danger of glib changing the meaning
      of these typedefs (because that would be a major API break of glib).
      
      A simple style guide is instead: don't use these typedefs.
      
      No manual actions, I only ran the bash script:
      
        FILES=($(git ls-files '*.[hc]'))
        sed -i \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>  /\1   /g' \
            -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \
            "${FILES[@]}"
      e1c7a2b5
  17. 09 Jul, 2018 6 commits
  18. 26 Jun, 2018 2 commits
  19. 21 Jun, 2018 1 commit
  20. 13 Jun, 2018 1 commit
    • Lubomir Rintel's avatar
      cli: drop an unused variable · 2a7a3649
      Lubomir Rintel authored
      clients/cli/connections.c:1909:3: error: unused variable 'out_indices' [-Werror,-Wunused-variable]
                      NMC_OUTPUT_DATA_DEFINE_SCOPED (out);
                      ^
      2a7a3649
  21. 11 Jun, 2018 3 commits