| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/15
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/200
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, if "main.rc-manager" was set to "unmanaged"
and "/etc/resolv.conf" was symlink to our internal file
"/var/run/NetworkManager/resolv.conf", NM would not rewrite
the file, in an attempt to honor the requirement of NetworkManager
not changing resolv.conf.
No longer special case this. I think it was wrong and inconsistent.
If the user specifies rc-manager unmanaged, he also should manage
/etc/resolv.conf accordingly. And if the user decided to symlink
it to our internal file, that is fine. It should not stop NM from
updating that file.
Also, this was the only cases, where NM would not write our internal
resolv.conf (errors aside). It was inconsitent, and also not documented
behavior. Instead, it is documented that `man NetworkManager.conf`:
Regardless of this setting, NetworkManager will always write
resolv.conf to its runtime state directory
/var/run/NetworkManager/resolv.conf.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a DNS plugin is enabled (like "main.dns=dnsmasq" or "main.dns=systemd-resolved"),
the name servers announced to the rc-manager are coerced to be 127.0.0.1
or 127.0.0.53.
Depending on the "main.rc-manager" setting, also "/etc/resolv.conf"
contains only this coerced name server to the local caching service.
The same is true for "/var/run/NetworkManager/resolv.conf" file, which
contains what we would write to "/etc/resolv.conf" (depending on
the "main.rc-manager" configuration).
Write a new file "/var/run/NetworkManager/no-stub-resolv.conf", which contains
the original name servers, uncoerced. Like "/var/run/NetworkManager/resolv.conf",
this file is always written.
The effect is, when one enables "main.dns=systemd-resolved", then there
is still a file "no-stub-resolv.conf" with the same content as with
"main.dns=default".
The no-stub-resolv.conf may be a possible solution, when a user wants
NetworkManager to update systemd-resolved, but still have a regular
/etc/resolv.conf [1]. For that, the user could configure
[main]
dns=systemd-resolved
rc-manager=unmanaged
and symlink "/etc/resolv.conf" to "/var/run/NetworkManager/no-stub-resolv.conf".
This is not necessarily the only solution for the problem and does not preclude
options for updating systemd-resolved in combination with other DNS plugins.
[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/20
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The D-Bus path is a useful property, also exposed via
nm_object_get_path() function. Don't mark it to be
skipped from documentation and introspection.
This was changed in "1f5b48a59e libnm: use the o.fd.DBus.ObjectManager
API for object management" and was an API breakage of libnm.
This also caused a bug in gnome-shell [1].
[1] https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/240/diffs
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1628263
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/16
Fixes: 1f5b48a59eb46c40cb10bf4381b2b21a19a9f471
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first DHCP renew after setting back Ethernet metric to default (-1)
applies a metric of 4294967295 (uint16 -1) instead of the default metric.
The route becomes:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 700 0 0 ppp0
0.0.0.0 192.168.19.193 0.0.0.0 UG -1 0 0 eth0
10.64.64.64 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.64.64.64 0.0.0.0 255.255.255.255 UH 700 0 0 ppp0
10.250.0.0 0.0.0.0 255.255.0.0 U 50 0 0 tun0
192.168.19.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
192.168.19.193 0.0.0.0 255.255.255.255 UH 100 0 0 eth0
217.114.201.194 192.168.19.193 255.255.255.255 UGH 100 0 0 eth0
Route update traces:
Sep 20 09:53:11.869027 tap-0FB1 NetworkManager[762]: <debug> libsystemd: DHCP CLIENT (0xfd5eaeb9): REQUEST (renewing)
Sep 20 09:53:11.873766 tap-0FB1 NetworkManager[762]: <debug> libsystemd: DHCP CLIENT (0xfd5eaeb9): ACK
Sep 20 09:53:11.873792 tap-0FB1 NetworkManager[762]: <debug> libsystemd: DHCP CLIENT (0xfd5eaeb9): lease expires in 1min 58s
Sep 20 09:53:11.873800 tap-0FB1 NetworkManager[762]: <debug> libsystemd: DHCP CLIENT (0xfd5eaeb9): T2 expires in 1min 35s
Sep 20 09:53:11.873808 tap-0FB1 NetworkManager[762]: <debug> libsystemd: DHCP CLIENT (0xfd5eaeb9): T1 expires in 50s
Sep 20 09:53:11.873845 tap-0FB1 NetworkManager[762]: <debug> dhcp4 (eth0): client event 4
Sep 20 09:53:11.873853 tap-0FB1 NetworkManager[762]: <debug> dhcp4 (eth0): lease available
Sep 20 09:53:11.873881 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): address 192.168.19.100
Sep 20 09:53:11.873890 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): plen 24
Sep 20 09:53:11.873899 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): expires in 120 seconds
Sep 20 09:53:11.873916 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): nameserver '192.168.19.193'
Sep 20 09:53:11.873925 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): hostname 'TAPOFB1'
Sep 20 09:53:11.873932 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): gateway 192.168.19.193
Sep 20 09:53:11.874064 tap-0FB1 NetworkManager[762]: <info> dhcp4 (eth0): state changed bound -> bound
Sep 20 09:53:11.874082 tap-0FB1 NetworkManager[762]: <debug> device[0x558dc60b3140] (eth0): new DHCPv4 client state 1
Sep 20 09:53:11.874535 tap-0FB1 NetworkManager[762]: <debug> device[0x558dc60b3140] (eth0): ip4-config: update (commit=1, new-config=0x558dc6110be0)
Sep 20 09:53:11.874569 tap-0FB1 NetworkManager[762]: <debug> platform: address: adding or updating IPv4 address: 192.168.19.100/24 lft 120sec pref 120sec lifetime 237-0[120,120] dev 2 flags noprefixroute src unkn
Sep 20 09:53:11.874626 tap-0FB1 NetworkManager[762]: <trace> platform-linux: event-notification: RTM_NEWADDR, flags 0, seq 141: 192.168.19.100/24 lft 120sec pref 120sec lifetime 237-237[120,120] dev 2 flags noprl
Sep 20 09:53:11.874653 tap-0FB1 NetworkManager[762]: <debug> platform: signal: address 4 changed: 192.168.19.100/24 lft 120sec pref 120sec lifetime 237-237[120,120] dev 2 flags noprefixroute src kernel
Sep 20 09:53:11.874671 tap-0FB1 NetworkManager[762]: <debug> device[0x558dc60b3140] (eth0): queued IP4 config change
Sep 20 09:53:11.874699 tap-0FB1 NetworkManager[762]: <debug> platform-linux: do-add-ip4-address[2: 192.168.19.100/24]: success
Sep 20 09:53:11.874723 tap-0FB1 NetworkManager[762]: <debug> platform: route: append IPv4 route: 0.0.0.0/0 via 192.168.19.193 dev 2 metric 4294967295 mss 0 rt-src dhcp
Sep 20 09:53:11.874778 tap-0FB1 NetworkManager[762]: <trace> platform-linux: event-notification: RTM_NEWROUTE, flags excl,create, seq 142: 0.0.0.0/0 via 192.168.19.193 dev 2 metric 4294967295 mss 0 rt-src rt-dhcl
Sep 20 09:53:11.874809 tap-0FB1 NetworkManager[762]: <debug> platform: signal: route 4 added: 0.0.0.0/0 via 192.168.19.193 dev 2 metric 4294967295 mss 0 rt-src rt-dhcp scope global
Sep 20 09:53:11.874846 tap-0FB1 NetworkManager[762]: <debug> platform-linux: do-add-ip4-route[0.0.0.0/0 via 192.168.19.193 dev 2 metric 4294967295 mss 0 rt-src rt-dhcp scope global]: success
Sep 20 09:53:11.874867 tap-0FB1 NetworkManager[762]: <debug> platform: ip4-route: delete 0.0.0.0/0 via 192.168.19.193 dev 2 metric 100 mss 0 rt-src rt-dhcp scope global
Sep 20 09:53:11.874904 tap-0FB1 NetworkManager[762]: <trace> platform-linux: event-notification: RTM_DELROUTE, flags 0, seq 143: 0.0.0.0/0 via 192.168.19.193 dev 2 metric 100 mss 0 rt-src rt-dhcp scope global
Sep 20 09:53:11.874930 tap-0FB1 NetworkManager[762]: <debug> platform: signal: route 4 removed: 0.0.0.0/0 via 192.168.19.193 dev 2 metric 100 mss 0 rt-src rt-dhcp scope global
Sep 20 09:53:11.874961 tap-0FB1 NetworkManager[762]: <debug> platform-linux: do-delete-ip4-route[0.0.0.0/0 via 192.168.19.193 dev 2 metric 100 mss 0 rt-src rt-dhcp scope global]: success
Sep 20 09:53:11.874983 tap-0FB1 NetworkManager[762]: <trace> platform: ip4-dev-route: register 192.168.19.0/24 via 0.0.0.0 dev 2 metric 0 mss 0 rt-src rt-kernel scope link pref-src 192.168.19.100 (update)
https://mail.gnome.org/archives/networkmanager-list/2018-September/msg00020.html
Fixes: b9e6433a024c13631c984797c964f1863de83113
|
|
|
|
|
| |
# nmcli connection up w ifname w
Error: device 'w' not compatible with connection 'w':The connection was not an Ethernet or PPPoE connection..
|
|
|
|
|
|
| |
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/42
While at it, update the section about logging.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't emit signals while popping acd events. Otherwise, we can get
a crash:
#0 0x000055c2bb094e3b in n_acd_pop_event (acd=0x0, eventp=eventp@entry=0x7ffd47de65b0) at shared/n-acd/src/n-acd.c:846
node = <optimized out>
t_node = <optimized out>
#1 0x000055c2baff53be in acd_event (source=<optimized out>, condition=<optimized out>, data=0x55c2bc4a6cf0) at src/devices/nm-acd-manager.c:180
self = 0x55c2bc4a6cf0
priv = 0x55c2bc4a6d08
__func__ = "acd_event"
event = 0x55c2bc593af0
info = 0x55c2bc4b76c0
address_str = "\000\000\000\000\000\000\000\000\bd\373\272\302U\000"
hwaddr_str = 0x0
r = <optimized out>
#2 0x00007eff336238f9 in g_main_context_dispatch (context=0x55c2bc41f480) at gmain.c:3146
dispatch = 0x7eff336688a0 <g_io_unix_dispatch>
prev_source = 0x0
was_in_call = 0
user_data = 0x55c2bc4a6cf0
callback = 0x55c2baff5310 <acd_event>
cb_funcs = 0x7eff338eb920 <g_source_callback_funcs>
cb_data = 0x55c2bc558680
need_destroy = <optimized out>
source = 0x55c2bc58c160
current = 0x55c2bc43dd10
i = 0
...
While at it, don't return from the events N_ACD_EVENT_DEFENDED,
N_ACD_EVENT_CONFLICT, and <default>, but continue popping events.
Fixes: d9a4b59c18e36f2b577744b7fe6710d71161ca12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
"manager: check_if_startup_complete returns FALSE because of eth0"
Now:
"manager: startup complete is waiting for device 'eth0' (autoactivate)"
Also, the logging line is now more a human readable sentence, but still
follows the same pattern as later
"manager: startup complete"
Meaning: grepping for "startup complete" becomes more helpful because
one first finds the reasons why startup-complete is not yet reached,
followed by the moment when it is reached.
|
| |
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/204
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Introspection can't be enabled on travis due to a GLib bug [1].
Therefore, gtk-doc must be disabled as well.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=774368
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The script didn't include all the symbols needed by plugins because
libNetworkManager.a, as built by meson, doesn't include symbols from
other static libraries that are linked in. Since we used
libNetworkManager.a to know which symbols are potentiall available
from NM, the result was an incomplete list.
Unfortunately, the only way to include the whole static library is to
create a dependency object and use 'link_whole', but this is only
available in meson >= 0.46. Since 'link_whole' is available for
executables in meson >= 0.40, create a fake executable and use that to
enumerate symbols.
Also add tests to check that plugins can be loaded correctly.
Fixes: dfa2a2b40c866bf7a5484b72639464c31b80e7da
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Turn the vapi option into a combo that allows autodetection and check
whether all prerequisites are satisfied (including introspection
support) when vapi is explicitly enabled.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/28
|
|/
|
|
|
|
|
| |
Adapt the meson post-installation script to handle the $DESTDIR
variable supplied by user to specify the installation target
directory. While at it, convert the script to shell because it seems
simpler to me.
|
|
|
|
|
|
| |
test-general.c:6612:19: error: unused variable 'buf_free_1'
[-Werror,-Wunused-variable]
gs_free gpointer buf_free_1 = NULL;
|
|
|
|
|
|
|
|
|
|
|
| |
char[] is not a char *; it can not go NULL.
test-ifupdown.c:147:27: error: address of array 'n->name' will always evaluate
to 'true' [-Werror,-Wpointer-bool-conversion]
g_assert (b->name && n->name);
test-ifupdown.c:156:27: error: address of array 'm->key' will always evaluate
to 'true' [-Werror,-Wpointer-bool-conversion]
g_assert (k->key && m->key);
|
|
|
|
|
|
|
|
|
|
|
|
| |
libnm-core/nm-crypto.c:191:39: error: unused variable 'data_content'
[-Werror,-Wunused-variable]
nm_auto_clear_secret_ptr NMSecretPtr data_content = { 0 };
libnm-core/nm-crypto.c:341:18: error: unused variable 'der'
[-Werror,-Wunused-variable]
gs_free guchar *der = NULL;
libnm-core/nm-crypto.c:518:16: error: unused variable 'output'
[-Werror,-Wunused-variable]
gs_free char *output = NULL;
|
|
|
|
|
|
| |
src/devices/nm-acd-manager.c:419:31: error: variable 'info' is uninitialized
when used here [-Werror,-Wuninitialized]
nm_utils_inet4_ntop (info->address, NULL),
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/206
|
| |
| |
| |
| |
| |
| | |
Also make sure the secrets request callback only send a reply to IWD and
the Connect method return callback executes the device state change to
"disconnected".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
state_changed (called when IWD signalled device state change) was
supposed to not change NM device state on connect success or failure and
instead wait for the DBus Connect() method callback but it would
actually still call nm_device_emit_recheck_auto_activate on failure so
refactor state_changed and network_connect_cb to make sure
the state change and nm_device_emit_recheck_auto_activate are only
called from network_connect_cb.
This fixes a race where during a switch from one network to another NM
would immediately start a new activation after state_changed and
network_connect_cb would then handle the Connect failure and mark the
new activation as failed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When creating the mirror 802.1x connections for IWD 802.1x profiles
set the NM_SETTING_SECRET_FLAG_NOT_SAVED flag on the secrets that
may at some point be requested from our agent. The saved secrets could
not be used anyway because of our use of
NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW in
nm_device_iwd_agent_query. But also try to respect whatever secret
caching policy has been configured in the IWD profile for those secrets,
IWD would be responsible for storing them if it was allowed in the
profile.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In two places stop using g_dbus_proxy_new_* to create whole new
interface proxy objects for net.connman.iwd.Network as this will
normally have a huge overhead compared to asking the ObjectManager
client that we already have in NMIwdManager for those proxies.
dbus-monitor shows that for each network path returned by
GetOrderedNetworks () -- and we call it every 10 or 20 seconds and may
get many dozens of networks back -- gdbus would do the following each
time:
org.freedesktop.DBus.AddMatch("member=PropertiesChanged")
org.freedesktop.DBus.StartServiceByName("net.connman.iwd")
org.freedesktop.DBus.GetNameOwner("net.connman.iwd")
org.freedesktop.DBus.Properties.GetAll("net.connman.iwd.Network")
org.freedesktop.DBus.RemoveMatch("member=PropertiesChanged")
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
https://github.com/NetworkManager/NetworkManager/pull/116
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need a mode that:
* doesn't leave processes behind
* doesn't force an internal dhclient
* doesn't auto-generate default connections
* doesn't write out files into libdir, only /run
The original configure-and-quit mode doesn't really fit the initrd use. But
it's proobably not a good idea to just change its behavior.
|
| |
| |
| |
| |
| | |
It makes no sense, results in unnecessary complexity both in code and in
code comments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is useful for in-memory connections to persist NetworkManager
restarts (as opposed to machine restarts).
Perhaps most improtantly, this allows generating in-memory connections outside
NetworkManager, e.g. passing configuration from early boot firmware in initrd.
Note that this does *not* aspire to do more than it says on the tin:
Notably, it doesn't touch the problem of provisioning connections in multiple
persistent connection directories and thus doesn't have to deal with the
problem of deleting or overlaying the connections tha (rh #772414) deals
with.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Especially with configure-and-quit, it's easy to encounter a condition,
where the device reached a failed state, policy decides to quit, but the
active connection is not yet torn down from the device.
Upon the next start NetworkManager would think the connection succeeded
activating.
|