mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alvin Valera" <alvinvalera@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: Socket owner problem?
Date: Tue, 11 Sep 2007 16:38:06 +0800	[thread overview]
Message-ID: <8d33dcd40709110138h1bee46d2x8521f5b8f0d3a955@mail.gmail.com> (raw)
In-Reply-To: <8d33dcd40709110045v532e062ex7f05ac3ba9386161@mail.gmail.com>

Hi David,

Thanks for your quick reply.

> If that were true, anyone who could send those packets to your machine would
> be able to cause the system to hang too.

You're right to say that :)

> Perhaps you are feeding the packets
> back in at too high a layer.

Not really. In fact, I pass the packet back to the "lower layer" again
by calling netif_receive_skb(). Note that packets can go in a loop
here. To avoid queuing the same packets repeatedly, the module "marks"
them the first time they are queued. Marked packets are simply
NF_ACCEPT'ed by the module hook and therefore are propagated up the
netfilter chain.

> What object is this queue logically associated with? If the socket, you
> should probably hook 'release' so you can purge the queue when the socket is
> removed.

The queue is not associated with the socket. It is independent and is
meant just for the module to use for queuing packets that are supposed
to be delayed. But for each packet in this queue, there is an
associated kernel timer. Once this timer expires, the associated
packet is fed into the netif_receive_skb().


AV

  parent reply	other threads:[~2007-09-11  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1189496159.849702.82190@50g2000hsm.googlegroups.com>
2007-09-11  7:45 ` Alvin Valera
2007-09-11  8:01   ` David Schwartz
2007-09-11  8:38   ` Alvin Valera [this message]
2007-09-11  9:27     ` David Schwartz

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=8d33dcd40709110138h1bee46d2x8521f5b8f0d3a955@mail.gmail.com \
    --to=alvinvalera@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®