1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-18 17:27:20 +01:00

* PolicyCompiler_PrintRule.cpp (PrintRule::_printTimeInterval):

fixed time format for the iptables parameters --datestart,
--datestop which is supposed to be ISO 8601 "T" notation but
apparently with no support for time zone designators.  Timezone
desginators are an error in iptables 1.4.1.1 and 1.4.5, did not
test newer versions.  Fixes #1286 SourceForge bug #2961532
This commit is contained in:
Vadim Kurland 2010-03-01 22:52:06 +00:00
parent 3e632c6be1
commit d02fd7a11e
4 changed files with 21 additions and 8 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 2638
#define BUILD_NUM 2641

View File

@ -1,3 +1,12 @@
2010-03-01 vadim <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printTimeInterval):
fixed time format for the iptables parameters --datestart,
--datestop which is supposed to be ISO 8601 "T" notation but
apparently with no support for time zone designators. Timezone
desginators are an error in iptables 1.4.1.1 and 1.4.5, did not
test newer versions. Fixes #1286 SourceForge bug #2961532
2010-02-28 vadim <vadim@vk.crocodile.org>
* (many files) fixed warning " format not a string literal and no
@ -7,7 +16,7 @@
* refs #1202: Main menu "Rules" does not match rule context menu
Items in the main menu Rules should get disabled and enabled just
like items in the context menu do.
Added action: insertRuleAction, addRuleAfterCurrentAction,
Added action: insertRuleAction, addRuleAfterCurrentAction,
addToGroupAboveAction, addToGroupBelowAction
Affected files:
FWWindow.cpp

View File

@ -1266,9 +1266,13 @@ string PolicyCompiler_ipt::PrintRule::_printTimeInterval(PolicyRule *r)
if (XMLTools::version_compare(version, "1.4.0")>=0)
{
// in 1.4.0 date format has changed, it is now ISO 8601
// http://www.w3.org/TR/NOTE-datetime
/* in 1.4.0 date format has changed, it is now ISO 8601
* http://www.w3.org/TR/NOTE-datetime
*
* --datestart YYYY[-MM[-DD[Thh[:mm[:ss]]]]]
*
* --datestop YYYY[-MM[-DD[Thh[:mm[:ss]]]]]
*/
if (sday>0 && smonth>0 && syear>0)
{
ostr << "--datestart "
@ -1276,7 +1280,7 @@ string PolicyCompiler_ipt::PrintRule::_printTimeInterval(PolicyRule *r)
<< setw(2) << setfill('0') << smonth << "-"
<< setw(2) << setfill('0') << sday << "T"
<< setw(2) << setfill('0') << shour << ":"
<< setw(2) << setfill('0') << smin << ":00Z ";
<< setw(2) << setfill('0') << smin << ":00 ";
use_timestart_timestop = false;
}
@ -1287,7 +1291,7 @@ string PolicyCompiler_ipt::PrintRule::_printTimeInterval(PolicyRule *r)
<< setw(2) << setfill('0') << emonth << "-"
<< setw(2) << setfill('0') << eday << "T"
<< setw(2) << setfill('0') << ehour << ":"
<< setw(2) << setfill('0') << emin << ":00Z ";
<< setw(2) << setfill('0') << emin << ":00 ";
use_timestart_timestop = false;
}

View File

@ -31041,7 +31041,7 @@ echo '%FWBPROMPT%'; sh /tmp/%FWSCRIPT%
<Option name="verify_interfaces">True</Option>
</FirewallOptions>
</Firewall>
<Firewall id="id4845077415791" host_OS="linux24" inactive="False" lastCompiled="1247364213" lastInstalled="0" lastModified="1230686952" platform="iptables" version="1.4.0" name="firewall61-1.4" comment="testing time litmiting for iptables 1.4.0&#10;" ro="False">
<Firewall id="id4845077415791" host_OS="linux24" inactive="False" lastCompiled="1267483893" lastInstalled="0" lastModified="1230686952" platform="iptables" version="1.4.0" name="firewall61-1.4" comment="testing time litmiting for iptables 1.4.0&#10;" ro="False">
<NAT id="id484507B715791" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
<RuleSetOptions/>
</NAT>