netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: owner-Match in 2.6.20-rc5 (fwd)
@ 2007-01-25 20:31 Jozsef Kadlecsik
  2007-01-25 20:57 ` Jan Engelhardt
  2007-01-25 21:01 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Jozsef Kadlecsik @ 2007-01-25 20:31 UTC (permalink / raw)
  To: David Miller; +Cc: netfilter-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1471 bytes --]

Hi,

The report below was posted on the netfilter user list. Isn't there any 
ill side effect by reverting the change?

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
           H-1525 Budapest 114, POB. 49, Hungary

---------- Forwarded message ----------
Date: Thu, 25 Jan 2007 20:16:17 +0100
From: Sebastian <netfilter@basti79.de>
To: netfilter@lists.netfilter.org
Subject: Re: owner-Match in 2.6.20-rc5

Am Donnerstag, den 25.01.2007, 10:23 +0100 schrieb Sebastian Claßen:
> Hi...
>
> Kernel:   2.6.20-rc5
> Iptables: v1.3.7-20070118
>
> The owner-Match seems not to match TCP-Packets any more. Can be tested
> by inserting the rule:
> iptables -I OUTPUT -m owner --uid-owner test-user -j LOG
>
> Simply su to the specified user and using netcat (nc) to send UDP and
> TCP packets shows only log entried with PROTO=UDP but none with TCP.
>
> Anyone can reproduce this and pearhaps got a solution??
>
> Greets
>   Sebastian.
>

Hi again...

I've just found out where the problem is. In 2.6.20-rc1 changelog the
following thing was modified:
[TCP]: Don't set SKB owner in tcp_transmit_skb().

That seems to break the owner-match for TCP packets. I was able to undo
the change with the attached one-line patch which fixed the problem for
me.

Greets
   Sebastian.

[-- Attachment #2: Type: TEXT/X-PATCH, Size: 402 bytes --]

--- linux-2.6.20-rc5.orig/net/ipv4/tcp_output.c	2007-01-25 20:10:04.000000000 +0100
+++ linux-2.6.20-rc5/net/ipv4/tcp_output.c	2007-01-25 14:43:48.000000000 +0100
@@ -467,6 +467,7 @@ static int tcp_transmit_skb(struct sock 
 
 	th = (struct tcphdr *) skb_push(skb, tcp_header_size);
 	skb->h.th = th;
+	skb_set_owner_w(skb, sk);
 
 	/* Build TCP header and checksum it. */
 	th->source		= inet->sport;

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

end of thread, other threads:[~2007-01-26  9:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25 20:31 owner-Match in 2.6.20-rc5 (fwd) Jozsef Kadlecsik
2007-01-25 20:57 ` Jan Engelhardt
2007-01-25 21:01 ` David Miller
2007-01-25 21:07   ` Jan Engelhardt
2007-01-25 22:01     ` David Miller
2007-01-25 22:14       ` Jan Engelhardt
2007-01-26  9:05         ` David Miller

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