NetworkManager/src/core
Fernando Fernandez Mancera 3f2f922dd9 bonding: send ARP announcement on bonding-slb link/carrier down
When a bond in balance-slb is created, the ports are enabled or disabled
based on carrier and link state. If the link/carrier goes down, the port
becomes disabled and we must make sure the MAC tables of the switches
are updated properly so the traffic is redirected.

In order to solve this, we send a GARP or RARP broadcast packet on the
bond. This fix cover 3 different balance-slb scenarios.

Scenario 1: The bond in balance-slb mode has IPv4 address configured and
some ports connected. Here the bond is acting like active-backup as the
packets will always have as source MAC the address of the bond
interface. When a port goes down, NetworkManager will send a GARP
broadcast announcing the address configured on the bond with the MAC
address configured on the port.

Scenario 2: The bond in balance-slb mode is connected to a bridge and has
some ports connected. The bridge has IPv4 configured. When a port goes
down, NetworkManager will send a GARP broadcast announcing the address
configured on the bridge with the MAC address configured on the port.

Scenario 3: The bond in balance-slb mode is connected to a bridge and
has some ports connected. The bridge does not have IP configuration and
therefore everything is L2. When a port goes down, NetworkManager will
query the FDB table and filter the entries by the ones belonging to the
bridge and the bond ifindexes. Then, it will send a RARP broadcast
announcing every learned MAC address from FDB.

Fixes: e9268e3924 ('firewall: add mlag firewall utils for multi chassis link aggregation (MLAG) for bonding-slb')
2024-12-18 14:45:54 +01:00
..
devices bonding: send ARP announcement on bonding-slb link/carrier down 2024-12-18 14:45:54 +01:00
dhcp dhcp: allow changing MIN_V6ONLY_WAIT via environment variable 2024-10-23 15:01:20 +02:00
dns format: run nm-code-format 2024-10-04 11:07:35 +02:00
dnsmasq ip: configurable address pool and lease time of DHCP server in shared mode 2024-12-11 09:20:15 +01:00
ndisc ndisc: honor default route parameters from RA route options 2024-12-06 09:03:32 +01:00
platform platform: support specifying the fwmark in ip_route_get() 2024-10-23 15:06:59 +02:00
ppp format: run nm-code-format 2024-10-04 11:07:35 +02:00
settings keyfile: emit a warning when the gateway is set in different keys 2024-12-03 17:17:53 +01:00
supplicant format: run nm-code-format 2024-10-04 11:07:35 +02:00
tests core: increase timeout for test_nm_utils_kill_child() 2024-11-08 17:32:09 +01:00
vpn vpn: Place gateway route to table defined in ipvx.route-table 2024-12-12 19:39:41 +08:00
main-utils.c core: Fix unextractable translation string 2023-12-18 15:53:16 +01:00
main-utils.h core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01:00
main.c core/dbus: "RequestName" of NetworkManager D-Bus API later to fix race 2023-03-23 13:06:57 +01:00
meson.build ipvlan: add support to IPVLAN interface 2024-09-18 13:19:42 +02:00
NetworkManagerUtils.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
NetworkManagerUtils.h core: add nm_match_spec_device_data_init_from_platform() helper 2023-06-14 11:07:34 +02:00
nm-act-request.c src: drop most master references from the code 2024-08-09 15:47:32 +02:00
nm-act-request.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-active-connection.c core: rename NM_DEVICE_MANAGED_TYPE_MANAGED to _TYPE_FULL 2024-08-28 15:35:56 +02:00
nm-active-connection.h src: drop most master references from the code 2024-08-09 15:47:32 +02:00
nm-audit-manager.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-audit-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-manager.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-auth-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-utils.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-auth-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-bond-manager.c bonding: send ARP announcement on bonding-slb link/carrier down 2024-12-18 14:45:54 +01:00
nm-bond-manager.h bonding: send ARP announcement on bonding-slb link/carrier down 2024-12-18 14:45:54 +01:00
nm-checkpoint-manager.c core: use nm_dbus_manager_lookup_object_with_type() 2022-03-13 12:02:08 +01:00
nm-checkpoint-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-checkpoint.c checkpoint: preserve in-memory state of connections 2024-05-02 16:49:23 +02:00
nm-checkpoint.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-config-data.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-config-data.h src: drop most slave references from the code 2024-08-09 15:47:32 +02:00
nm-config.c core: print the internal configuration file with "--print-config" 2024-11-04 17:04:52 +01:00
nm-config.h connectivity: Add a timeout option to connectivity checks 2024-06-24 09:21:34 +00:00
nm-connectivity.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-connectivity.h Updated code format 2024-04-08 06:35:20 +00:00
nm-core-utils.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-core-utils.h Updated code format 2024-04-08 06:35:20 +00:00
nm-dbus-manager.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-dbus-manager.h core/dbus: split RequestName D-Bus call out of initialization for NMDBusManager 2023-03-23 13:06:57 +01:00
nm-dbus-object.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-object.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-dbus-utils.c dbus: add helper macros for GDBusAnnotationInfo 2024-01-16 09:28:17 +01:00
nm-dbus-utils.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-dcb.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dcb.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-default-daemon.h libnm: move nm-errors.h include away from nm-connection.h 2022-11-13 23:36:37 +01:00
nm-dhcp-config.c all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dhcp-config.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dispatcher.c device: support creating generic devices via device-handler 2024-02-21 11:16:05 +01:00
nm-dispatcher.h dispatcher: read device-handler's stdout into a dictionary 2024-02-21 11:16:04 +01:00
nm-firewall-utils.c bonding: steer IGMP queries to the active bond balance-slb primary port 2024-10-18 11:50:04 +02:00
nm-firewall-utils.h bond: don't configure "counter" on nft rules for slb-bonding/mlag 2023-05-10 19:03:40 +02:00
nm-firewalld-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewalld-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-hostname-manager.c hostname: combine implementations of read_hostname() for Gentoo and Slackware 2023-02-08 09:51:25 +01:00
nm-hostname-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-ip-config.c l3cfg: simplify signals 2024-10-23 15:06:58 +02:00
nm-ip-config.h core: rate-limit updates to IP addresses/routes on D-Bus API 2023-11-30 15:41:43 +01:00
nm-keep-alive.c doc: replace all (allow-none) annotations by (optional) and/or (nullable) 2023-03-27 11:49:43 +02:00
nm-keep-alive.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-l3-config-data.c l3cfg: add flag 'routed-dns' to NML3ConfigData 2024-10-23 15:38:35 +02:00
nm-l3-config-data.h l3cfg: add flag 'routed-dns' to NML3ConfigData 2024-10-23 15:38:35 +02:00
nm-l3-ipv4ll.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-l3-ipv4ll.h all: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
nm-l3-ipv6ll.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-l3-ipv6ll.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-l3cfg.c l3cfg: add helper function to fetch all the IPv4 configured addresses 2024-12-18 14:45:54 +01:00
nm-l3cfg.h l3cfg: add helper function to fetch all the IPv4 configured addresses 2024-12-18 14:45:54 +01:00
nm-manager.c l3cfg: remove routes added by NM on reapply 2024-12-11 15:52:09 +00:00
nm-manager.h checkpoint: Allow rollback on internal global DNS 2024-03-13 20:52:37 +08:00
nm-netns.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-netns.h core: remove unused tag-less API from nm_netns_watcher*() 2023-03-21 15:58:46 +01:00
nm-pacrunner-manager.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-pacrunner-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-policy.c core: support automatically adding DNS routes 2024-10-23 15:38:36 +02:00
nm-policy.h core: expose and rename nm_policy_device_recheck_auto_activate_schedule() 2023-04-27 08:35:27 +02:00
nm-power-monitor.c power-monitor: fix "shutdown" signal definition 2024-04-04 11:12:18 +02:00
nm-power-monitor.h connection: add support to down-on-poweroff 2024-03-04 18:16:54 +00:00
nm-priv-helper-call.c nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-priv-helper-call.h nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-rfkill-manager.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-rfkill-manager.h platform: remove CSME related code 2023-09-25 11:46:24 +00:00
nm-session-monitor.c all: prefer nm wrappers to automatically attach GSource to default context 2022-03-13 11:59:42 +01:00
nm-session-monitor.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-test-utils-core.h all: replace NMP_IFNAMSIZ with NM_IFNAMSIZ 2023-05-30 08:51:10 +02:00
nm-types.h src: drop most slave references from the code 2024-08-09 15:47:32 +02:00
org.freedesktop.NetworkManager.conf all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
README.l3cfg.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
README.next.ip-config.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00

core

The source code of the NetworkManager daemon.

NetworkManager is a daemon that provides a D-Bus API and a file-based API for configuring the network on a Linux host.

This is the daemon source code.