Re: ebtables among match bug

Grzegorz Borowiak <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
On Sat, 16 Apr 2005, Carl-Daniel Hailfinger wrote:

> Hi,
>
> everytime I try to use the "among" match extension, it explodes in my
> face with the following messages:
>
> # ebtables -t nat -A ipv4filter -i bridgeext0 --among-src 00:00:00:00:00:ff -j ACCEPT
>
> ebtables: among: wrong size: 1060against expected 1056, rounded to 1056
> kernel msg: ebtables bug: please report to author: match->check failed
>
> The reported sizes differ for different rules, but it is always 4 bytes
> bigger than expected.
>
> While trying to reproduce, I stumbled over another bug:
>
> # ebtables -t nat -A ipv4filter -i bridgeext0 --among-src 00:00:00:00:00:01 -j ACCEPT
>
> kernel msg: ebtables bug: please report to author: entries_size too small
>
> The machine in question is running kernel 2.6.11.7 on x86-64.

Thanks. The problem seem to be caused by integer types, which are defined
differently in user-space utility and in kernel (apparently 4-byte vs.
8-byte int), so there is a size mismatch.

Unfortunately, I don't have x86-64, so I cannot verify this. Would you be
so kind and try to replace all int by uint32_t in

include/linux/netfilter_bridge/ebt_among.h

and then recompile the kernel and the user-space utility? This should
work. Meanwhile, I'll update in CVS.

-- 
Grzes


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.