Commit Graph

25044 Commits

Author SHA1 Message Date
Thomas Haller
fc19cbb589 shared: add nm_utils_addr_family_from_size() helper
(cherry picked from commit 06a976358b)
2019-12-05 13:12:04 +01:00
Thomas Haller
abaad34fd2 initrd: merge branch 'th/initrd-parse-cleanup'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/282
2019-12-05 13:10:13 +01:00
Thomas Haller
d68373c305 initrd: don't use inet_aton() to parse IPv4 address
inet_aton() is very accepting when parsing the address. For example,
it accepts addresses with fewer octets (interpreting the last octet
as a number in network byte order for multiple bytes). It also ignores
any trailing garbage after the first delimiting whitespace (at least,
the glibc implementation). It also accepts octets in hex and octal
notation.

For the initrd reader we want to be more forgiving than inet_pton()
and also accept addresses like 255.000.000.000 (octal notation). For
that we would want to use inet_aton(). But we should not accept all the
craziness that inet_aton() otherwise accepts.

Use nm_utils_parse_inaddr_bin_full() instead. This function implements
our way how we want to interpret IP addresses in string representation.
Under the hood, of course it also uses inet_pton() and even inet_aton(),
but it is stricter than inet_aton() and only accepts certain formats.
2019-12-05 12:36:13 +01:00
Thomas Haller
9618f1bb4b initrd: fix out-of-bounds read when detecting address family in dt_get_ipaddr_property()
The @family argument is an input and output argument.

Initially, the family is set to AF_UNSPEC, in which case the family
gets detected based on the IP address. However, we call
dt_get_ipaddr_property() multiple times to parse the netmask, the
gateway and the IP address.

That means, after the first successfull call, the @family is set to
AF_INET or AF_INET6.

Note that the previous code (in the switch block) would only check that
the family is set to AF_UNSPEC, but it would not check that the @family
matches the expected binary address length @len. Later, we then might call
nm_ip_address_new_binary() with a family and a binary address of
unexpected length.

Also drop the error checking for nm_ip_address_new_binary().
nm_ip_address_new_binary() can only fail if the prefix length is larger
than 32/128. The function has no way to validate the input arguments
beyond that and can thus not fail (short of undefined behavior).
2019-12-05 12:36:13 +01:00
Thomas Haller
e7cf22be3e initrd: use cleanup attribute in nmi_dt_reader_parse() 2019-12-05 12:36:13 +01:00
Thomas Haller
321a323df4 initrd: fix use-after-free for variable "s_gateway" in nmi_dt_reader_parse() 2019-12-05 12:36:13 +01:00
Thomas Haller
8fbf67d138 shared: add nm_utils_parse_inaddr_bin_full() to support legacy IPv4 formats as inet_aton()
inet_aton() also supports IPv4 addresses in octal (with a leading '0')
or where not all 4 digits of the address are present.

Add nm_utils_parse_inaddr_bin_full() to optionally fallback to
parse the address with inet_aton().

Note taht inet_aton() also supports all crazy formats, including
ignoring trailing garbage after a whitespace. We don't want to accept
that in general.

Note that even in legacy format we:

  - accept everything that inet_pton() would accept

  - additionally, we also accept some forms which inet_aton() would
    accept, but not all.

That means, the legacy format that we accept is a superset of
inet_pton() and a subset of inet_aton(). Which is desirable.
2019-12-05 12:36:13 +01:00
Thomas Haller
06a976358b shared: add nm_utils_addr_family_from_size() helper 2019-12-05 12:36:13 +01:00
Thomas Haller
15fb8fe26d settings/trivial: add fixme comment for creating GDBusConnection for ifcfg D-Bus interface
We really should just use the one and only main connection.
2019-12-05 12:27:13 +01:00
Thomas Haller
1367e8a1b8 initrd: generate IPv6 profiles with ipv6.addr-gen-mode=eui64
https://bugzilla.redhat.com/show_bug.cgi?id=1779389
(cherry picked from commit ea4e95ec33)
2019-12-04 18:28:47 +01:00
Thomas Haller
ea4e95ec33 initrd: generate IPv6 profiles with ipv6.addr-gen-mode=eui64
https://bugzilla.redhat.com/show_bug.cgi?id=1779389
2019-12-04 18:25:39 +01:00
Thomas Haller
c15682558c gitlab-ci: fix generating "pages" after switching to Fedora 30 for main build 2019-12-04 13:03:32 +01:00
Thomas Haller
66ea6e01c8 libnm: drop unused _nm_dbus_proxy_call_sync() helper
It's unused and:

  - we probably should avoid GDBusProxy altogether

  - we very likely should avoid blocking D-Bus calls
2019-12-03 16:32:08 +01:00
Thomas Haller
fa711ddf92 cloud-setup: mark environment variables that are supported configuration
"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.

(cherry picked from commit 7b24d6e2dc)
2019-12-03 16:27:43 +01:00
Thomas Haller
dd643b06e1 cloud-setup: require to explicitly opt-in for providers via environment variable
"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.

(cherry picked from commit ff816dec17)
2019-12-03 16:27:43 +01:00
Thomas Haller
e447af8d35 cloud-setup: let dispatcher script run tool only if service is enabled
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.

(cherry picked from commit 953e01336a)
2019-12-03 16:27:43 +01:00
Thomas Haller
0a45cc71dd cloud-setup: enable more sandboxing in systemd unit
(cherry picked from commit 667ae99f5d)
2019-12-03 16:27:43 +01:00
Thomas Haller
7b24d6e2dc cloud-setup: mark environment variables that are supported configuration
"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.
2019-12-03 16:18:33 +01:00
Thomas Haller
ff816dec17 cloud-setup: require to explicitly opt-in for providers via environment variable
"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.
2019-12-03 16:18:33 +01:00
Thomas Haller
953e01336a cloud-setup: let dispatcher script run tool only if service is enabled
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.
2019-12-03 16:18:33 +01:00
Thomas Haller
667ae99f5d cloud-setup: enable more sandboxing in systemd unit 2019-12-03 16:18:33 +01:00
Thomas Haller
b6b6c63b14 libnm: don't emit property changed "notify" signal while destructing NMClient
It seems to trip up gnome-control-center (rh #1778668). Just don't emit
anymore signals once NMClient goes down.

(cherry picked from commit 53db3a2da9)
2019-12-03 14:56:41 +01:00
Thomas Haller
53db3a2da9 libnm: don't emit property changed "notify" signal while destructing NMClient
It seems to trip up gnome-control-center (rh #1778668). Just don't emit
anymore signals once NMClient goes down.
2019-12-03 14:50:18 +01:00
Beniamino Galvani
a33387eeba core: fix IAID endianness in client-id generation test
Fixes: 6f16e524be ('core: support ipvX.dhcp-iaid properties')

https://bugzilla.redhat.com/show_bug.cgi?id=1778640
(cherry picked from commit b90f8e785e)
2019-12-02 18:02:42 +01:00
Beniamino Galvani
eacce1fd77 core: remove 'legacy_unstable_byteorder' argument from client-id helpers
The argument has no effect because the order only influences IAID
generation.

(cherry picked from commit 4fcff3f34c)
2019-12-02 18:02:41 +01:00
Beniamino Galvani
b90f8e785e core: fix IAID endianness in client-id generation test
Fixes: 6f16e524be ('core: support ipvX.dhcp-iaid properties')

https://bugzilla.redhat.com/show_bug.cgi?id=1778640
2019-12-02 17:50:41 +01:00
Beniamino Galvani
4fcff3f34c core: remove 'legacy_unstable_byteorder' argument from client-id helpers
The argument has no effect because the order only influences IAID
generation.
2019-12-02 17:50:40 +01:00
Thomas Haller
e06b333c43 travis-ci: update build platform to Ubuntu 16.04 (xenial)
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.

(cherry picked from commit 9c00eb5cb9)
2019-12-02 17:34:52 +01:00
Thomas Haller
dbed7be30d platform/tests: skip team test when we fail to create team link
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)

(cherry picked from commit f7e3cc0b71)
2019-12-02 17:34:51 +01:00
Thomas Haller
9c00eb5cb9 travis-ci: update build platform to Ubuntu 16.04 (xenial)
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.
2019-12-02 17:25:14 +01:00
Thomas Haller
f7e3cc0b71 platform/tests: skip team test when we fail to create team link
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)
2019-12-02 17:25:03 +01:00
Thomas Haller
7302be3b32 cloud-setup: add comment that the tool is still experimental
(cherry picked from commit 16223cff91)
2019-12-02 15:24:17 +01:00
Thomas Haller
16223cff91 cloud-setup: add comment that the tool is still experimental 2019-12-02 15:22:21 +01:00
Thomas Haller
7ff866e679 contrib/rpm: explicitly enable/disable bluetooth support
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.

(cherry picked from commit 30f6a5dd21)
2019-12-02 15:16:52 +01:00
Thomas Haller
bc3f5ca6a9 build/meson: fix link failure of bluetooth's nm-bt-test
$ meson . build -D bluez5_dun=true -D selinux=false -D qt=false

(cherry picked from commit 390086a3cc)
2019-12-02 15:16:52 +01:00
Lubomir Rintel
34cfc5861a modem-broadband: avoid a crash if we fail to guess an APN
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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/338/
(cherry picked from commit 9ba55ea6a6)
2019-12-02 15:16:52 +01:00
Thomas Haller
30f6a5dd21 contrib/rpm: explicitly enable/disable bluetooth support
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.
2019-12-02 15:15:37 +01:00
Thomas Haller
390086a3cc build/meson: fix link failure of bluetooth's nm-bt-test
$ meson . build -D bluez5_dun=true -D selinux=false -D qt=false
2019-12-02 13:47:48 +01:00
Lubomir Rintel
9ba55ea6a6 modem-broadband: avoid a crash if we fail to guess an APN
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

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/338/
2019-12-02 02:32:18 +01:00
Thomas Haller
0c06a0f368 release: bump version to 1.23.0 (development) 2019-11-29 15:46:22 +01:00
Thomas Haller
9b8c4c1cfd release: bump version to 1.21.90 (1.22-rc1) 2019-11-29 15:43:29 +01:00
Thomas Haller
b60dfef778 NEWS: update 2019-11-29 13:44:25 +01:00
Thomas Haller
d345c4fd69 systemd: merge branch systemd into master
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.
2019-11-29 13:14:05 +01:00
Thomas Haller
71adddb116 systemd: update code from upstream (2019-11-29)
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"
2019-11-29 13:05:13 +01:00
Thomas Haller
18ec8f89c8 cloud-setup: merge branch 'th/cloud-setup'
https://bugzilla.redhat.com/show_bug.cgi?id=1642461

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/348
2019-11-28 22:23:50 +01:00
Thomas Haller
69f048bf0c cloud-setup: add tool for automatic IP configuration in cloud
This is a tool for automatically configuring networking in a cloud
environment.

Currently it only supports IPv4 on EC2, but it's intended for extending
to other cloud providers (Azure). See [1] and [2] for how to configure
secondary IP addresses on EC2. This is what the tool currently aims to
do (but in the future it might do more).

[1] https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/

It is inspired by SuSE's cloud-netconfig ([1], [2]) and ec2-net-utils
package on Amazon Linux ([3], [4]).

[1] https://www.suse.com/c/multi-nic-cloud-netconfig-ec2-azure/
[2] https://github.com/SUSE-Enceladus/cloud-netconfig
[3] https://github.com/aws/ec2-net-utils
[4] https://github.com/lorengordon/ec2-net-utils.git

It is also intended to work without configuration. The main point is
that you boot an image with NetworkManager and nm-cloud-setup enabled,
and it just works.
2019-11-28 19:52:18 +01:00
Thomas Haller
2b6f5a305c shared: add nm_utils_error_new() and nm_utils_error_new_cancelled() helper 2019-11-28 19:20:33 +01:00
Thomas Haller
40012e2aa8 shared: move log level info from core to "nm-logging-base.h"
We have our NM specific logging and log levels. Maybe we should
not have that, and instead only rely on syslog (like systemd)
or glog(). Anyway, currently we have one way and it makes sense
that this is also used outside from "src".

Move the helper function to parse log levels from string to
"nm-logging-base.h" so that we can use the same logging levels
outside of core.

This moves code that is currently GPL2+ licensed to
LGPL2.1+. However as far as I see, this code was entirely written
by Red Hat employees who would not object with this change. Also,
it's as obvious and trivial as it gets.
2019-11-28 19:20:33 +01:00
Thomas Haller
32d3a3f7ef shared: cleanup include guard for nm-logging-fwd.h 2019-11-28 19:20:33 +01:00
Thomas Haller
41d81e6893 shared/logging: add "nm-logging-base.h"
We have "nm-logging-fwd.h", which (as the name implies) is header-only.
Add instead a "nm-logging-base.c", which also contains implementation for
logging functions that are not only useful under "src/nm-logging.c"
2019-11-28 19:20:33 +01:00