Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Duncan Sands <baldrick@free.fr>
To: netfilter@lists.netfilter.org
Subject: masquerade_check: size 24 != 20
Date: Fri, 3 Oct 2003 15:35:32 +0200	[thread overview]
Message-ID: <200310031535.32150.baldrick@free.fr> (raw)

With 2.4.23-pre and 2.5/6 kernels my firewall setup fails at this line:

iptables -t nat -A atm0_masq -s 192.168.58.0/24 -d 0.0.0.0/0 -j MASQUERADE

(the kernel returns -EINVAL).  On the other hand it works with 2.4.20+gentoo patches
with the same .config.

The command gets as far as the checkentry call into ipt_MASQUERADE.c
(i.e. masquerade_check), at which point it bails out because the size of
the ip_nat_multi_range type (20) differs from the target_size (24) passed
to it:

translate_table: size 1112
Finished chain 0
Finished chain 3
Finished chain 4
find_inlist: loading `ipt_MASQUERADE'.
masquerade_check: size 24 != 20.
ip_tables: check failed for `MASQUERADE'.

The check in question is:

        if (targinfosize != IPT_ALIGN(sizeof(*mr))) {
                DEBUGP("masquerade_check: size %u != %u.\n",
                       targinfosize, sizeof(*mr));
                return 0;
        }

All this suggests to me that the size of some kernel structure has
changed.  Now Tom Eastep tried with the same kernel and didn't
get this, which is kind of informative: it suggests a different compiler
version padding things differently (my gcc version is 3.2.3), or some
config setting I have quietly changing the size of some object.  Before
rummaging around further, I thought I'd ask here if anyone has any
ideas.

Thanks for any help,

Duncan.



             reply	other threads:[~2003-10-03 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-03 13:35 Duncan Sands [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-03 12:46 masquerade_check: size 24 != 20 Duncan Sands
2003-10-03 17:22 ` Tom Eastep
2003-10-04  9:07   ` Duncan Sands
2003-10-04 13:18   ` Duncan Sands

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200310031535.32150.baldrick@free.fr \
    --to=baldrick@free.fr \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox