netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: "Martin Schiller" <mschiller@tdt.de>
Cc: netdev@vger.kernel.org
Subject: Re: Suppress / delay SYN-ACK
Date: Thu, 12 Oct 2006 10:38:18 +0200	[thread overview]
Message-ID: <200610121038.18309.dada1@cosmosbay.com> (raw)
In-Reply-To: <000101c6edd5$a880d430$1a04010a@V505CP>

On Thursday 12 October 2006 10:08, Martin Schiller wrote:
> Hi!
>
> I'm searching for a solution to suppress / delay the SYN-ACK packet of a
> listening server (-application) until he has decided (e.g. analysed the
> requesting ip-address or checked if the corresponding other end of a
> connection is available) if he wants to accept the connect request of the
> client. If not, it should be possible to reject the connect request.
>
> My idea is to add two ioctl's:
> 	- One to set the listening socket into "delay_synack" mode.
> 	- And one to send the synack packet, if the connection should be
> accepted.
>
> If the "delay_synack" mode is not enabled, the connection should just work
> as usual.
>
> I had a look at the tcp/ipv4 stack for a while and have found out, that
> this three-way-handshake is already done before anything comes up to
> user-space when I am doing a call to accept(). So I think it wouldn't be
> possible to add this feature with "a little hack".
>

Well, it is already possible to delay the 'third packet' of an outgoing 
connection with a litle hack. But AFAIK not the SYNACK of incoming 
connection. It could be cool. Maybe some new syscalls are needed:

int syn_recv(int socklisten, ...);
/* give to user app the SYN packet */
int syn_ack(int socklisten, ...);
/* User app has the ability to ask kernel tcp stack to :
    DROP this packet.
    REJECT the attempt
    ACCEPT the attempt (sending a SYN/ACK)
*/

Maybe NETLINK (netfilter) is able to meet your need.

> Does anybody have any hints for me where I should start to work?
>
> Regards,
> Martin Schiller

  reply	other threads:[~2006-10-12  8:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12  8:08 Suppress / delay SYN-ACK Martin Schiller
2006-10-12  8:38 ` Eric Dumazet [this message]
2006-10-12 10:13   ` Martin Schiller
2006-10-12 10:31     ` Evgeniy Polyakov
2006-10-12 10:39       ` Eric Dumazet
2006-10-12 10:53         ` Evgeniy Polyakov
2006-10-12 10:36     ` Eric Dumazet
2006-10-12 16:13 ` Rick Jones
2006-10-12 21:58   ` Caitlin Bestler
2006-10-12 22:12     ` jamal
2006-10-12 22:54     ` Rick Jones
2006-10-13  0:57       ` Stephen Hemminger
2006-10-13  4:11       ` Eric Dumazet
2006-10-13 16:39         ` Rick Jones
2006-10-13 20:13           ` Eric Dumazet
2006-10-13 21:50             ` Rick Jones
2006-10-16  6:52             ` Martin Schiller
2006-10-13  5:41     ` Stephen J. Bevan
2006-10-13  6:28       ` Martin Schiller
2006-10-16  7:02 ` Lennert Buytenhek
2006-10-17 12:04   ` Martin Schiller
2006-10-17 12:54     ` Eric Dumazet
2006-10-18  6:23       ` Martin Schiller

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=200610121038.18309.dada1@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=mschiller@tdt.de \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).