mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-23 19:57:21 +01:00
* IPTImporter.cpp (IPTImporter::pushPolicyRule): fixed #1512 SF
bug 3012953: iptables importer sometimes does not recognize rule with " ESTABLISHED,RELATED ". Parser properly processed iptables rules with state "RELATED,ESTABLISHED" but not when states were in the opposite order.
This commit is contained in:
parent
71f893b213
commit
c153b341c3
@ -1,5 +1,11 @@
|
||||
2010-06-08 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* IPTImporter.cpp (IPTImporter::pushPolicyRule): fixed #1512 SF
|
||||
bug 3012953: iptables importer sometimes does not recognize rule
|
||||
with " ESTABLISHED,RELATED ". Parser properly processed iptables
|
||||
rules with state "RELATED,ESTABLISHED" but not when states were
|
||||
in the opposite order.
|
||||
|
||||
* Importer.cpp (Importer::getUDPService): fixed sourceforge bug
|
||||
3012953 name of UDP and TCP objects created during import should
|
||||
follow the same pattern and not include "0-0" for the source ports
|
||||
|
||||
@ -755,7 +755,8 @@ void IPTImporter::pushPolicyRule()
|
||||
rule->getSrv()->setNeg(srv_neg);
|
||||
rule->getItf()->setNeg(intf_neg);
|
||||
|
||||
if (current_state == "RELATED,ESTABLISHED")
|
||||
if (current_state == "RELATED,ESTABLISHED" ||
|
||||
current_state == "ESTABLISHED,RELATED")
|
||||
{
|
||||
if (rule->getSrc()->isAny() &&
|
||||
rule->getDst()->isAny() &&
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
Ruleset: user_chain
|
||||
Using automatic rule controlled by option 'Accept established,related states' to match states RELATED,ESTABLISHED
|
||||
Using automatic rule controlled by option 'Accept established,related states' to match states RELATED,ESTABLISHED
|
||||
Using automatic rule controlled by option 'Drop packet that do not match any known connection' to match state INVALID
|
||||
Using automatic rule controlled by option 'Accept established,related states' to match states RELATED,ESTABLISHED
|
||||
Address object: h-21.21.21.21
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
# this should be recognized as built-in rule
|
||||
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||
|
||||
# and this, too
|
||||
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
|
||||
|
||||
# this should be recognized as built-in rule
|
||||
-A FORWARD -m state --state INVALID -j drop_invalid
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user