[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1286259838.2457.11.camel@edumazet-laptop>
Date: Tue, 05 Oct 2010 08:23:58 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Nicola Padovano <nicola.padovano@...il.com>
Cc: Stephen Hemminger <shemminger@...tta.com>,
netfilter-devel <netfilter-devel@...r.kernel.org>,
netdev@...r.kernel.org
Subject: Re: checkentry function
Le mardi 05 octobre 2010 à 08:11 +0200, Nicola Padovano a écrit :
> >
> > Negative (ie < 0) is used for error numbers. This is confusing
> > because in older kernels the checkentry returned a bool which
> > is defined as 1 okay and 0 for error.
> >
> ok i see.
>
> and why i have this output?
> DEBUG: the tablename (not FILTER) is: �%H �
>
> I want block my target if the table name is NOT filter...so i write:
>
> [CODE]
> ...
> if (strcmp(tablename, "filter")) {
> printk(KERN_INFO "DEBUG: the tablename (not FILTER) is %s\n",tablename);
> return ERROR_VALUE; // < 0
> }
> [/CODE]
>
> but in the tablename variable i haven't the table's right value (but i
> have: �%H � a wrong value)...what's the problem?
>
>
Because xxx_check() signature is not the one you use.
Could you read source code of _current_ existing modules , and use
copy/paste ?
static int hashlimit_mt_check(const struct xt_mtchk_param *par)
{
...
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists