All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with sk_buff
@ 2002-06-07 19:05 Damiano Bolzoni
  2002-06-07 19:09 ` Henrik Nordstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Damiano Bolzoni @ 2002-06-07 19:05 UTC (permalink / raw)
  To: netfilter-devel

Hi people,
I wrote a kernel module that uses netfilter. I'm interested on incoming IP
packets that carry a TCP segment with SYN flag active. What I want to do is
to know which socket has been created in order to handle that connection and
I want to close it. sk_buff holds two pointer: struct sock* and struct
socket* but they point to NULL.
At this time I can test if the TCP segment has the SYN flag set but I can't
close the socket...
Anyone can help me?

Thanx a lot

Damiano
damiano.bolzoni@tin.it

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

* Re: Problem with sk_buff
  2002-06-07 19:05 Problem with sk_buff Damiano Bolzoni
@ 2002-06-07 19:09 ` Henrik Nordstrom
  0 siblings, 0 replies; 2+ messages in thread
From: Henrik Nordstrom @ 2002-06-07 19:09 UTC (permalink / raw)
  To: Damiano Bolzoni, netfilter-devel

Damiano Bolzoni wrote:
> Hi people,
> I wrote a kernel module that uses netfilter. I'm interested on incoming IP
> packets that carry a TCP segment with SYN flag active. What I want to do is
> to know which socket has been created in order to handle that connection
> and I want to close it. sk_buff holds two pointer: struct sock* and struct
> socket* but they point to NULL.
> At this time I can test if the TCP segment has the SYN flag set but I can't
> close the socket...
> Anyone can help me?

This is too early in the packet processing path. The socket is not yet known. 
These fields is only valid on locally generated packets (outgoing/sent 
packets).

You will need to make a call into the TCP/IP kernel to look up the local 
socket.

Regards
Henrik

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

end of thread, other threads:[~2002-06-07 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-07 19:05 Problem with sk_buff Damiano Bolzoni
2002-06-07 19:09 ` Henrik Nordstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.