mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 08:29:32 +02:00
* IPTImporter.cpp (pushNATRule): fixes #2195 "incorrect iptables
import of nat rule with NETMAP target"
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user