All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tomasz Chilinski" <chilek@chilan.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] masquerade and mac problem
Date: Sat, 04 Sep 2004 15:44:45 +0000	[thread overview]
Message-ID: <20040904153822.M39607@chilan.com> (raw)
In-Reply-To: <20040904121939.70148.qmail@web60001.mail.yahoo.com>

On Sat, 4 Sep 2004 08:21:21 -0700 (PDT), Sorin Capra wrote 
>    Thank you for the quick reply 
>    
>    It works now , but I still have one question : why didn't it work before
(in FORWARD) ? It should have worked , shouldn't it ? 

1) Have you tried to do:
iptables -t filter -L -nv
and check if counters are non-zero for rules with mac source matches?
2) In kernel source I have found something like this
(net/ipv4/netfilter/ipt_mac.c file):
static int
ipt_mac_checkentry(const char *tablename,
                   const struct ipt_ip *ip,
                   void *matchinfo,
                   unsigned int matchsize,
                   unsigned int hook_mask)
{
        /* FORWARD isn't always valid, but it's nice to be able to do --RR */
        if (hook_mask
            & ~((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_IN)
                | (1 << NF_IP_FORWARD))) {
                printk("ipt_mac: only valid for PRE_ROUTING, LOCAL_IN or
FORWARD.\n");
                return 0;
        }

        if (matchsize != IPT_ALIGN(sizeof(struct ipt_mac_info)))
                return 0;

        return 1;
}

Maybe during traversing filter/FORWARD hook mac field in skb structure is not
valid, because packet is beeing forwarded between two ifaces.

> Bests,                                                                     
            
> Sorin 

Bests, 
Tomasz Chilinski 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2004-09-04 15:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 12:19 [LARTC] masquerade and mac problem Sorin Capra
2004-09-04 13:55 ` Tomasz Chilinski
2004-09-04 15:44 ` Tomasz Chilinski [this message]
2004-09-04 17:18 ` Ilia Lindov

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=20040904153822.M39607@chilan.com \
    --to=chilek@chilan.com \
    --cc=lartc@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.