All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposed netmap patch
@ 2005-07-12 17:16 Gary W. Smith
  2005-07-13 10:32 ` Jan Engelhardt
  2005-07-16 16:16 ` Patrick McHardy
  0 siblings, 2 replies; 10+ messages in thread
From: Gary W. Smith @ 2005-07-12 17:16 UTC (permalink / raw)
  To: netfilter-devel

 
Hello, 
 
I'm not sure how to get this reviewed/applied so I'll just toss it to the list.  I had a need to use NETMAP but found it lacking the OUTPUT chain of the nat filter.  So I added it.  I have been running it for some time and it seems to work great.  Anyways, here is the patch that I used.  I found it useful.
 
If you would like to review this and possibly commit it to CVS then by all means...
 
Gary
 
 
--- linux-2.6.9.orig/net/ipv4/netfilter/ipt_NETMAP.c    2004-10-18 14:54:20.000000000 -0700
+++ linux-2.6.9/net/ipv4/netfilter/ipt_NETMAP.c 2005-04-15 10:31:44.719492104 -0700
@@ -46,7 +46,7 @@
                DEBUGP(MODULENAME":check: size %u.\n", targinfosize);
                return 0;
        }
-       if (hook_mask & ~((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_POST_ROUTING))) {
+       if (hook_mask & ~((1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_POST_ROUTING) | (1 << NF_IP_LOCAL_OUT))) {
                DEBUGP(MODULENAME":check: bad hooks %x.\n", hook_mask);
                return 0;
        }
@@ -81,7 +81,7 @@
 
        netmask = ~(mr->range[0].min_ip ^ mr->range[0].max_ip);
 
-       if (hooknum == NF_IP_PRE_ROUTING)
+       if (hooknum == NF_IP_PRE_ROUTING || hooknum == NF_IP_LOCAL_OUT)
                new_ip = (*pskb)->nh.iph->daddr & ~netmask;
        else
                new_ip = (*pskb)->nh.iph->saddr & ~netmask;
 

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Proposed netmap patch
@ 2005-07-13 14:08 Gary W. Smith
  0 siblings, 0 replies; 10+ messages in thread
From: Gary W. Smith @ 2005-07-13 14:08 UTC (permalink / raw)
  To: rv, Jan Engelhardt; +Cc: netfilter-devel

It seems to work.  I have been using it with 2.6.9 for some time now (a couple months anyway).



> -----Original Message-----
> From: Herve Eychenne [mailto:rv@wallfire.org]
> Sent: Wednesday, July 13, 2005 3:50 AM
> To: Jan Engelhardt
> Cc: Gary W. Smith; netfilter-devel@lists.netfilter.org
> Subject: Re: Proposed netmap patch
> 
> On Wed, Jul 13, 2005 at 12:32:51PM +0200, Jan Engelhardt wrote:
> 
> > >I had a need to use NETMAP but found it lacking the OUTPUT chain of the
> nat
> > >filter.  So I added it.  I have been running it for some time and it
> seems to
> > >work great.  Anyways, here is the patch that I used.  I found it
> useful.
> 
> > There must have been a reason why it was originally not allowed in the
> OUTPUT
> > chain, but I am not sure.
> 
> This has been discussed before:
> http://lists.netfilter.org/pipermail/netfilter-devel/2005-
> April/019321.html
> 
> Conclusion: adding OUTPUT should be ok, but there seem to have been no
> action so far.
> 
>  Herve
> 
> --
>  _
> (°=  Hervé Eychenne
> //)
> v_/_ WallFire project:  http://www.wallfire.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: Proposed netmap patch
@ 2005-07-16 18:06 Gary W. Smith
  2005-07-16 18:18 ` Patrick McHardy
  0 siblings, 1 reply; 10+ messages in thread
From: Gary W. Smith @ 2005-07-16 18:06 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

Signed-off-by: Gary Wayne Smith <gary.w.smith@primeexalia.com>

> -----Original Message-----
> From: Patrick McHardy [mailto:kaber@trash.net]
> Sent: Saturday, July 16, 2005 9:16 AM
> To: Gary W. Smith
> Cc: netfilter-devel@lists.netfilter.org
> Subject: Re: Proposed netmap patch
> 
> Gary W. Smith schrieb:
> > I'm not sure how to get this reviewed/applied so I'll just toss it
to
> the list.  I had a need to use NETMAP but found it lacking the OUTPUT
> chain of the nat filter.  So I added it.  I have been running it for
some
> time and it seems to work great.  Anyways, here is the patch that I
used.
> I found it useful.
> >
> > If you would like to review this and possibly commit it to CVS then
by
> all means...
> 
> Thanks. If you give me a Signed-off-by: line I'll apply it.
> 
> Regards
> Patrick
> 

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

end of thread, other threads:[~2005-08-12 14:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-12 17:16 Proposed netmap patch Gary W. Smith
2005-07-13 10:32 ` Jan Engelhardt
2005-07-13 10:49   ` Herve Eychenne
2005-07-16 16:16 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2005-07-13 14:08 Gary W. Smith
2005-07-16 18:06 Gary W. Smith
2005-07-16 18:18 ` Patrick McHardy
2005-08-12 14:11   ` Harald Welte
2005-08-12 14:23     ` Patrick McHardy
2005-08-12 14:44       ` Harald Welte

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.