NetworkManager/src/core
Beniamino Galvani f1cdd702e3 device: send ARP announcements when there is carrier
Previously we sent announcements immediately for non-controllers, or
after the first port was attached for controllers.

This has two problems:

 - announcements can be sent when there is no carrier and they would
   be lost;

 - if a controller has a port, the port could be itself a controller;
   in that case we start sending ARPs with the fake address of the
   port. Later, when a leaf port is added to the second-level
   controller, the correct port MAC will be propagated by kernel up to
   both controllers.

To solve both problems, send ARP announcements only when the interface
has carrier. This also solves the second issue because controllers
created by NM have carrier only when there is a port with carrier.

Fixes: de1022285a ('device: do ARP announcements only after masters have a slave')

https://bugzilla.redhat.com/show_bug.cgi?id=1956793
(cherry picked from commit 1377f160ed)
(cherry picked from commit 70aeccf605)
2021-07-13 09:40:17 +02:00
..
devices device: send ARP announcements when there is carrier 2021-07-13 09:40:17 +02:00
dhcp dhcp: fix nm_dhcp_lease_data_parse_cstr() to correctly detect NUL chars 2021-06-04 21:26:40 +02:00
dns core: force emission of DNS_CONFIG_CHANGED signal on SIGUSR1 2021-06-10 18:08:24 +02:00
dnsmasq all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
initrd Revert "initrd: set the bootif MAC in existing connection with ifname" 2021-03-26 07:33:40 +01:00
ndisc shared: remove "str" argument from nm_str_buf_reset() 2021-02-11 09:23:06 +01:00
platform core: don't add dependent local route for addresses 2021-03-24 14:24:54 +01:00
ppp all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
settings ifcfg-rh: preserve an empty tc configuration 2021-06-17 17:07:05 +02:00
supplicant supplicant: fix leaking handle in nm_supplicant_manager_create_interface() 2021-06-10 16:03:20 +02:00
systemd all: add "nm-default-systemd{,-shared}.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
tests systemd/tests: avoid using g_free() with buffers allocated with malloc() in _test_unbase64mem_mem() 2021-06-04 21:25:39 +02:00
vpn all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
main-utils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
main-utils.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
main.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
meson.build libnm: merge libnm-keyfile into libnm-core 2021-02-09 12:38:19 +01:00
NetworkManagerUtils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
NetworkManagerUtils.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-act-request.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-act-request.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-active-connection.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-active-connection.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-audit-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-audit-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-auth-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-auth-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-auth-utils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-auth-utils.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-checkpoint-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-checkpoint-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-checkpoint.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-checkpoint.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-config-data.c core: fix leak in _config_data_get_main_auth_polkit() 2021-06-04 20:33:45 +02:00
nm-config-data.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-config.c libnm: merge libnm-keyfile into libnm-core 2021-02-09 12:38:19 +01:00
nm-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-connectivity.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-connectivity.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-core-utils.c wifi: fix parsing Microsoft Network Cost IE 2021-06-04 20:52:25 +02:00
nm-core-utils.h all: drop unnecessary cast of g_object_new() 2021-02-08 17:02:09 +01:00
nm-dbus-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dbus-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-dbus-object.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dbus-object.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-dbus-utils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dbus-utils.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-dcb.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dcb.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-default-daemon.h all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dhcp-config.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dhcp-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-dispatcher.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-dispatcher.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-firewall-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-firewall-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-hostname-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-hostname-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-iface-helper.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-ip-config.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-ip-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-ip4-config.c core: don't add dependent local route for addresses 2021-03-24 14:24:54 +01:00
nm-ip4-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-ip6-config.c core: don't add dependent local route for addresses 2021-03-24 14:24:54 +01:00
nm-ip6-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-keep-alive.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-keep-alive.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-l3-config-data.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-l3-config-data.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-l3-ipv4ll.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-l3-ipv4ll.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-l3cfg.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-l3cfg.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-manager.c manager: fix assertion failure in active_connection_find() 2021-06-02 15:39:13 +02:00
nm-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-netns.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-netns.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-pacrunner-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-pacrunner-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-policy.c policy: prefer IPv4 to determine the hostname 2021-06-21 09:00:49 +02:00
nm-policy.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-proxy-config.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-proxy-config.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-rfkill-manager.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-rfkill-manager.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-session-monitor.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-session-monitor.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-sleep-monitor.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-sleep-monitor.h all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-test-utils-core.h libnm: merge libnm-keyfile into libnm-core 2021-02-09 12:38:19 +01:00
nm-types.h core: add NM_IP_ROUTE_TABLE_SYNC_MODE_ALL_PRUNE mode 2021-03-24 14:24:53 +01:00
org.freedesktop.NetworkManager.conf all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00