All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pom-ng version of IMQ target (file is attached this time)
@ 2004-05-12 21:59 Brad Fisher
  2004-05-13  2:13 ` Patrick McHardy
  0 siblings, 1 reply; 8+ messages in thread
From: Brad Fisher @ 2004-05-12 21:59 UTC (permalink / raw)
  To: linuximq, netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

(Sorry for the duplicate post, forgot to attach the file... doh)

Attached is a pom-ng version of the IMQ target available from
linuximq.org.  It's based off the 2.4.26 patch, and includes all of the
kernel (linux-2.4.26-imq.diff) and userspace patches (IMQ.pom-ng.patch).

Seems to apply and compile ok for me to the 2.4.26 kernel and iptables
cvs.  You must apply the patch I sent earlier today for pom-ng cvs
before this will work properly, or you will probably end up with a
half-patched kernel or userspace. (see:
http://marc.theaimsgroup.com/?l=netfilter-devel&m=108438884109560&w=2)

Hopefully someone else will find this patch useful.  You are free to use
it as you wish.

-Brad Fisher

[-- Attachment #2: IMQ-pom-ng.tgz --]
[-- Type: application/x-unknown-content-type-WinRAR, Size: 7134 bytes --]

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

* Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-05-12 21:59 [PATCH] pom-ng version of IMQ target (file is attached this time) Brad Fisher
@ 2004-05-13  2:13 ` Patrick McHardy
  2004-05-13 16:03   ` Brad Fisher
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick McHardy @ 2004-05-13  2:13 UTC (permalink / raw)
  To: Brad Fisher; +Cc: linuximq, netfilter-devel

Hi Brad,

Brad Fisher wrote:

>(Sorry for the duplicate post, forgot to attach the file... doh)
>
>Attached is a pom-ng version of the IMQ target available from
>linuximq.org.  It's based off the 2.4.26 patch, and includes all of the
>kernel (linux-2.4.26-imq.diff) and userspace patches (IMQ.pom-ng.patch).
>  
>

Andre Correa already asked me about inclusion of the IMQ target. I would
rather not include at this time it for two reasons:

- IMQ still has stability problems
- Jamal is working on a netfilter-independant replacement, I would like to
see how it works out first. See 
http://marc.theaimsgroup.com/?t=108202471500003&r=1&w=2

Regards
Patrick

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

* Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-05-13  2:13 ` Patrick McHardy
@ 2004-05-13 16:03   ` Brad Fisher
  2004-05-31 12:59     ` [linuximq] " Andy Furniss
  0 siblings, 1 reply; 8+ messages in thread
From: Brad Fisher @ 2004-05-13 16:03 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: linuximq, netfilter-devel

Patrick McHardy wrote:

> Andre Correa already asked me about inclusion of the IMQ target. I would
> rather not include at this time it for two reasons:
>
> - IMQ still has stability problems
> - Jamal is working on a netfilter-independant replacement, I would like to
> see how it works out first. See
> http://marc.theaimsgroup.com/?t=108202471500003&r=1&w=2
>
> Regards
> Patrick

That's fine, I wasn't really asking for inclusion quite yet (though I would
like to see it happen someday :).  I just wanted to let people who may be
interested know that a pom-ng version of the patch existed.

-Brad

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

* Re: [linuximq] Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-05-13 16:03   ` Brad Fisher
@ 2004-05-31 12:59     ` Andy Furniss
  2004-06-01 23:17       ` Patrick McHardy
  2004-06-03 15:24       ` Andre Correa
  0 siblings, 2 replies; 8+ messages in thread
From: Andy Furniss @ 2004-05-31 12:59 UTC (permalink / raw)
  To: linuximq; +Cc: Patrick McHardy, netfilter-devel

Brad Fisher wrote:
> Patrick McHardy wrote:
> 
> 
>>Andre Correa already asked me about inclusion of the IMQ target. I would
>>rather not include at this time it for two reasons:
>>
>>- IMQ still has stability problems
>>- Jamal is working on a netfilter-independant replacement, I would like to
>>see how it works out first. See
>>http://marc.theaimsgroup.com/?t=108202471500003&r=1&w=2
>>
>>Regards
>>Patrick
> 
> 
> That's fine, I wasn't really asking for inclusion quite yet (though I would
> like to see it happen someday :).  I just wanted to let people who may be
> interested know that a pom-ng version of the patch existed.
> 
> -Brad

I am still not sure whether using Dummy will satisfy other IMQ users 
though, the thread above just deals with my setup - using ingress IMQ. 
There must be people on here using IMQ for egress/ multiple IMQs to 
solve their own problems. I changed IMQ to hook before NAT for egress, 
just to see if it worked, as someone on the LARTC list wanted to use 
ESFQ for a large NATed LAN - it appears to be OK - but will a netfilter 
independent replacement allow this sort of flexability?

Andy.

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

* Re: [linuximq] Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-05-31 12:59     ` [linuximq] " Andy Furniss
@ 2004-06-01 23:17       ` Patrick McHardy
  2004-06-02  0:18         ` Andy Furniss
  2004-06-03 15:24       ` Andre Correa
  1 sibling, 1 reply; 8+ messages in thread
From: Patrick McHardy @ 2004-06-01 23:17 UTC (permalink / raw)
  To: Andy Furniss; +Cc: linuximq, netfilter-devel

Andy Furniss wrote:
> I am still not sure whether using Dummy will satisfy other IMQ users 
> though, the thread above just deals with my setup - using ingress IMQ. 
> There must be people on here using IMQ for egress/ multiple IMQs to 
> solve their own problems. I changed IMQ to hook before NAT for egress, 
> just to see if it worked, as someone on the LARTC list wanted to use 
> ESFQ for a large NATed LAN - it appears to be OK - but will a netfilter 
> independent replacement allow this sort of flexability?

It probably could, but I don't know how the dummy device receives it's
packets, so I don't know if you can make it see the real source IP.

Your mail made me realize I need patch for exactly the same issue
with ESFQ for work, so if you need it I can send it to you.

Regards
Patrick

> 
> Andy.
> 

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

* Re: [linuximq] Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-06-01 23:17       ` Patrick McHardy
@ 2004-06-02  0:18         ` Andy Furniss
  2004-06-05 12:56           ` Patrick McHardy
  0 siblings, 1 reply; 8+ messages in thread
From: Andy Furniss @ 2004-06-02  0:18 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: linuximq, netfilter-devel

Patrick McHardy wrote:
> Andy Furniss wrote:
> 
>> I am still not sure whether using Dummy will satisfy other IMQ users 
>> though, the thread above just deals with my setup - using ingress IMQ. 
>> There must be people on here using IMQ for egress/ multiple IMQs to 
>> solve their own problems. I changed IMQ to hook before NAT for egress, 
>> just to see if it worked, as someone on the LARTC list wanted to use 
>> ESFQ for a large NATed LAN - it appears to be OK - but will a 
>> netfilter independent replacement allow this sort of flexability?
> 
> 
> It probably could, but I don't know how the dummy device receives it's
> packets, so I don't know if you can make it see the real source IP.
> 
> Your mail made me realize I need patch for exactly the same issue
> with ESFQ for work, so if you need it I can send it to you.

Yea - it would be nice to see the right way to do it :-)

I guessed using the example of the ingress NAT patch and changed egress 
postrouting hook to NF_IP_PRI_NAT_SRC - 1.

It seems to be OK for me - are there other safe places where IMQ is OK 
or any to be avoided?

Andy.

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

* Re: [linuximq] Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-05-31 12:59     ` [linuximq] " Andy Furniss
  2004-06-01 23:17       ` Patrick McHardy
@ 2004-06-03 15:24       ` Andre Correa
  1 sibling, 0 replies; 8+ messages in thread
From: Andre Correa @ 2004-06-03 15:24 UTC (permalink / raw)
  To: linuximq; +Cc: netfilter-devel


Hi Andy, I cannot tell about netfilter, but I would like to see you 
patch anyway for testing and maybe include it on IMQ.

Some patchs sent by people are queued and I hope to review and publish 
then soon. Does your patch changes iptables too? Please send it on pvt.

To be honest I'm not willing to get in a "fight" for putting IMQ patch 
into p-o-m. I think it should be there the way IMQ is right now, but we 
better give it some time. I'm not sure too that dummy will satisfy all 
needs. I'm more to the good-old IMQ implementation.

tks

Andre

Andy Furniss wrote:
> Brad Fisher wrote:
> 
>>Patrick McHardy wrote:
>>
>>
>>
>>>Andre Correa already asked me about inclusion of the IMQ target. I would
>>>rather not include at this time it for two reasons:
>>>
>>>- IMQ still has stability problems
>>>- Jamal is working on a netfilter-independant replacement, I would like to
>>>see how it works out first. See
>>>http://marc.theaimsgroup.com/?t=108202471500003&r=1&w=2
>>>
>>>Regards
>>>Patrick
>>
>>
>>That's fine, I wasn't really asking for inclusion quite yet (though I would
>>like to see it happen someday :).  I just wanted to let people who may be
>>interested know that a pom-ng version of the patch existed.
>>
>>-Brad
> 
> 
> I am still not sure whether using Dummy will satisfy other IMQ users 
> though, the thread above just deals with my setup - using ingress IMQ. 
> There must be people on here using IMQ for egress/ multiple IMQs to 
> solve their own problems. I changed IMQ to hook before NAT for egress, 
> just to see if it worked, as someone on the LARTC list wanted to use 
> ESFQ for a large NATed LAN - it appears to be OK - but will a netfilter 
> independent replacement allow this sort of flexability?
> 
> Andy.
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor --------------------~--> 
> Yahoo! Domains - Claim yours for only $14.70
> http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/dkFolB/TM
> --------------------------------------------------------------------~-> 
> 
>  
> Yahoo! Groups Links
> 
> <*> To visit your group on the web, go to:
>      http://groups.yahoo.com/group/linuximq/
> 
> <*> To unsubscribe from this group, send an email to:
>      linuximq-unsubscribe@yahoogroups.com
> 
> <*> Your use of Yahoo! Groups is subject to:
>      http://docs.yahoo.com/info/terms/
>  
> 
> 
> 

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

* Re: [linuximq] Re: [PATCH] pom-ng version of IMQ target (file is attached this time)
  2004-06-02  0:18         ` Andy Furniss
@ 2004-06-05 12:56           ` Patrick McHardy
  0 siblings, 0 replies; 8+ messages in thread
From: Patrick McHardy @ 2004-06-05 12:56 UTC (permalink / raw)
  To: Andy Furniss; +Cc: linuximq, netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Andy Furniss wrote:
> Patrick McHardy wrote:
>
>> Your mail made me realize I need patch for exactly the same issue
>> with ESFQ for work, so if you need it I can send it to you.
> 
> 
> Yea - it would be nice to see the right way to do it :-)

With this patch esfq uses the original source address if the packet has
been SNATed. It's a hack, but it solves the problem without IMQ.

> 
> I guessed using the example of the ingress NAT patch and changed egress 
> postrouting hook to NF_IP_PRI_NAT_SRC - 1.
> 
> It seems to be OK for me - are there other safe places where IMQ is OK 
> or any to be avoided?

I don't know about the current patches, you better ask the people
maintaining them.

Regards
Patrick

> 
> Andy.
> 


[-- Attachment #2: esfq-source.diff --]
[-- Type: text/x-patch, Size: 1093 bytes --]

diff -urN a/net/sched/sch_esfq.c b/net/sched/sch_esfq.c
--- a/net/sched/sch_esfq.c	2004-06-05 15:45:19.000000000 +0200
+++ b/net/sched/sch_esfq.c	2004-06-05 15:47:21.000000000 +0200
@@ -34,6 +34,7 @@
 #include <linux/etherdevice.h>
 #include <linux/notifier.h>
 #include <linux/init.h>
+#include <linux/netfilter_ipv4/ip_conntrack.h>
 #include <net/ip.h>
 #include <linux/ipv6.h>
 #include <net/route.h>
@@ -109,6 +110,18 @@
 	return h & (q->hash_divisor-1);
 }
 
+static inline u32 esfq_get_source(struct sk_buff *skb)
+{
+	struct ip_conntrack *ct;
+	int dir;
+
+	if (skb->nfct == NULL)
+		return skb->nh.iph->saddr;
+	ct = (struct ip_conntrack *)skb->nfct->master;
+	dir = CTINFO2DIR(skb->nfct - ct->infos);
+	return ct->tuplehash[dir].tuple.src.ip;
+}
+
 static unsigned esfq_hash(struct esfq_sched_data *q, struct sk_buff *skb)
 {
 	u32 h, h2;
@@ -119,7 +132,7 @@
 	{
 		struct iphdr *iph = skb->nh.iph;
 		h = iph->daddr;
-		hs = iph->saddr;
+		hs = esfq_get_source(skb);
 		h2 = hs^iph->protocol;
 		if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
 		    (iph->protocol == IPPROTO_TCP ||

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

end of thread, other threads:[~2004-06-05 12:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-12 21:59 [PATCH] pom-ng version of IMQ target (file is attached this time) Brad Fisher
2004-05-13  2:13 ` Patrick McHardy
2004-05-13 16:03   ` Brad Fisher
2004-05-31 12:59     ` [linuximq] " Andy Furniss
2004-06-01 23:17       ` Patrick McHardy
2004-06-02  0:18         ` Andy Furniss
2004-06-05 12:56           ` Patrick McHardy
2004-06-03 15:24       ` Andre Correa

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.