Op vr, 05-08-2005 te 19:10 +0200, schreef Harald Welte:
> What about the following (only compile-tested) patch ?
> 
> [NETFILTER] add phys{in,out}dev support to nfnetlink_log and nfnetlink_queue
> 
> Since bridges don't have a 'reasonable' input and output net_device
> (e.g. 'br0'), we need to add seperate TLV's for the 'physindev' and 
> 'physoutdev'
> to get to the real underlying device (e.g. 'eth0').
> 
> I really hate to have those CONFIG_BRIDGE_NETFILTER ifdef's all over the
> code - but for now we have them almost everywhere, so two more doesn't
> hurt.  At some point we need to get rid of this ugliness and have something
> like an 'input device stack' that can be traversed.

I'm not sure if I understand that, how could this be used to know if
BRIDGE_NETFILTER was configured?


> +#ifdef CONFIG_BRIDGE_NETFILTER
> +             if (indev->br_port) {
> +                     tmp_uint = htonl(indev->br_port->br->dev->ifindex);
> +                     NFA_PUT(inst->skb, NFULA_IFINDEX_PHYSINDEV,
> +                             sizeof(tmp_uint), &tmp_uint);
> +             }

indev->br_port->br->dev->ifindex points to the ifindex of the bridge br0
when indev is a bridge port (eth0). So you need this to fill in the
input device (assuming we agree that the bridge is called the input
device, and the bridge port is called the physical input device).
Filling in the physical input device is done with indev (in case
indev->br_port is not NULL).

I can't easily get access to net-2.6.14, so I can't have a full view on
things. If you were to change ebt_ulog, you must also make sure that the
physindev is used for NFULA_IFINDEX_PHYSINDEV. The input_dev member of
the skb will be eth0 if the physindev is known.

Analogous comments hold for the other similar parts of your patch.

cheers,
Bart


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to