Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: xt_LOG: do print MAC header on FORWARD

I am observing consistent behavior even with bridges, so let's unlock
this. xt_mac is already usable in FORWARD, too. Section 9 of
http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html#section9 says
the MAC source address is changed, but my observation does not match
that claim -- the MAC header is retained.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
[Patrick; code inspection seems to confirm this]
Signed-off-by: Patrick McHardy <kaber@trash.net>

authored by

Jan Engelhardt and committed by
Patrick McHardy
b468645d ca361810

+2 -4
+1 -2
net/ipv4/netfilter/ipt_LOG.c
··· 442 442 } 443 443 #endif 444 444 445 - /* MAC logging for input path only. */ 446 - if (in && !out) 445 + if (in != NULL) 447 446 dump_mac_header(m, loginfo, skb); 448 447 449 448 dump_packet(m, loginfo, skb, 0);
+1 -2
net/ipv6/netfilter/ip6t_LOG.c
··· 452 452 in ? in->name : "", 453 453 out ? out->name : ""); 454 454 455 - /* MAC logging for input path only. */ 456 - if (in && !out) 455 + if (in != NULL) 457 456 dump_mac_header(m, loginfo, skb); 458 457 459 458 dump_packet(m, loginfo, skb, skb_network_offset(skb), 1);