netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Query regarding sk_filter
@ 2015-01-12 18:17 Alexei Starovoitov
  2015-01-12 18:00 ` Kumar Sanghvi
  0 siblings, 1 reply; 5+ messages in thread
From: Alexei Starovoitov @ 2015-01-12 18:17 UTC (permalink / raw)
  To: Kumar Sanghvi; +Cc: netdev@vger.kernel.org

On Sat, Jan 10, 2015 at 4:40 AM, Kumar Sanghvi <kumaras@chelsio.com> wrote:
>
> May be, the question that I should have asked is : do child socket and parent listening socket have the
> same sk_filter applied i.e. do child socket inherit sk_filter from parent listening socket ?

yes. socket returned from accept() inherits filter from parent socket.
if you're curious the path is:
tcp_check_req - tcp_v4_syn_recv_sock - tcp_create_openreq_child - sk_clone_lock

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Query regarding sk_filter
@ 2015-01-09 11:23 Kumar Sanghvi
  2015-01-10  0:51 ` Alexei Starovoitov
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Sanghvi @ 2015-01-09 11:23 UTC (permalink / raw)
  To: netdev

Hi netdev team,

I have a query regarding sk_filter call in tcp receive path:

In 'tcp_v4_rcv' function, if sk is found by __inet_lookup_skb then,
down the line, there is a call to sk_filter to ensure if the incoming packet 
is allowed to be processed for that sk.

However, in 'tcp_v4_hnd_req' function, if nsk is found by inet_lookup_established 
then, later, there does not seem to be a sk_filter call for that nsk in the receive 
path processing.

I am wondering shouldn't there be a sk_filter call on nsk found in 'tcp_v4_hnd_req' 
function ? Or, probably I am missing something.
I am running some high rate syn-flood tests and trying to understand the sk_filter 
behaviour in this case.


Thanks,
Kumar.

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

end of thread, other threads:[~2015-01-12 18:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 18:17 Query regarding sk_filter Alexei Starovoitov
2015-01-12 18:00 ` Kumar Sanghvi
  -- strict thread matches above, loose matches on Subject: below --
2015-01-09 11:23 Kumar Sanghvi
2015-01-10  0:51 ` Alexei Starovoitov
2015-01-10 12:40   ` Kumar Sanghvi

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