aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_nat_helper.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-18 01:38:20 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:58:57 -0500
commitcc01dcbd26865addfe9eb5431f1f9dbc511515ba (patch)
tree9af6cc5b90911d7b1cd08546924fac66e6c6bb8b /net/ipv4/netfilter/nf_nat_helper.c
parentce4b1cebdcd4779097e9862670e5c5208e76712b (diff)
[NETFILTER]: nf_nat: pass manip type instead of hook to nf_nat_setup_info
nf_nat_setup_info gets the hook number and translates that to the manip type to perform. This is a relict from the time when one manip per hook could exist, the exact hook number doesn't matter anymore, its converted to the manip type. Most callers already know what kind of NAT they want to perform, so pass the maniptype in directly. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/nf_nat_helper.c')
-rw-r--r--net/ipv4/netfilter/nf_nat_helper.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c
index d24f3d94739..4c0232842e7 100644
--- a/net/ipv4/netfilter/nf_nat_helper.c
+++ b/net/ipv4/netfilter/nf_nat_helper.c
@@ -433,15 +433,13 @@ void nf_nat_follow_master(struct nf_conn *ct,
433 range.flags = IP_NAT_RANGE_MAP_IPS; 433 range.flags = IP_NAT_RANGE_MAP_IPS;
434 range.min_ip = range.max_ip 434 range.min_ip = range.max_ip
435 = ct->master->tuplehash[!exp->dir].tuple.dst.u3.ip; 435 = ct->master->tuplehash[!exp->dir].tuple.dst.u3.ip;
436 /* hook doesn't matter, but it has to do source manip */ 436 nf_nat_setup_info(ct, &range, IP_NAT_MANIP_SRC);
437 nf_nat_setup_info(ct, &range, NF_INET_POST_ROUTING);
438 437
439 /* For DST manip, map port here to where it's expected. */ 438 /* For DST manip, map port here to where it's expected. */
440 range.flags = (IP_NAT_RANGE_MAP_IPS | IP_NAT_RANGE_PROTO_SPECIFIED); 439 range.flags = (IP_NAT_RANGE_MAP_IPS | IP_NAT_RANGE_PROTO_SPECIFIED);
441 range.min = range.max = exp->saved_proto; 440 range.min = range.max = exp->saved_proto;
442 range.min_ip = range.max_ip 441 range.min_ip = range.max_ip
443 = ct->master->tuplehash[!exp->dir].tuple.src.u3.ip; 442 = ct->master->tuplehash[!exp->dir].tuple.src.u3.ip;
444 /* hook doesn't matter, but it has to do destination manip */ 443 nf_nat_setup_info(ct, &range, IP_NAT_MANIP_DST);
445 nf_nat_setup_info(ct, &range, NF_INET_PRE_ROUTING);
446} 444}
447EXPORT_SYMBOL(nf_nat_follow_master); 445EXPORT_SYMBOL(nf_nat_follow_master);