From: Stephen Hemminger <shemminger@vyatta.com>
To: Nicola Padovano <nicola.padovano@gmail.com>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>,
netdev@vger.kernel.org
Subject: Re: checkentry function
Date: Tue, 5 Oct 2010 14:46:15 +0900 [thread overview]
Message-ID: <20101005144615.0f84d53a@s6510> (raw)
In-Reply-To: <AANLkTimeoRTBMY0OH5sDtVEfqFCx9F3go1qGKy5cJpWS@mail.gmail.com>
On Sat, 2 Oct 2010 13:59:30 +0200
Nicola Padovano <nicola.padovano@gmail.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 netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-10-05 5:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 11:59 checkentry function Nicola Padovano
2010-10-05 5:46 ` Stephen Hemminger [this message]
2010-10-05 5:52 ` Nicola Padovano
2010-10-05 6:01 ` Stephen Hemminger
2010-10-05 6:11 ` Nicola Padovano
2010-10-05 6:23 ` Eric Dumazet
2010-10-05 11:16 ` Nicola Padovano
2010-10-05 11:32 ` Jan Engelhardt
2010-10-05 11:46 ` Nicola Padovano
2010-10-05 12:03 ` Jan Engelhardt
2010-10-05 12:07 ` Eric Dumazet
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=20101005144615.0f84d53a@s6510 \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nicola.padovano@gmail.com \
/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.