mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 07:31:25 +02:00
do not generate "-m icmp6 --icmp6-type any" for ipv6
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2008-06-30 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* PolicyCompiler_PrintRule.cpp (PrintRule::_printProtocol): do not
|
||||
generate "-m icmp6 --icmp6-type any" for ipv6 for object "any
|
||||
icmp".
|
||||
|
||||
2008-06-28 Vadim Kurland <vadim@vk.crocodile.org>
|
||||
|
||||
* DiscoveryDruid.cpp (DiscoveryDruid::loadDataFromDNS): object
|
||||
|
||||
@@ -604,7 +604,8 @@ string PolicyCompiler_ipt::PrintRule::_printProtocol(libfwbuilder::Service *srv)
|
||||
if (pn == "icmp")
|
||||
{
|
||||
s = "-p ipv6-icmp ";
|
||||
if (ipt_comp->newIptables(version)) s += " -m icmp6";
|
||||
if (srv->getInt("type")!=-1 &&
|
||||
ipt_comp->newIptables(version)) s += " -m icmp6";
|
||||
} else
|
||||
{
|
||||
// ip6tables issues warning for commands using "-p all"
|
||||
@@ -857,7 +858,8 @@ string PolicyCompiler_ipt::PrintRule::_printDstService(RuleElementSrv *rel)
|
||||
string str = _printICMP( ICMPService::cast(srv) );
|
||||
if (str.empty() )
|
||||
{
|
||||
if (ipt_comp->newIptables(version))
|
||||
// module icmp6 does not like "--icmp6-type any"
|
||||
if (ipt_comp->newIptables(version) && !ipt_comp->ipv6)
|
||||
ostr << icmp_type_str << " any ";
|
||||
} else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user