linux/drivers/net/bonding
Eric Dumazet 1746ef2e2d bonding: use skb_cow_head() in bond_do_alb_xmit() and rlb_arp_xmit()
In bond_do_alb_xmit() and rlb_arp_xmit(), make sure to unclone
skb head via skb_cow_head() before modifying the source MAC address
(Ethernet header and ARP payload) to avoid silent corruption if
the skb is shared or cloned. Avoid caching the header pointers
across skb_cow_head().

In rlb_arp_xmit(), only modify arp->mac_src if it differs from
tx_slave->dev->dev_addr to avoid an unnecessary copy and head
reallocation.

Also, we should not assume mac header is set in output path.

Use skb_eth_hdr() instead of eth_hdr() to fix the issue,
and remove now redundant skb_reset_mac_header() calls.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Cc: Jay Vosburgh <jv@jvosburgh.net>
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20260903143940.1180513-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-04 15:18:41 -07:00
..
bond_3ad.c bonding: no longer rely on RTNL in bond_fill_info() 2026-06-30 17:00:03 -07:00
bond_alb.c bonding: use skb_cow_head() in bond_do_alb_xmit() and rlb_arp_xmit() 2026-09-04 15:18:41 -07:00
bond_debugfs.c net: bonding: fix NULL deref in bond_debug_rlb_hash_show 2026-03-18 18:05:40 -07:00
bond_main.c bonding: do not clear curr_active_slave prematurely when releasing all slaves 2026-09-02 18:19:19 -07:00
bond_netlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-18 10:42:41 -07:00
bond_options.c net: bonding: annotate lockless writes with WRITE_ONCE() 2026-09-01 12:26:52 +02:00
bond_procfs.c bonding: annotate data-races in sysfs and procfs 2026-06-04 18:03:07 -07:00
bond_sysfs_slave.c bonding: 3ad: implement proper RCU rules for port->aggregator 2026-04-29 18:32:02 -07:00
bond_sysfs.c bonding: annotate data-races in sysfs and procfs 2026-06-04 18:03:07 -07:00
Makefile