* [NETFILTER 3/4]: Make NETMAP target usable in OUTPUT
@ 2005-08-14 22:43 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-08-14 22:43 UTC (permalink / raw)
To: David S. Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: 03.diff --]
[-- Type: text/x-patch, Size: 1682 bytes --]
[NETFILTER]: Make NETMAP target usable in OUTPUT
Signed-off-by: Gary Wayne Smith <gary.w.smith@primeexalia.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 7ea3224e415f93eff91b7e21cfb99fc39b2c1e90
tree bcae188c7e54ec80398c581d73d4ffa2176b0a80
parent 17bfdaf02646cc6fafa9fa661e4c6e8775a9af3a
author Gary Wayne Smith <gary.w.smith@primeexalia.com> Mon, 15 Aug 2005 00:32:48 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 15 Aug 2005 00:32:48 +0200
net/ipv4/netfilter/ipt_NETMAP.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c
--- a/net/ipv4/netfilter/ipt_NETMAP.c
+++ b/net/ipv4/netfilter/ipt_NETMAP.c
@@ -46,7 +46,8 @@ check(const char *tablename,
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;
}
@@ -76,12 +77,13 @@ target(struct sk_buff **pskb,
struct ip_nat_range newrange;
IP_NF_ASSERT(hooknum == NF_IP_PRE_ROUTING
- || hooknum == NF_IP_POST_ROUTING);
+ || hooknum == NF_IP_POST_ROUTING
+ || hooknum == NF_IP_LOCAL_OUT);
ct = ip_conntrack_get(*pskb, &ctinfo);
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] only message in thread
only message in thread, other threads:[~2005-08-14 22:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-14 22:43 [NETFILTER 3/4]: Make NETMAP target usable in OUTPUT Patrick McHardy
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.