1. 01 Dec, 2018 1 commit
  2. 17 Nov, 2018 1 commit
    • Benjamin Berg's avatar
      core: Introduce helper class to track connection keep alive · 37e8c53e
      Benjamin Berg authored
      For P2P connections it makes sense to bind the connection to the status
      of the operation that is being done. One example is that a wifi display
      (miracast) P2P connection should be shut down when streaming fails for
      some reason.
      
      This new helper class allows binding a connection to the presence of a
      DBus path meaning that it will be torn down if the process disappears.
      37e8c53e
  3. 15 Nov, 2018 1 commit
  4. 12 Nov, 2018 2 commits
    • Thomas Haller's avatar
      build: create intermediate libraries of shared/nm-utils · 70c4e49c
      Thomas Haller authored
      Previously we would compile source files from shared/nm-utils
      multiple times. That not only slows down compilation, but it makes it
      confusing which project require exactly what.
      
      Most of the files in shared/nm-utils are a mixed bag of utility
      functions. Just build one libnm-utils-base library. Since the linker
      will throw away unused parts, there is no problem that not every user
      of libnm-utils-base needs everything.
      
      Also add libnm-utils-udev, which cannot be part of libnm-utils-base as
      it has an additional dependency on libudev.
      70c4e49c
    • Thomas Haller's avatar
      build: move code for shared libs in Makefile.am around · 06ccf3a6
      Thomas Haller authored
      Let's sort the code by the dependencies. The shared/ projects
      have the least dependencies. Move to the beginning.
      06ccf3a6
  5. 25 Oct, 2018 2 commits
  6. 24 Oct, 2018 2 commits
  7. 23 Oct, 2018 1 commit
    • Thomas Haller's avatar
      core: add "nm-sd-utils.h" to access system internal helper · eece5aff
      Thomas Haller authored
      We have a fork of a lot of useful systemd helper code.
      However, until now we shyed away from using it aside from
      the bits that we really need.
      
      That means, although we have some really nice implementations
      in our source-tree, we didn't use them. Either we were missing
      them, or we had to re-implement them.
      
      Add "nm-sd-utils.h" header to very carefully make internal
      systemd API accessible to the rest of core.
      
      This is not intended as a vehicle to access all of internal
      API. Instead, this must be used with care, and only a hand picked
      selection of functions must be exposed. Use with caution, but where it
      makes sense.
      eece5aff
  8. 18 Oct, 2018 2 commits
    • Thomas Haller's avatar
      shared/tests: add test for "shared/nm-utils" · dfdbd1b3
      Thomas Haller authored
      "shared/nm-utils" is a loose collection of utility functions.
      There is a certain aim that they can be used independently.
      However, they also rely on each other.
      
      Add a test that we can build a minimal shared library with
      these tools, independent of libnm-core.
      dfdbd1b3
    • Thomas Haller's avatar
      shared: move nm_utils_get_monotonic_timestamp*() to shared/nm-utils. · a6add817
      Thomas Haller authored
      This is independent functionality that only depends on linux API
      and glib.
      
      Note how "nm-logging" uses this for getting the timestamps. This
      makes "nm-logging.c" itself dependen on "src/nm-core-utils.c",
      for little reason.
      a6add817
  9. 12 Oct, 2018 1 commit
    • Michael Biebl's avatar
      systemd: don't make NetworkManager D-Bus activatable · 90f71c0f
      Michael Biebl authored
      If the NetworkManager daemon has been stopped manually we don't want it
      to be autostarted by a client request.
      
      [lkundrak@v3.sk: The auto-activation is probably more surprising than useful.
      Services that need NetworkManager API should depend on NetworkManager service
      directly.
      
      I have no idea what purpose does the D-Bus service file serve nowadays,
      but it looks rather hacky (really, activating /bin/false) and the comment
      in it suggests that the autoactivating behavior was not intended anyway.
      Debian has been shipping this for quite some time and no complains have been
      heard.]
      
      https://github.com/NetworkManager/NetworkManager/pull/230
      90f71c0f
  10. 27 Sep, 2018 1 commit
    • Thomas Haller's avatar
      acd: make NMAcdManager no GObject · 7729555a
      Thomas Haller authored
      NMAcdManager is a rather simple instance.
      
      It does not need (thread-safe) ref-counting, in fact, having
      it ref-counted makes it slighly ugly that we connect a signal,
      but never bother to disconnect it (while the ref-counted instance
      could outlife the signal subscriber).
      
      We also don't need GObject signals. They have more overhead
      and are less type-safe than a regular function pointers. Signals
      would make sense, if there could be multiple independent listeners,
      but that just doesn't make sense.
      
      Implementing it as a plain struct is less lines of code, and less
      runtime over head.
      
      Also drop the possiblitiy to reset the NMAcdManager instance.
      It wasn't needed and I think it was buggy because it wouldn't
      reset the n-acd instance.
      
      https://github.com/NetworkManager/NetworkManager/pull/213
      7729555a
  11. 19 Sep, 2018 1 commit
  12. 18 Sep, 2018 6 commits
    • Lubomir Rintel's avatar
      initrd: add configuration generator · 9f960955
      Lubomir Rintel authored
      nm-initrd-generator scans the command line for options relevant to network
      configuration and creates configuration files for an early instance of
      NetworkManager run from the initial ramdisk during early boot.
      9f960955
    • Lubomir Rintel's avatar
      initrd: add command line parser · ecc074b2
      Lubomir Rintel authored
      ecc074b2
    • Lubomir Rintel's avatar
      initrd: add iBFT reader · b544f724
      Lubomir Rintel authored
      This is loosely based on nms-ibft-reader, but with some significant
      changes. Notably, it parses /sys/firmware/ibft directly instead of
      iscsiadm output.
      
      iscsiadm is not available on early boot (perhaps it's too large) and
      turns out that parsing sysfs directly is easier and more
      straightforwared anyways. A win-win situation.
      
      It is not useful alone, it's in a separate commit just for the sake of
      easier review.
      b544f724
    • Beniamino Galvani's avatar
      build: allow disabling eBPF support in n-acd · 691c71a7
      Beniamino Galvani authored
      Add a configure option to disable eBPF support in n-acd.
      
      Note that, even if eBPF is not supported, n-acd requires a kernel >
      3.19, which means that the setsockopt(..., SO_ATTACH_BPF) option must
      be defined. To allow building on older kernels without modifying the
      n-acd code, we inject the SO_ATTACH_BPF value as a preprocessor define
      in the compiler the command line.
      691c71a7
    • Beniamino Galvani's avatar
      acd: adapt NM code and build options · d9a4b59c
      Beniamino Galvani authored
      Adapt the nm-acd-manager.c code to the new API and also tweak build
      options to the new project structure.
      d9a4b59c
    • Beniamino Galvani's avatar
      build: compile the c-rbtree library · 88072c66
      Beniamino Galvani authored
      88072c66
  13. 13 Sep, 2018 6 commits
  14. 04 Sep, 2018 5 commits
    • Thomas Haller's avatar
      build: enable building both crypto backends for tests · e01f7f2c
      Thomas Haller authored
      If the library is available, let's at least compile both
      crypto backends.
      
      That is helpful when developing on crypto backends, so that
      one does not have to configure the build twice.
      
      With autotools, the build is only run during `make check`.
      Not for meson, but that is generally the case with our meson
      setup, that it also builds tests during the regular build step.
      e01f7f2c
    • Thomas Haller's avatar
      libnm/crypto: add header "nm-crypto-impl.h" for crypto implementation · 64350408
      Thomas Haller authored
      There are two aspects: the public crypto API that is provided by
      "nm-crypto.h" header, and the internal header which crypto backends
      need to implement. Split them.
      64350408
    • Thomas Haller's avatar
      libnm/crypto: rename libnm's crypto files · 4106f296
      Thomas Haller authored
      "crypto.h" did not follow our common NM style naming. Rename
      the files.
      4106f296
    • Thomas Haller's avatar
      shared: add "nm-io-utils.h" · 6ee7453b
      Thomas Haller authored
      6ee7453b
    • Thomas Haller's avatar
      shared: add nm-secret-utils.h helper · b2325087
      Thomas Haller authored
      We already had nm_free_secret() to clear the secret out
      of a NUL terminated string. That works well for secrets
      which are strings, it can be used with a cleanup attribute
      (nm_auto_free_secret) and as a cleanup function for a
      GBytes.
      
      However, it does not work for secrets which are binary.
      For those, we must also track the length of the allocated
      data and clear it.
      
      Add two new structs NMSecretPtr and NMSecretBuf to help
      with that.
      b2325087
  15. 28 Aug, 2018 1 commit
  16. 11 Aug, 2018 2 commits
  17. 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
  18. 06 Aug, 2018 2 commits
  19. 26 Jul, 2018 1 commit
    • Lubomir Rintel's avatar
      build: add a some missing dependencies · 457a2338
      Lubomir Rintel authored
        CC       src/devices/ovs/src_devices_ovs_libnm_device_plugin_ovs_la-nm-device-ovs-bridge.lo
        In file included from src/devices/ovs/nm-device-ovs-bridge.c:20:
        In file included from ./shared/nm-default.h:307:
        In file included from ./src/nm-logging.h:25:
        ./libnm-core/nm-core-types.h:28:10: fatal error: 'nm-core-enum-types.h' file not found
        #include "nm-core-enum-types.h"
                 ^~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
      
        CC       src/settings/plugins/ifupdown/src_settings_plugins_ifupdown_libnms_ifupdown_core_la-nms-ifupdown-interface-parser.lo
        In file included from src/settings/plugins/ifupdown/nms-ifupdown-interface-parser.c:23:
        In file included from ./shared/nm-default.h:307:
        In file included from ./src/nm-logging.h:25:
        ./libnm-core/nm-core-types.h:28:10: fatal error: 'nm-core-enum-types.h' file not found
        #include "nm-core-enum-types.h"
                 ^~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
        make: *** [Makefile:13904: src/settings/plugins/ifupdown/src_settings_plugins_ifupdown_libnms_ifupdown_core_la-nms-ifupdown-interface-parser.lo] Error 1
      457a2338
  20. 25 Jul, 2018 1 commit
    • Thomas Haller's avatar
      cli/tests: rework clients-tests.py to combine .expected output · 795ec17a
      Thomas Haller authored
      Instead of letting each nmcli run write an individual .expected file,
      combine the output of multiple runs in one file (per test).
      
      Advantages:
      
      - since there is a very large number of tests, having a file for each
        tests is cumbersome. For example, since they are all added to
        $(EXTRA_DIST) (and since we use non-recursive make), autoconf can
        easily hit a length limit when processing all the file names.
      
      - previously, whenever we added tests, all .expected files shifted
        and the diff was large. Now, there is a chance that the diff is
        smaller and more accurate.
      795ec17a