public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Walter <srwalter@yahoo.com>
To: rusty@linuxcare.com
Cc: linux-kernel@vger.kernel.org
Subject: Trouble with an ip_conntrack_helper
Date: Mon, 12 Mar 2001 18:45:18 -0600	[thread overview]
Message-ID: <20010312184518.A4793@hapablap.dyn.dhs.org> (raw)

I'm getting some interesting behavior while writing an ip_conntrack
helper module.  The primary problem is if I specify a destination port
for the struct ip_conntrack_helper, my help routine is never called.
If I specify a source port, rather than a destination port, the routine
gets called for the various packets in the desired connection.

The problem with this is that I my routine doesn't start getting called
until a packet in the opposite direction arrives, and all packets before
that are never sent by my module.  This makes sense, as the tuple
specifies a /source/ port, which would only occur on reverse traffic.

Here is the chunk of code I'm using to register my helper.  Is there
something really obvious that I'm missing.  I really appreciate any help
you can give.

static struct ip_conntrack_helper icq;

static int __init init(void) {
        memset(&icq, 0, sizeof(struct ip_conntrack_helper));
        icq.tuple.dst.protonum = IPPROTO_UDP;
        icq.tuple.dst.u.udp.port = __constant_htons(4000);
        icq.mask.dst.protonum = 0xffff;
        icq.mask.dst.u.udp.port = 0xffff;
        icq.help = help;
        printk(KERN_INFO "ip_conntrack_icq: registered\n");
        return ip_conntrack_helper_register(&icq);
}


-- 
-Steven
Never ask a geek why, just nod your head and slowly back away.

                 reply	other threads:[~2001-03-13  0:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20010312184518.A4793@hapablap.dyn.dhs.org \
    --to=srwalter@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@linuxcare.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox