NetworkManager/src/core/devices
Wen Liang a8a2e6d727 ip-config: Support configuring per-device IPv4 sysctl forwarding option
Add support for configuring per-interface IPv4 sysctl forwarding setting
in NetworkManager. The feature allows users to configure the
net.ipv4.conf.<interface>.forward setting directly through
NetworkManager, enabling targeted forwarding configurations for
interfaces. This is particularly useful for cases such as enabling
forwarding for MetalLB load balancing without requiring a global
ip_forward=1 setting.

While forwarding setting can be managed via /etc/sysctl.conf,
configuring sysctl options for dynamically created or
software-configured interfaces (e.g., bridges) poses challenges. With
this feature, NetworkManager can configure these settings when
interfaces are created or updated, users no longer need to rely on
nm-dispatcher scripts for per-interface sysctl configuration, which can
be error-prone and complex. This feature ensures a more seamless and
integrated way to manage per-interface forwarding configurations,
reducing user overhead and improving usability in complex network
setups.

We do not support configuring per-device IPv6 sysctl forwarding because
in order to make per-device IPv6 sysctl forwarding work, we also need to
enable the IPv6 global sysctl forwarding setting, but this has potential
security concerns because it changes the behavior of the system to
function as a router, which expose the system to new risks and
unintended traffic flows, especially when enabling forwarding on the
interface the user previously explicitly disabled. Also enabling
per-device IPv6 sysctl setting will change the behavior of router
advertisement (accept_ra), which is not expected. Therefore, we
only support configuring per-device IPv4 sysctl forwarding option in
NetworkManager.

Resolves: https://issues.redhat.com/browse/RHEL-60237
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2071
https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1833
2025-04-01 09:32:46 -04:00
..
adsl device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
bluetooth device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
ovs format: run nm-code-format 2024-10-04 11:07:35 +02:00
team device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
tests lldp: use new libnm-lldp instead of systemd's sd_lldp_rx 2022-10-25 10:59:01 +02:00
wifi device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
wwan device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
meson.build all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-device-6lowpan.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-6lowpan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-bond.c Rephrase certain expressions to avoid the usage of the term "allows to" 2025-03-27 09:44:07 +01:00
nm-device-bond.h bonding: send ARP announcement on bonding-slb link/carrier down 2024-12-18 14:45:54 +01:00
nm-device-bridge.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-bridge.h device: support reapplying bridge-port VLANs 2024-08-21 07:29:37 +02:00
nm-device-dummy.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-dummy.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ethernet-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-device-ethernet-utils.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-device-ethernet.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-ethernet.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-factory.c manager: reword some error messages 2025-01-20 06:13:59 +01:00
nm-device-factory.h device/factory: document that some callbacks get an incomplete connection 2025-01-20 06:13:58 +01:00
nm-device-generic.c device: support creating generic devices via device-handler 2024-02-21 11:49:19 +01:00
nm-device-generic.h device: support creating generic devices via device-handler 2024-02-21 11:49:19 +01:00
nm-device-hsr.c hsr: drop supervision-address from HSR setting 2023-12-19 13:54:21 +01:00
nm-device-hsr.h HSR: add support to HSR/PRP interface 2023-12-05 08:05:56 +01:00
nm-device-infiniband.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-infiniband.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ip-tunnel.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-ip-tunnel.h devices: support VTI tunnels 2022-12-21 14:04:44 +01:00
nm-device-ipvlan.c device: don't log connection UUIDs on device creation 2025-01-20 06:13:59 +01:00
nm-device-ipvlan.h ipvlan: add support to IPVLAN interface 2024-09-18 13:19:42 +02:00
nm-device-logging.h core: log the device type when it can be ambiguous 2023-06-12 11:17:09 +02:00
nm-device-loopback.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-loopback.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-macsec.c device: get_connection_parent() accept incomplete connections 2025-01-20 06:13:58 +01:00
nm-device-macsec.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-macvlan.c device: don't log connection UUIDs on device creation 2025-01-20 06:13:59 +01:00
nm-device-macvlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ppp.c device: get_connection_parent() accept incomplete connections 2025-01-20 06:13:58 +01:00
nm-device-ppp.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-private.h device: remove 'const' qualifier from function signature 2024-10-23 15:38:34 +02:00
nm-device-tun.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-tun.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-utils.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-device-utils.h core: rename NM_DEVICE_MANAGED_TYPE_MANAGED to _TYPE_FULL 2024-08-28 15:35:56 +02:00
nm-device-veth.c veth: fix detection of existing interfaces in create_and_realize() 2022-12-19 10:47:13 +01:00
nm-device-veth.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vlan.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-vlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vrf.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-vrf.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vxlan.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-vxlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-wireguard.c firewall/wireguard: drop packets received to wrong interface 2025-04-01 08:08:52 +00:00
nm-device-wireguard.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-wpan.c device: simplify the nm_utils_complete_generic() machinery 2025-01-20 06:13:59 +01:00
nm-device-wpan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device.c ip-config: Support configuring per-device IPv4 sysctl forwarding option 2025-04-01 09:32:46 -04:00
nm-device.h vpn: fix routing rules support in vpn conenctions 2025-01-07 08:57:11 -05:00
nm-lldp-listener.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-lldp-listener.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00