mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-19 09:47:20 +01:00
matching of IPService object with attribute "any option" causes warning in compiler for ipfilter. Fixes #564
This commit is contained in:
parent
02e767f799
commit
ee6c67d640
@ -117,9 +117,12 @@ void PolicyCompiler_ipf::PrintRule::_printDstService(RuleElementSrv *rel)
|
||||
if (o && FWReference::cast(o)!=NULL) o=FWReference::cast(o)->getPointer();
|
||||
|
||||
Service *srv= Service::cast(o);
|
||||
IPService *ip_srv = IPService::cast(srv);
|
||||
|
||||
if (IPService::isA(srv)) return;
|
||||
else
|
||||
if (ip_srv)
|
||||
{
|
||||
return;
|
||||
} else
|
||||
PolicyCompiler_pf::PrintRule::_printDstService(rel);
|
||||
}
|
||||
|
||||
@ -205,7 +208,12 @@ void PolicyCompiler_ipf::PrintRule::_printAction(PolicyRule *rule)
|
||||
|
||||
void PolicyCompiler_ipf::PrintRule::_printWith(libfwbuilder::Service *srv)
|
||||
{
|
||||
if (IPService::cast(srv)!=NULL) {
|
||||
IPService *ip_srv = IPService::cast(srv);
|
||||
if (ip_srv)
|
||||
{
|
||||
if (ip_srv->getBool("any_opt"))
|
||||
compiler->warning("ipfilter can not match \"any IP option\" ");
|
||||
|
||||
bool with=true;
|
||||
if ( srv->getBool("short_fragm") )
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE FWObjectDatabase SYSTEM "fwbuilder.dtd">
|
||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="13" id="root">
|
||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="13" lastModified="1257363322" id="root">
|
||||
<Library id="sysid99" name="Deleted Objects" comment="" ro="False">
|
||||
<ICMP6Service id="idE0C27650" code="0" type="1" name="ipv6 dest unreachable" comment="No route to destination" ro="False"/>
|
||||
</Library>
|
||||
@ -689,6 +689,7 @@
|
||||
<ServiceGroup id="stdid06_1" name="IP" comment="" ro="False">
|
||||
<IPService id="id3B457561" fragm="False" lsrr="False" protocol_num="1" rr="False" short_fragm="False" ssrr="False" ts="False" name="ICMP" comment="" ro="False"/>
|
||||
<IPService id="id3B6659A5" fragm="False" lsrr="False" protocol_num="0" rr="False" short_fragm="False" ssrr="False" ts="True" name="TS" comment="" ro="False"/>
|
||||
<IPService id="id31904X24387" any_opt="True" dscp="" fragm="False" lsrr="False" protocol_num="0" rr="False" rtralt="False" short_fragm="False" ssrr="False" tos="" ts="False" name="any opt" comment="" ro="False"/>
|
||||
</ServiceGroup>
|
||||
<ServiceGroup id="stdid09_1" name="TCP" comment="" ro="False">
|
||||
<TCPService id="id3C1A66EF" ack_flag="False" ack_flag_mask="False" fin_flag="False" fin_flag_mask="False" psh_flag="False" psh_flag_mask="False" rst_flag="False" rst_flag_mask="False" syn_flag="False" syn_flag_mask="False" urg_flag="False" urg_flag_mask="False" name="gopher" comment="" ro="False" src_range_start="0" src_range_end="0" dst_range_start="70" dst_range_end="70"/>
|
||||
@ -710,7 +711,7 @@
|
||||
<ServiceGroup id="stdid05_1_userservices" name="Users" comment="" ro="False"/>
|
||||
</ServiceGroup>
|
||||
<ObjectGroup id="stdid12_1" name="Firewalls" comment="" ro="False">
|
||||
<Firewall id="fw-firewall2" host_OS="freebsd" inactive="False" lastCompiled="1249841462" lastInstalled="0" lastModified="1249841456" platform="ipf" version="" name="firewall" comment="this is simple firewall with two interfaces. Test regular policy rules, including IP_fragments rule" ro="False">
|
||||
<Firewall id="fw-firewall2" host_OS="freebsd" inactive="False" lastCompiled="1249841462" lastInstalled="0" lastModified="1257363335" platform="ipf" version="" name="firewall" comment="this is simple firewall with two interfaces. Test regular policy rules, including IP_fragments rule" ro="False">
|
||||
<NAT id="nat-firewall2" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
|
||||
<NATRule id="nat-firewall2-0" disabled="False" position="0" action="Translate" comment="">
|
||||
<OSrc neg="False">
|
||||
@ -966,6 +967,7 @@
|
||||
<ServiceRef ref="ip-RR"/>
|
||||
<ServiceRef ref="ip-SRR"/>
|
||||
<ServiceRef ref="id3B6659A5"/>
|
||||
<ServiceRef ref="id31904X24387"/>
|
||||
</Srv>
|
||||
<Itf neg="False">
|
||||
<ObjectRef ref="sysid0"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user