1. 28 May, 2019 1 commit
  2. 12 Apr, 2019 1 commit
  3. 02 Apr, 2019 1 commit
  4. 07 Mar, 2019 1 commit
  5. 05 Mar, 2019 1 commit
  6. 22 Feb, 2019 1 commit
    • Thomas Haller's avatar
      libnm,cli: add NMSettingWireGuard · b521f426
      Thomas Haller authored
      For now only add the core settings, no peers' data.
      
      To support peers and the allowed-ips of the peers is more complicated
      and will be done later. It's more complicated because these are nested
      lists (allowed-ips) inside a list (peers). That is quite unusual and to
      conveniently support that in D-Bus API, in keyfile format, in libnm,
      and nmcli, is a effort.
      Also, it's further complicated by the fact that each peer has a secret (the
      preshared-key). Thus we probably need secret flags for each peer, which
      is a novelty as well (until now we require a fixed set of secrets per
      profile that is well known).
      b521f426
  7. 05 Feb, 2019 1 commit
  8. 01 Feb, 2019 2 commits
    • Thomas Haller's avatar
      wifi-p2p: rename Wi-Fi P2P · 09090f26
      Thomas Haller authored
      After renaming the files, also rename all the content
      to follow the "Wi-Fi P2P" naming scheme.
      09090f26
    • Thomas Haller's avatar
      wifi-p2p: rename files for consistent Wi-Fi P2P naming · 0420fa1f
      Thomas Haller authored
      We named the types inconsistently:
      
        - "p2p-wireless" ("libnm-core/nm-setting-p2p-wireless.h")
      
        - "p2p" ("libnm/nm-p2p-peer.h")
      
        - "p2p-wifi" ("src/devices/wifi/nm-device-p2p-wifi.h")
      
      It seems to me, "libnm/nm-p2p-peer.h" should be qualified with a "Wi-Fi"
      specific name. It's not just peer-to-peer, it's Wi-Fi P2P.
      Yes, there is an inconsistency now, because there is already
      "libnm/nm-access-point.h".
      
      It seems to me (from looking at the internet), that the name "Wi-Fi P2P"
      is more common than "P2P Wi-Fi" -- although both are used. There is also
      the name "Wi-Fi Direct". But it's not clear which name should be
      preferred here, so stick to "Wi-Fi P2P".
      
      In this first commit only rename the files. The following commit will
      rename the content.
      0420fa1f
  9. 27 Jan, 2019 4 commits
  10. 02 Jan, 2019 5 commits
    • Thomas Haller's avatar
      libnm: use "libnm-systemd-shared.a" in "libnm-core.la" (and "libnm.so") · c4512f83
      Thomas Haller authored
      It's not yet used, but it will be. We will need nm_sd_utils_unbase64mem()
      to strictly validate WireGuard settings, which contain keys in base64 encoding.
      
      Note that we also need a stub implementation for logging. This will do
      nothing for all logging from "libnm-systemd-shared.a". This makes
      sense because "libnm.so" as a library should not log directly. Also,
      "libnm.so" will only use a small portion of "libnm-systemd-shared.a" which
      doesn't log anything. Thus this code is unused and dropped by the linker
      with "--gc-sections".
      c4512f83
    • Thomas Haller's avatar
      systemd: move basic systemd library to shared/nm-utils · 2c537b9d
      Thomas Haller authored
      For better or worse, we already pull in large parts of systemd sources.
      
      I need a base64 decode implementation (because glib's g_base64_decode()
      cannot reject invalid encodings). Instead of coming up with my own or
      copy-paste if from somewhere, reuse systemd's unbase64mem().
      
      But for that, make systemd's basic bits an independent static library
      first because I will need it in libnm-core.
      
      This doesn't really change anything except making "libnm-systemd-core.la"
      an indpendent static library that could be used from "libnm-core". We
      shall still be mindful about which internal code of systemd we use, and only
      access functionality that is exposed via "systemd/nm-sd-utils-shared.h".
      2c537b9d
    • Thomas Haller's avatar
      systemd: drop workaround for missing C11 header <uchar.h> · 5f945adf
      Thomas Haller authored
      Now as we build as C11, we can us it.
      5f945adf
    • Thomas Haller's avatar
      build: bump C standard to (gcc's) C11 · 066357aa
      Thomas Haller authored
      We already import systemd code which is C11. To get this even
      to build, we need workaround like patching import of <uchar.h>.
      
      Also, the libraries from c-util and nettools are C11. We cannot even
      compile them in C99 mode (and didn't do that either).
      
      It's time to bump the version. We need C11 from now on (or better: gcc's
      dialect of it).
      
      Also, note that since nettools/nacd is not optional, we could not even
      build NetworkManager without a C11 compiler. So, just use it everywhere.
      066357aa
    • Thomas Haller's avatar
      shared,core: move logging enums to header "shared/nm-utils/nm-logging-fwd.h" · ef53b47e
      Thomas Haller authored
      In core ("src/"), we use "nm-logging.h" for all logging. This dispatches
      for logging to syslog, glog or systemd-journald.
      
      If we want to log from a shared component under "shared/", we need to
      use a common logging function. Add "nm-utils/nm-logging-fwd.h" for
      forward declaring the used logging mechaism.
      
      The shared library will still need to link with "src/nm-logging.c"
      or an alternative implementation, depending on whether it is used
      inside core or not.
      ef53b47e
  11. 27 Dec, 2018 1 commit
    • Thomas Haller's avatar
      shared,core: add "nm-errno.h" · 943dcba5
      Thomas Haller authored
      This will be our extension on top of <errno.h>.
      
      We want to use (integer) error numbers, that can both
      contain native errors from <errno.h> and our own defines,
      both merge in one domain. That is, we will reserve a small
      range of integers for our own defines (that hopefully won't
      clash with errors from <errno.h>).
      
      We can use this at places where GError is too cumbersome to use.
      
      The advantage is, that our error numbers extend <errno.h> and can
      be mixed.
      
      This is what "src/platform/nm-netlink.h" already does with nl_errno(). Next,
      the netlink errors from there will be merged into "nm-errno.h".
      
      Also, platform has NMPlatformError, which are a distinct set of error
      numbers. But these work differently in the sense that negative values
      represent codes from <errno.h> and positive numbers are our own platform
      specific defines. NMPlatformError will also be merged into "nm-errno.h".
      
      "nm-errno.h" will unify the error handling of platform and netlink,
      making it more similar to what we are used to from systemd, and give
      room to extend it for our own purpose.
      943dcba5
  12. 12 Dec, 2018 1 commit
  13. 01 Dec, 2018 2 commits
  14. 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
  15. 15 Nov, 2018 1 commit
  16. 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
  17. 25 Oct, 2018 2 commits
  18. 24 Oct, 2018 2 commits
  19. 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
  20. 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
  21. 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
  22. 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
  23. 19 Sep, 2018 1 commit
  24. 18 Sep, 2018 4 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