netfilter: xt_LOG: do print MAC header on FORWARD
authorJan Engelhardt <jengelh@medozas.de>
Mon, 15 Nov 2010 10:23:06 +0000 (11:23 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 15 Nov 2010 10:23:06 +0000 (11:23 +0100)
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>
net/ipv4/netfilter/ipt_LOG.c
net/ipv6/netfilter/ip6t_LOG.c

index 72ffc8fda2e9faca3ab8c4cf3682df0de4a44faa..d76d6c9ed9468263547a918936a76a1a9526b368 100644 (file)
@@ -442,8 +442,7 @@ ipt_log_packet(u_int8_t pf,
        }
 #endif
 
-       /* MAC logging for input path only. */
-       if (in && !out)
+       if (in != NULL)
                dump_mac_header(m, loginfo, skb);
 
        dump_packet(m, loginfo, skb, 0);
index 09c88891a753e725d8594edc68941b293d171100..05027b753721764b14035d04241be33d9bc47329 100644 (file)
@@ -452,8 +452,7 @@ ip6t_log_packet(u_int8_t pf,
               in ? in->name : "",
               out ? out->name : "");
 
-       /* MAC logging for input path only. */
-       if (in && !out)
+       if (in != NULL)
                dump_mac_header(m, loginfo, skb);
 
        dump_packet(m, loginfo, skb, skb_network_offset(skb), 1);