1. 05 Jul, 2019 1 commit
    • Tom Gundersen's avatar
      dhcp: add nettools dhcp4 client · 6adade6f
      Tom Gundersen authored
      This is inspired by the existing systemd integration, with a few differences:
      
      * This parses the WPAD option, which systemd requested, but did not use.
      * We hook into the DAD handling, only making use of the configured address
        once DAD has completed successfully, and declining the lease if it fails.
      
      There are still many areas of possible improvement. In particular, we need
      to ensure the parsing of all options are compliant, as n-dhcp4 treats all
      options as opaque, unlike sd-dhcp4. We probably also need to look at how
      to handle failures and retries (in particular if we decline a lease).
      
      We need to query the current MTU at client startu, as well as the hardware
      broadcast address. Both these are provided by the kernel over netlink, so
      it should simply be a matter of hooking that up with NM's netlink layer.
      
      Contribution under LGPL2.0+, in addition to stated licenses.
      6adade6f
  2. 20 Jun, 2019 1 commit
    • Thomas Haller's avatar
      settings: drop ibft settings plugin · 74641be8
      Thomas Haller authored
      The functionality of the ibft settings plugin is now handled by
      nm-initrd-generator. There is no need for it anymore, drop it.
      
      Note that ibft called iscsiadm, which requires CAP_SYS_ADMIN to work
      ([1]). We really want to drop this capability, so the current solution
      of a settings plugin (as it is implemented) is wrong. The solution
      instead is nm-initrd-generator.
      
      Also, on Fedora the ibft was disabled and probably on most other
      distributions as well. This was only used on RHEL.
      
      [1] https://bugzilla.redhat.com/show_bug.cgi?id=1371201#c7
      74641be8
  3. 16 Apr, 2019 1 commit
    • Lubomir Rintel's avatar
      all: goodbye libnm-glib · 5801f89f
      Lubomir Rintel authored
      This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
      The it has been replaced with libnm since NetworkManager 1.0, disabled
      by default since 1.12 and no up-to-date distributions ship it for years
      now.
      
      Removing the libraries allows us to:
      
      * Remove the horrible hacks that were in place to deal with accidental use
        of both the new and old library in a single process.
      * Relief the translators of maintenance burden of similar yet different
        strings.
      * Get rid of known bad code without chances of ever getting fixed
        (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
      * Generally lower the footprint of the releases and our workspace
      
      If there are some really really legacy users; they can just build
      libnm-glib and friends from the NetworkManager-1.16 distribution. The
      D-Bus API is stable and old libnm-glib will keep working forever.
      
      https://github.com/NetworkManager/NetworkManager/pull/308
      5801f89f
  4. 03 Apr, 2019 1 commit
  5. 19 Mar, 2019 1 commit
    • Lubomir Rintel's avatar
      all: goodbye libnm-glib · 1de8383a
      Lubomir Rintel authored
      This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
      The it has been replaced with libnm since NetworkManager 1.0, disabled
      by default since 1.12 and no up-to-date distributions ship it for years
      now.
      
      Removing the libraries allows us to:
      
      * Remove the horrible hacks that were in place to deal with accidental use
        of both the new and old library in a single process.
      * Relief the translators of maintenance burden of similar yet different
        strings.
      * Get rid of known bad code without chances of ever getting fixed
        (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
      * Generally lower the footprint of the releases and our workspace
      
      If there are some really really legacy users; they can just build
      libnm-glib and friends from the NetworkManager-1.16 distribution. The
      D-Bus API is stable and old libnm-glib will keep working forever.
      
      https://github.com/NetworkManager/NetworkManager/pull/308
      1de8383a
  6. 20 Dec, 2018 2 commits
    • Inigo Martínez's avatar
      build: meson: Use variables present in pkg-config files · b00e0048
      Inigo Martínez authored
      Although some paths related to DBus and PolicyKit are present in
      their pkg-config files, those paths might not be writable for the
      user. To solve this issue, some build options are present that can
      be used to choose a different location.
      
      However, usually these paths are relative to some other variables
      such as `prefix`, `datadir`, etc. Using the `define_variable`
      option the relative path can be change to point to a directory
      under prefix.
      
      These paths are now using relative paths based on the installation
      `prefix` and their related options have been removed as they are
      unnecessary now. Only `dbus_conf_dir` option has been left because
      it must be modified depending on the distribution[0].
      
      [0] contrib/fedora/rpm/NetworkManager.spec
      b00e0048
    • Inigo Martínez's avatar
      build: meson: Remove polkit_dir option · 4b32bbc8
      Inigo Martínez authored
      meson is able to get variables defined in pkg-config files such as
      directory paths. PolicyKit defines in its pkg-config file the path to
      the directory where `policy` files are present.
      
      This removes the `polkit_dir` option to ease the move to start using
      those variables. The `polkit` variable has also been converted to
      boolean.
      
      Fedora spec script has also been updated accordingly.
      4b32bbc8
  7. 12 Dec, 2018 1 commit
  8. 28 Nov, 2018 1 commit
  9. 19 Sep, 2018 2 commits
  10. 18 Sep, 2018 2 commits
    • 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
      Squashed 'shared/n-acd/' changes from a68b55992..a40949267 · 1361ede0
      Beniamino Galvani authored
      a40949267 build: add CI run without ebpf
      044db2056 n-acd: drop redundant headers
      6a391cd83 n-acd: fix build without eBPF
      bb194cf09 n-acd/config: make transport mandatory
      ec2865743 build: drop unused c-sundry
      721d9d84f n-acd: inline c_container_of()
      1a7ee317c util/timer: fix coding-style
      6c96f926b util/timer: fall back to CLOCK_MONOTONIC if necessary
      4ea3165fc n-acd: only use CLOCK_BOOTTIME if really necessary
      c1b853c6c util/timer: cleanup headers
      b1d6ad272 n-acd: add destructors that return void
      185be55b6 test-bpf: skip test in case of unsufficient privs
      84a40e8fa build: add NEWS file
      bf11443ff build: mention mailinglist in readme
      e2797984a test-bpf: drop bpf-filter.h
      668ed3c82 subprojects: pull in updates
      dd8cab3f0 test-veth: reduce parallel execution to 9
      68b09ba2b build: update AUTHORS
      3f77e3e88 test: make function headers valid C
      5275a5120 test: get rid of spurious tab
      037df412c n-acd: make struct initializers valid C
      346ec0c67 build: upgrade CI
      38682a36d n-acd: fix signed vs unsigned comparison
      5e7578b33 bpf: properly zero out trailing bpf_attr space
      ee1e432ae probe: fix coding-style
      a143540f9 build: use lower-case build options
      835533e7d build: minor style fixes
      2bd6d1d29 build: get rid of tabs
      b14979934 eBPF: make compile-time optional
      6f13c27ee n-acd: filter out invalid packets
      4e6a169a0 build: sync with c-util repositories
      6c4a9117b build: document eBPF kernel requirement
      3ef08394d n-acd: don't remember dropped defense attempts
      4dff8771f n-acd: fix coding-style
      b11fb9706 n-acd/config: default to the RFC-specified timeout
      d885bb3b7 n-acd/event: don't expose the type of operation that caused a conflict
      e2f87e047 TODO: drop remaining items
      f06993856 test/veth: reduce the number of probed addresses
      8b4f7ed64 test/veth: bump the timeout a bit
      14e4606f6 n-acd/probe: don't cap the jitter at 4s
      a0247b86f test/veth: fix stackvariable corruption
      a64ac8389 n-acd/probe: update comments
      aa9c25bc1 n-acd/handle_timeout: update comments
      b6c2df3a9 timer: rename timer_pop() to timer_pop_timeout()
      47c657a8d test: fix handling of child addresses
      27168ba9e timer: move timer_read() from n-acd.c to util/timer.c
      21a1e37aa timer: require timer to be explicitly rearmed
      ee1080820 bpf/map: make key/value sizes self-documenting
      fd444353e test/veth: rework test
      ba2bc433c test: rework child_ip() helper
      07881b8da test: silence a warning
      38da00b0a test/bpf: make tests for map modifications more comprehensive
      6a2ffd23a test/timerfd: for documentation purposes verify the kernel API
      01a9cf54b probe: move from ms to ns internally
      4fe438dd9 n-acd: move to use the Timer utility library
      e098cfc79 util: add a timer utility helper
      8ea196e5b subprojects: pull in c-sundry
      0c0b3c29f acd/probe: do not subscribe to packets in FAILED state
      9c922ea3d acd/probe: introduce probe_{un,}link() helpers
      024a830e6 acd/probe: use unschedule() helper in free()
      b098a3bcc tests/veth: minor fixes to the test
      fe3d9578a acd/packet: consider unexpected packets a fatal error
      34d7656d7 acd: stop state-machine after USED or CONFLICT events
      7d9e5ec6b acd: don't declare iovec entries inline
      7afd8d8a3 tests: add veth test
      26a737b42 tests/veth: add helper for adding IP addresses to child device
      e73a37a11 probe: store a userdata pointer in the probe object
      327e82625 test: introduce loopback helper
      0682b15f8 acd: reduce default map size
      afead881f tests: reinstate loopback test
      4527d2f71 BPF: move and document the eBPF helpers
      88bacc022 socket filter: move to the new eBPF helpers
      245104d5c tests: skip tests if lacking permissions
      195d9ff5a n-acd: rework API to support many probes on a context
      ab440eb99 eBPF: never return packets that userspace should unconditionally drop
      ac933f412 eBPF: add eBPF helper functions
      
      git-subtree-dir: shared/n-acd
      git-subtree-split: a40949267923c45cb232fa4c1d60eafacee4b36e
      1361ede0
  11. 13 Sep, 2018 12 commits
  12. 27 Aug, 2018 2 commits
    • Thomas Haller's avatar
      build/meson: fix build options for suspend-resume · 1dd63580
      Thomas Haller authored
      suspend-resume must be selectable, out of for possible options.
      We can do auto-detection based on present libraries, but it
      shall be selectable. Like it is with autotools.
      1dd63580
    • Thomas Haller's avatar
      build: cleanup build defines for session-tracking · 1a9bc224
      Thomas Haller authored
      - always define the SESSION_TRACKING_* defines to replace
        "#ifdef" with "#if".
      
      - drop defining the consolekit database path CKDB_PATH in
        config.h. The path was not customizable via configure/meson.
      
      - fix meson build to enable consolekit support for session tracking
        without also enabling logind/elogind session tracking.
        logind/elogind is mutually exclusive, but consolekit session tracking
        goes together just fine.
      1a9bc224
  13. 27 Jun, 2018 2 commits
    • Thomas Haller's avatar
      logging: warn about invalid logging backends and drop "debug" backend · dbd48f26
      Thomas Haller authored
      "debug" was documentation in `man NetworkManager.conf` as a valid
      logging backend. However, it was completely ignored by
      nm_logging_syslog_openlog().
      In fact, it makes not sense. Passing debug = TRUE to
      nm_logging_syslog_openlog(), means that all messages will be
      printed to stderr in addition to syslog/journal. However, when
      NetworkManager is daemonizing, stderr is closed.
      Whether NetworkManager is daemonizing depends entirely on command
      line options --no-daemon and --debug. Hence, the logging backend "debug"
      from the configuration file either conflicts or is redundant.
      
      Also, adjust logging backend description in `man NetworkManager.conf`.
      
      Also, log a warning about invalid/unsupported logging backend.
      
      (cherry picked from commit 2ccf6168)
      dbd48f26
    • Thomas Haller's avatar
      logging: warn about invalid logging backends and drop "debug" backend · 2ccf6168
      Thomas Haller authored
      "debug" was documentation in `man NetworkManager.conf` as a valid
      logging backend. However, it was completely ignored by
      nm_logging_syslog_openlog().
      In fact, it makes not sense. Passing debug = TRUE to
      nm_logging_syslog_openlog(), means that all messages will be
      printed to stderr in addition to syslog/journal. However, when
      NetworkManager is daemonizing, stderr is closed.
      Whether NetworkManager is daemonizing depends entirely on command
      line options --no-daemon and --debug. Hence, the logging backend "debug"
      from the configuration file either conflicts or is redundant.
      
      Also, adjust logging backend description in `man NetworkManager.conf`.
      
      Also, log a warning about invalid/unsupported logging backend.
      2ccf6168
  14. 15 Jun, 2018 1 commit
    • Lubomir Rintel's avatar
      build: disable libnm-glib by default · df58895f
      Lubomir Rintel authored
      It's deprecated and has been replaced by libnm for 6 major releases now.
      
      Its use in modern distributions has faded to the point it can probably
      be safely removed.
      df58895f
  15. 12 Jan, 2018 1 commit
  16. 10 Jan, 2018 1 commit
  17. 21 Dec, 2017 2 commits
  18. 18 Dec, 2017 1 commit
  19. 13 Dec, 2017 1 commit