1. 04 Dec, 2019 2 commits
  2. 03 Dec, 2019 6 commits
    • Thomas Haller's avatar
      libnm: drop unused _nm_dbus_proxy_call_sync() helper · 66ea6e01
      Thomas Haller authored
      It's unused and:
      
        - we probably should avoid GDBusProxy altogether
      
        - we very likely should avoid blocking D-Bus calls
      66ea6e01
    • Thomas Haller's avatar
      cloud-setup: mark environment variables that are supported configuration · 7b24d6e2
      Thomas Haller authored
      "nm-cloud-setup" can by configured via environment variables. Mark all the
      names of such variables with NMCS_ENV_VARIABLE() macro. This allows to grep
      for them.
      7b24d6e2
    • Thomas Haller's avatar
      cloud-setup: require to explicitly opt-in for providers via environment variable · ff816dec
      Thomas Haller authored
      "nm-cloud-setup" is supposed to work without configuration.
      
      However, it (obviously) fetches data from the network you are connected to (which
      might be untrusted or controlled by somebody malicious). The tool cannot
      protect you against that, also because the meta data services uses HTTP and not
      HTTPS. It means, you should run the tool only when it's suitable for your
      environment, that is: in the right cloud.
      
      Usually, the user/admin/distributor would know for which cloud the enable the tool.
      It's also wasteful to repeatedly probe for the unavailable cloud.
      
      So, instead disable all providers by default and require to opt-in by setting an
      environment variable.
      
      This can be conveniently done via `systemctl edit nm-cloud-provider.service` to
      set Environment=. Of course, a image can also pre-deploy such am override file.
      ff816dec
    • Thomas Haller's avatar
      cloud-setup: let dispatcher script run tool only if service is enabled · 953e0133
      Thomas Haller authored
      We don't want that when the user installs the package, that the
      dispatcher script automatically executes the tool. Instead, the user
      should use `systemctl enable/disable` to control whether the service
      is active (of via the timer).
      
      Hence, let the dispatcher script check whether the service is enabled.
      
      That leads to a different problem, that we need to make it possible for
      "nm-cloud-setup.service" to be enabled in the first place. As such, add
      a [Install] section and let it be wanted by NetworkManager.service. The
      problem with this is that now the tool will run very early, just after
      NetworkManager started. At that point, it might not yet have setup
      networking. But that should be acceptable, after all, the tool either
      fails to fetch meta data that early, or it succeeds. Very likely, it
      will by aborted by dispatcher's restart command.
      953e0133
    • Thomas Haller's avatar
      667ae99f
    • Thomas Haller's avatar
      libnm: don't emit property changed "notify" signal while destructing NMClient · 53db3a2d
      Thomas Haller authored
      It seems to trip up gnome-control-center (rh #1778668). Just don't emit
      anymore signals once NMClient goes down.
      53db3a2d
  3. 02 Dec, 2019 8 commits
    • Beniamino Galvani's avatar
      core: fix IAID endianness in client-id generation test · b90f8e78
      Beniamino Galvani authored
      Fixes: 6f16e524 ('core: support ipvX.dhcp-iaid properties')
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1778640
      b90f8e78
    • Beniamino Galvani's avatar
      core: remove 'legacy_unstable_byteorder' argument from client-id helpers · 4fcff3f3
      Beniamino Galvani authored
      The argument has no effect because the order only influences IAID
      generation.
      4fcff3f3
    • Thomas Haller's avatar
      travis-ci: update build platform to Ubuntu 16.04 (xenial) · 9c00eb5c
      Thomas Haller authored
      We kept building NetworkManager in travis on an ancient
      Ubuntu 14.04 (trusty). However, we already cannot install
      latest meson, because that would require a newer python
      version. The used meson 1.44.1 does not support "link_whole".
      At this point, it's getting just too cumbersom.
      
      Update the dependencies.
      9c00eb5c
    • Thomas Haller's avatar
      platform/tests: skip team test when we fail to create team link · f7e3cc0b
      Thomas Haller authored
      This is necessary on Travis/Ubuntu 16.04, otherwise the test
      fails with
      
        # NetworkManager-MESSAGE: <warn>  [1575301791.7600] platform-linux: do-add-link[nm-test-device/team]: failure 95 (Operation not supported)
        Aborted (core dumped)
        # test:ERROR:../src/platform/tests/test-link.c:353:test_software: assertion failed: (software_add (link_type, DEVICE_NAME))
        ERROR: src/platform/tests/test-link-linux - too few tests run (expected 76, got 6)
      f7e3cc0b
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      contrib/rpm: explicitly enable/disable bluetooth support · 30f6a5dd
      Thomas Haller authored
      The bluetooth plugin (with BlueZ5/NAP support) always gets
      build, but DUN support requires a library.
      
      When enabling build of the bluetooth subpackage, then always
      enable DUN support. And enable it explicitly, especially meson
      would not autodetect support and disable it by default.
      30f6a5dd
    • Thomas Haller's avatar
      build/meson: fix link failure of bluetooth's nm-bt-test · 390086a3
      Thomas Haller authored
        $ meson . build -D bluez5_dun=true -D selinux=false -D qt=false
      390086a3
    • Lubomir Rintel's avatar
      modem-broadband: avoid a crash if we fail to guess an APN · 9ba55ea6
      Lubomir Rintel authored
      Don't proceed if the context was torn down on an error in
      try_create_connect_properties().
      
        <info>  [1574092292.0225] manager: NetworkManager state is now CONNECTING
        <warn>  [1574092292.0228] modem-broadband[ttyV0]: failed to connect 'ttyV0': unable to determine the network id
        <info>  [1574092292.0230] device (ttyV0): state change: prepare -> failed (reason 'modem-init-failed', sys-iface-state: 'managed')
        <info>  [1574092292.0236] manager: NetworkManager state is now DISCONNECTED
        <warn>  [1574092292.0250] device (ttyV0): Activation: failed for connection 'ttyV0'
      
        (NetworkManager:69212): libnm-CRITICAL **: 16:51:32.025: ((libnm-core/nm-connection.c:193)): assertion '<dropped>' failed
      
        Thread 1 "NetworkManager" received signal SIGTRAP, Trace/breakpoint trap.
        0x00007ffff78da6e5 in _g_log_abort () from /lib64/libglib-2.0.so.0
        (gdb) bt
        #0  0x00007ffff78da6e5 in _g_log_abort () at /lib64/libglib-2.0.so.0
        #1  0x00007ffff78db9b6 in g_logv () at /lib64/libglib-2.0.so.0
        #2  0x00007ffff78dbb83 in g_log () at /lib64/libglib-2.0.so.0
        #3  0x000055555563fcd2 in _nm_g_return_if_fail_warning (line=line@entry=193, file=0x5555557ae221 "libnm-core/nm-connection.c", log_domain=0x5555557ae23c "libnm") at ./shared/nm-default.h:219
        #4  0x000055555563feba in _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.:
         (connection=0x0, setting_type=) at libnm-core/nm-connection.c:193
        #5  _connection_get_setting_checkPython Exception <class 'gdb.error'> No type named TypeNode.:
         (connection=0x0, setting_type=) at libnm-core/nm-connection.c:191
        #6  0x00007fffe871f8b4 in nm_modem_get_connection_ip_type (self=self@entry=0x7fffd801c730, connection=0x0, error=error@entry=0x7fffffffc8e8) at src/devices/wwan/nm-modem.c:374
        #7  0x00007fffe871bfed in connect_context_step (self=0x7fffd801c730) at src/devices/wwan/nm-modem-broadband.c:591
        #8  0x00007fffe871c74b in modem_act_stage1_prepare (_self=0x7fffd801c730, connection=0x555555af5520, out_failure_reason=<optimized out>) at src/devices/wwan/nm-modem-broadband.c:687
        #9  0x00007fffe8720203 in nm_modem_act_stage1_prepare (self=0x7fffd801c730, req=0x555555b08a30, out_failure_reason=0x7fffffffcbe0) at src/devices/wwan/nm-modem.c:1045
        #10 0x0000555555705f1b in activate_stage1_device_prepare (self=0x555555a956a0) at src/devices/nm-device.c:6562
        #11 0x00005555556dcbca in activation_source_handle_cb (self=0x555555a956a0, addr_family=2) at src/devices/nm-device.c:6177
        #12 0x00007ffff78d0dcb in g_idle_dispatch () at /lib64/libglib-2.0.so.0
        #13 0x00007ffff78d44a0 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
        #14 0x00007ffff78d4830 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
        #15 0x00007ffff78d4b23 in g_main_loop_run () at /lib64/libglib-2.0.so.0
        #16 0x0000555555599ff4 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:451
      
      !338/
      9ba55ea6
  4. 29 Nov, 2019 5 commits
    • Thomas Haller's avatar
      0c06a0f3
    • Thomas Haller's avatar
      9b8c4c1c
    • Thomas Haller's avatar
      NEWS: update · b60dfef7
      Thomas Haller authored
      b60dfef7
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · d345c4fd
      Thomas Haller authored
      Do another import, shortly before re-release.
      
      There are no actual changes, but as always: to find out
      that there are no changes requires large part of the work of
      just doing the reimport.
      
      Also, systemd import branch was rebased recently, that means
      git-merge does not get this reimport right automatically (because
      it thinks that the changes on master should be reverted). Hence,
      this reimport required more care. Do it while there are few
      changes.
      d345c4fd
    • Thomas Haller's avatar
      systemd: update code from upstream (2019-11-29) · 71adddb1
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=dd08aa6488543727375d7377505a5333bb9e6047
      
      (
        cd "$SYSTEMD_DIR"
        git checkout "$COMMIT"
        git reset --hard
        git clean -fdx
      )
      
      git ls-files -z :/src/systemd/src/ \
                      :/shared/systemd/src/ \
                      :/shared/nm-std-aux/unaligned.h | \
        xargs -0 rm -f
      
      nm_copy_sd_shared() {
          mkdir -p "./shared/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
      }
      
      nm_copy_sd_core() {
          mkdir -p "./src/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
      }
      
      nm_copy_sd_stdaux() {
          mkdir -p "./shared/nm-std-aux/"
          cp "$SYSTEMD_DIR/$1" "./shared/nm-std-aux/${1##*/}"
      }
      
      nm_copy_sd_core "src/libsystemd-network/arp-util.c"
      nm_copy_sd_core "src/libsystemd-network/arp-util.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
      nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
      nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
      nm_copy_sd_core "src/libsystemd-network/network-internal.c"
      nm_copy_sd_core "src/libsystemd-network/network-internal.h"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
      nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
      nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
      nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
      nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
      nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
      nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
      nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
      nm_copy_sd_core "src/systemd/_sd-common.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
      nm_copy_sd_core "src/systemd/sd-dhcp-option.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
      nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
      nm_copy_sd_core "src/systemd/sd-event.h"
      nm_copy_sd_core "src/systemd/sd-id128.h"
      nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
      nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
      nm_copy_sd_core "src/systemd/sd-lldp.h"
      nm_copy_sd_core "src/systemd/sd-ndisc.h"
      nm_copy_sd_shared "src/basic/alloc-util.c"
      nm_copy_sd_shared "src/basic/alloc-util.h"
      nm_copy_sd_shared "src/basic/async.h"
      nm_copy_sd_shared "src/basic/env-file.c"
      nm_copy_sd_shared "src/basic/env-file.h"
      nm_copy_sd_shared "src/basic/env-util.c"
      nm_copy_sd_shared "src/basic/env-util.h"
      nm_copy_sd_shared "src/basic/errno-util.h"
      nm_copy_sd_shared "src/basic/escape.c"
      nm_copy_sd_shared "src/basic/escape.h"
      nm_copy_sd_shared "src/basic/ether-addr-util.c"
      nm_copy_sd_shared "src/basic/ether-addr-util.h"
      nm_copy_sd_shared "src/basic/extract-word.c"
      nm_copy_sd_shared "src/basic/extract-word.h"
      nm_copy_sd_shared "src/basic/fd-util.c"
      nm_copy_sd_shared "src/basic/fd-util.h"
      nm_copy_sd_shared "src/basic/fileio.c"
      nm_copy_sd_shared "src/basic/fileio.h"
      nm_copy_sd_shared "src/basic/format-util.c"
      nm_copy_sd_shared "src/basic/format-util.h"
      nm_copy_sd_shared "src/basic/fs-util.c"
      nm_copy_sd_shared "src/basic/fs-util.h"
      nm_copy_sd_shared "src/basic/hash-funcs.c"
      nm_copy_sd_shared "src/basic/hash-funcs.h"
      nm_copy_sd_shared "src/basic/hashmap.c"
      nm_copy_sd_shared "src/basic/hashmap.h"
      nm_copy_sd_shared "src/basic/hexdecoct.c"
      nm_copy_sd_shared "src/basic/hexdecoct.h"
      nm_copy_sd_shared "src/basic/hostname-util.c"
      nm_copy_sd_shared "src/basic/hostname-util.h"
      nm_copy_sd_shared "src/basic/in-addr-util.c"
      nm_copy_sd_shared "src/basic/in-addr-util.h"
      nm_copy_sd_shared "src/basic/io-util.c"
      nm_copy_sd_shared "src/basic/io-util.h"
      nm_copy_sd_shared "src/basic/list.h"
      nm_copy_sd_shared "src/basic/log.h"
      nm_copy_sd_shared "src/basic/macro.h"
      nm_copy_sd_shared "src/basic/memory-util.c"
      nm_copy_sd_shared "src/basic/memory-util.h"
      nm_copy_sd_shared "src/basic/mempool.c"
      nm_copy_sd_shared "src/basic/mempool.h"
      nm_copy_sd_shared "src/basic/missing_fcntl.h"
      nm_copy_sd_shared "src/basic/missing_random.h"
      nm_copy_sd_shared "src/basic/missing_socket.h"
      nm_copy_sd_shared "src/basic/missing_stat.h"
      nm_copy_sd_shared "src/basic/missing_type.h"
      nm_copy_sd_shared "src/basic/parse-util.c"
      nm_copy_sd_shared "src/basic/parse-util.h"
      nm_copy_sd_shared "src/basic/path-util.c"
      nm_copy_sd_shared "src/basic/path-util.h"
      nm_copy_sd_shared "src/basic/prioq.c"
      nm_copy_sd_shared "src/basic/prioq.h"
      nm_copy_sd_shared "src/basic/process-util.c"
      nm_copy_sd_shared "src/basic/process-util.h"
      nm_copy_sd_shared "src/basic/random-util.c"
      nm_copy_sd_shared "src/basic/random-util.h"
      nm_copy_sd_shared "src/basic/set.h"
      nm_copy_sd_shared "src/basic/signal-util.h"
      nm_copy_sd_shared "src/basic/siphash24.h"
      nm_copy_sd_shared "src/basic/socket-util.c"
      nm_copy_sd_shared "src/basic/socket-util.h"
      nm_copy_sd_shared "src/basic/sort-util.h"
      nm_copy_sd_shared "src/basic/sparse-endian.h"
      nm_copy_sd_shared "src/basic/stat-util.c"
      nm_copy_sd_shared "src/basic/stat-util.h"
      nm_copy_sd_shared "src/basic/stdio-util.h"
      nm_copy_sd_shared "src/basic/string-table.c"
      nm_copy_sd_shared "src/basic/string-table.h"
      nm_copy_sd_shared "src/basic/string-util.c"
      nm_copy_sd_shared "src/basic/string-util.h"
      nm_copy_sd_shared "src/basic/strv.c"
      nm_copy_sd_shared "src/basic/strv.h"
      nm_copy_sd_shared "src/basic/strxcpyx.c"
      nm_copy_sd_shared "src/basic/strxcpyx.h"
      nm_copy_sd_shared "src/basic/time-util.c"
      nm_copy_sd_shared "src/basic/time-util.h"
      nm_copy_sd_shared "src/basic/tmpfile-util.c"
      nm_copy_sd_shared "src/basic/tmpfile-util.h"
      nm_copy_sd_shared "src/basic/umask-util.h"
      nm_copy_sd_shared "src/basic/utf8.c"
      nm_copy_sd_shared "src/basic/utf8.h"
      nm_copy_sd_shared "src/basic/util.c"
      nm_copy_sd_shared "src/basic/util.h"
      nm_copy_sd_shared "src/shared/dns-domain.c"
      nm_copy_sd_shared "src/shared/dns-domain.h"
      nm_copy_sd_stdaux "src/basic/unaligned.h"
      71adddb1
  5. 28 Nov, 2019 16 commits
  6. 27 Nov, 2019 3 commits
    • Thomas Haller's avatar
      3604e4c1
    • Thomas Haller's avatar
      all: add support for "scope" attribute for IPv4 routes · b9f1beb0
      Thomas Haller authored
      - systemd-networkd and initscripts both support it.
      
      - it seems suggested to configure routes with scope "link" on AWS.
      
      - the scope is only supported for IPv4 routes. Kernel ignores the
        attribute for IPv6 routes.
      
      - we don't support the aliases like "link" or "global". Instead
        only the numeric value is supported. This is different from
        systemd-networkd, which accepts names like "global" and "link",
        but no numerical values. I think restricting ourself only to
        the aliases unnecessarily limits what is possible on netlink.
        The alternative would be to allow aliases and numbers both,
        but that causes multiple ways to define something and has
        thus downsides. So, only numeric values.
      
      - when setting rtm_scope to RT_SCOPE_NOWHERE (0, the default), kernel
        will coerce that to RT_SCOPE_LINK. This ambiguity of nowhere vs. link
        is a problem, but we don't do anything about it.
      
      - The other problem is, that when deleting a route with scope RT_SCOPE_NOWHERE,
        this acts as a wild care and removes the first route that matches (given the
        other route attributes). That means, NetworkManager has no meaningful
        way to delete a route with scope zero, there is always the danger that
        we might delete the wrong route. But this is nothing new to this
        patch. The problem existed already previously, except that
        NetworkManager could only add routes with scope nowhere (i.e. link).
      b9f1beb0
    • Thomas Haller's avatar
      ifcfg-rh: separately handle static information during parsing ip-route commandline · b8c00780
      Thomas Haller authored
      There is an "info" part and a part with the data that we parsed.
      Don't track the static and mutable data in the same variable.
      
      Also, this allows to mark the static part as "const static".
      b8c00780