netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Verify ACK packets in handshake in kernel module (Access TCP state table)
@ 2019-09-20 23:43 Swarm
  2019-09-21  3:15 ` Willy Tarreau
  0 siblings, 1 reply; 3+ messages in thread
From: Swarm @ 2019-09-20 23:43 UTC (permalink / raw)
  To: netdev

First time emailing to this mailing list so please let me know if I made a mistake in how I sent it. I'm trying to receive a notification from the kernel once it verifies an ACK packet in a handshake. Problem is, there is no API or kernel resource I've seen that supports this feature for both syncookies and normal handshakes. Where exactly in the kernel does the ACK get verified? If there isn't a way to be notified of it, where should I start adding that feature into the kernel?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Verify ACK packets in handshake in kernel module (Access TCP state table)
  2019-09-20 23:43 Verify ACK packets in handshake in kernel module (Access TCP state table) Swarm
@ 2019-09-21  3:15 ` Willy Tarreau
  2019-09-21  4:18   ` Yadunandan Pillai
  0 siblings, 1 reply; 3+ messages in thread
From: Willy Tarreau @ 2019-09-21  3:15 UTC (permalink / raw)
  To: Swarm; +Cc: netdev

On Fri, Sep 20, 2019 at 11:43:50PM +0000, Swarm wrote:
> First time emailing to this mailing list so please let me know if I made a
> mistake in how I sent it. I'm trying to receive a notification from the
> kernel once it verifies an ACK packet in a handshake. Problem is, there is no
> API or kernel resource I've seen that supports this feature for both
> syncookies and normal handshakes. Where exactly in the kernel does the ACK
> get verified? If there isn't a way to be notified of it, where should I start
> adding that feature into the kernel?

Just searching for TCP_ESTABLISHED immediately brought me to tcp_input.c
(tcp_rcv_state_process() to be precise), so I'm not sure you've searched
that much. As you've noticed there's nothing specifically called in this
case, but in practice a caller of accept() on a listening socket will be
woken up.

Hoping this helps,
Willy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Verify ACK packets in handshake in kernel module (Access TCP state table)
  2019-09-21  3:15 ` Willy Tarreau
@ 2019-09-21  4:18   ` Yadunandan Pillai
  0 siblings, 0 replies; 3+ messages in thread
From: Yadunandan Pillai @ 2019-09-21  4:18 UTC (permalink / raw)
  To: w; +Cc: netdev, thesw4rm

You're right. I clearly need to be more aware of where I am looking. I think I got tripped up because I was trying to only look at header files like a noob. There is a tcp_ack function there with flags for this purpose. Appreciate it!

Just one question, would it be acceptable to directly include the C file in a kernel module?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-21  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 23:43 Verify ACK packets in handshake in kernel module (Access TCP state table) Swarm
2019-09-21  3:15 ` Willy Tarreau
2019-09-21  4:18   ` Yadunandan Pillai

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).