* IPTImporter.cpp (pushNATRule): fixes #2195 "incorrect iptables

import of nat rule with NETMAP target"
This commit is contained in:
Vadim Kurland
2011-03-07 18:26:58 -08:00
parent a268a91f7b
commit 610448d440
2 changed files with 4 additions and 6 deletions
+3
View File
@@ -1,5 +1,8 @@
2011-03-07 vadim <vadim@netcitadel.com>
* IPTImporter.cpp (pushNATRule): fixes #2195 "incorrect iptables
import of nat rule with NETMAP target"
* IPTImporter.cpp (pushNATRule): see #2196 "iptables nat rules
with target REDIRECT not imported". Iptables NAT rules with target
REDIRECT where not imported correctly.
+1 -6
View File
@@ -1340,13 +1340,11 @@ void IPTImporter::pushNATRule()
if (target=="NETMAP")
{
FWObject *o = NULL;
if (!src_a.empty())
{
rule_type = NATRule::SNetnat;
o = createAddress(src_a, src_nm);
RuleElementOSrc *osrc = rule->getOSrc();
osrc->addRef(o);
RuleElementTSrc *tsrc = rule->getTSrc();
assert(tsrc!=NULL);
o = createAddress(nat_addr1, nat_nm);
@@ -1357,9 +1355,6 @@ void IPTImporter::pushNATRule()
{
rule_type = NATRule::DNetnat;
o = createAddress(dst_a, dst_nm);
RuleElementOSrc *odst = rule->getOSrc();
odst->addRef(o);
RuleElementTDst *tdst = rule->getTDst();
assert(tdst!=NULL);
o = createAddress(nat_addr1, nat_nm);