[removing kaber and davem from cc list]
On Mon, Aug 08, 2005 at 06:57:40AM +0000, Bart De Schuymer wrote:
quoted
So I think it should reflect exactly what you currently do in ebt_ulog.
The only diference is that you now get the ifindex and not the device
name string.
These two code fragments do not do the same thing. If indev is a bridge
port (meaning indev->br_port != NULL), then the NFULA_IFINDEX_PHYSINDEV
must be indev, while the NFULA_IFINDEX_INDEV must be in->br_port->br-
quoted
dev->name.
If indev is not a bridge port, the ebt_ulog code makes
NFULA_IFINDEX_PHYSINDEV and NFULA_IFINDEX_INDEV the same (indev).
Ok, so this is actually the opposite problem of the ipt_physdev.c
problem. Here we have the physical device, but not the bridge group.
This means we have to handle two separate cases:
1) when nf_log_packet() gets called from the bridging code
indev == eth0
outdev == eth1
-> we need to resolve br0 from dev->br_port member
2) when nf_log_packet() gets called from the ipv4 code:
indev == br0
outdev == br0
-> we need to resolve ethX from skb->nf_bridge member
If I'm now correct, what about the following [reverse] patch (also
attached the whole resulting file for your reference, since you don't
have access to the tree).
--
- Harald Welte [off-list ref] http://netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie