[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101005144615.0f84d53a@s6510>
Date: Tue, 5 Oct 2010 14:46:15 +0900
From: Stephen Hemminger <shemminger@...tta.com>
To: Nicola Padovano <nicola.padovano@...il.com>
Cc: netfilter-devel <netfilter-devel@...r.kernel.org>,
netdev@...r.kernel.org
Subject: Re: checkentry function
On Sat, 2 Oct 2010 13:59:30 +0200
Nicola Padovano <nicola.padovano@...il.com> wrote:
> Hello there.
> I've written checkentry function to check my new target, in this way:
>
> [CHECK_ENTRY_CODE]
> static bool xt_tarpit_check(const char *tablename, const void *entry,
> const struct xt_target *target, void *targinfo,
> unsigned int hook_mask)
> {
> if (strcmp(tablename, "filter")) {
> printk(KERN_INFO "DEBUG: the tablename (not FILTER) is %s\n",tablename);
> return false;
> }
> return true;
> }
> [/CHECK_ENTRY_CODE]
>
> but it doesn't work.
> In fact if I do:
>
> iptables -A INPUT -t filter -s 192.168.0.1 -p tcp -j TAR
>
> the printk prints this message: DEBUG: the tablename (not FILTER) is: �%H �
>
> so: in the tablename i haven't the string "filter"...what' the matter?
>
In current kernels, checkentry returns errno values.
0 = okay
<0 is error (example -EINVAL).
--
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