[PATCH net-next v3 00/14] ipvlan: support mac-nat mode
From: Dmitry Skorodumov <hidden>
Date: 2025-11-05 16:14:58
ipvlan: Add support of MAC-NAT translation in L2-bridge Make it is possible to create link in L2_MACNAT mode: learnable bridge with MAC Address Translation. The IPs and MAC addresses will be learned from TX-packets of child interfaces. Also, dev_add_pack() protocol is attached to the main port to support communication from main to child interfaces. This mode is intended for the desktop virtual machines, for bridging to Wireless interfaces. The mode should be specified while creating first child interface. It is not possible to change it after this. This functionality is quite often requested by users. diff from v2: - forgotten patches (10..14) added diff from v1: - changed name of the mode to be L2_MACNAT - Fixed use of uninitialized variable, found by Intel CI/CD - Fixed style problems with lines more then 80 chars - Try to use xmastree style of vars declarations - Fixed broken intermediate compilation - Added check, that child-ip doesn't use IP of the main port - Added patch to ignore PACKET_LOOPBACK in handle_mode_l2() - Some patches with style-refactoring of addr-event notifications Dmitry Skorodumov (14): ipvlan: Preparation to support mac-nat ipvlan: Send mcasts out directly in ipvlan_xmit_mode_l2() ipvlan: Handle rx mcast-ip and unicast eth ipvlan: Added some kind of MAC NAT ipvlan: Forget all IP when device goes down ipvlan: Support GSO for port -> ipvlan ipvlan: Support IPv6 for learnable l2-bridge ipvlan: Make the addrs_lock be per port ipvlan: Take addr_lock in ipvlan_open() ipvlan: Don't allow children to use IPs of main ipvlan: const-specifier for functions that use iaddr ipvlan: Common code from v6/v4 validator_event ipvlan: common code to handle ipv6/ipv4 address events ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2() Documentation/networking/ipvlan.rst | 11 + drivers/net/ipvlan/ipvlan.h | 45 ++- drivers/net/ipvlan/ipvlan_core.c | 516 ++++++++++++++++++++++++--- drivers/net/ipvlan/ipvlan_main.c | 521 ++++++++++++++++++++++------ include/uapi/linux/if_link.h | 1 + 5 files changed, 925 insertions(+), 169 deletions(-) -- 2.25.1