mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-12 16:13:13 +02:00
bumped dtd version to 20 and renamed xslt upgrade script since dtd version increased to 19 in the development branch
This commit is contained in:
@@ -14,6 +14,6 @@ VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
|||||||
GENERATION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION"
|
GENERATION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION"
|
||||||
|
|
||||||
# Data format version
|
# Data format version
|
||||||
FWBUILDER_XML_VERSION=19
|
FWBUILDER_XML_VERSION=20
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
<!ELEMENT FWObjectDatabase (Library*)>
|
<!ELEMENT FWObjectDatabase (Library*)>
|
||||||
<!ATTLIST FWObjectDatabase
|
<!ATTLIST FWObjectDatabase
|
||||||
xmlns CDATA #FIXED "http://www.fwbuilder.org/1.0/"
|
xmlns CDATA #FIXED "http://www.fwbuilder.org/1.0/"
|
||||||
version %STRING; #FIXED "19"
|
version %STRING; #FIXED "20"
|
||||||
lastModified %NUMBER; #IMPLIED
|
lastModified %NUMBER; #IMPLIED
|
||||||
id ID #REQUIRED
|
id ID #REQUIRED
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -0,0 +1,247 @@
|
|||||||
|
<!--
|
||||||
|
FWObjectDatabase_19.xslt 2011-05-03
|
||||||
|
Author: Vadim Kurland
|
||||||
|
Description: translates fwbuilder object database from v19 to 20
|
||||||
|
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:fwb="http://www.fwbuilder.org/1.0/"
|
||||||
|
exclude-result-prefixes="fwb">
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:output method="xml" version="1.0"
|
||||||
|
doctype-system="fwbuilder.dtd" indent="yes" encoding="utf-8"/>
|
||||||
|
|
||||||
|
<xsl:template match="*" mode="copy">
|
||||||
|
<xsl:copy>
|
||||||
|
<xsl:copy-of select="@*"/>
|
||||||
|
<xsl:apply-templates mode="copy"/>
|
||||||
|
</xsl:copy>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="//fwb:PolicyRule[attribute::action='Tag']" mode="copy">
|
||||||
|
|
||||||
|
<xsl:variable name="ipt_make_terminating"
|
||||||
|
select="../../fwb:FirewallOptions/fwb:Option[attribute::name='classify_mark_terminating']"/>
|
||||||
|
|
||||||
|
<xsl:variable name="pf_make_terminating"
|
||||||
|
select="fwb:PolicyRuleOptions/fwb:Option[attribute::name='pf_tag_terminating']"/>
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRule" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:copy-of select="@id"/>
|
||||||
|
<xsl:copy-of select="@disabled"/>
|
||||||
|
<xsl:copy-of select="@position"/>
|
||||||
|
<xsl:copy-of select="@direction"/>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$ipt_make_terminating = 'True'">
|
||||||
|
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$pf_make_terminating = 'True'">
|
||||||
|
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="action">Continue</xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
|
<xsl:copy-of select="@log"/>
|
||||||
|
<xsl:copy-of select="@comment"/>
|
||||||
|
<xsl:copy-of select="@group"/>
|
||||||
|
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Src" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Dst" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Srv" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Itf" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:When" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRuleOptions" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:for-each select="fwb:PolicyRuleOptions/fwb:Option">
|
||||||
|
<xsl:copy-of select="."/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">tagging</xsl:attribute>True</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">classification</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">routing</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="//fwb:PolicyRule[attribute::action='Classify']" mode="copy">
|
||||||
|
|
||||||
|
<xsl:variable name="ipt_make_terminating"
|
||||||
|
select="../../fwb:FirewallOptions/fwb:Option[attribute::name='classify_mark_terminating']"/>
|
||||||
|
|
||||||
|
<xsl:variable name="pf_make_terminating"
|
||||||
|
select="fwb:PolicyRuleOptions/fwb:Option[attribute::name='pf_classify_terminating']"/>
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRule" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:copy-of select="@id"/>
|
||||||
|
<xsl:copy-of select="@disabled"/>
|
||||||
|
<xsl:copy-of select="@position"/>
|
||||||
|
<xsl:copy-of select="@direction"/>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$ipt_make_terminating = 'True'">
|
||||||
|
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="$pf_make_terminating = 'True'">
|
||||||
|
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:attribute name="action">Continue</xsl:attribute>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
|
<xsl:copy-of select="@log"/>
|
||||||
|
<xsl:copy-of select="@comment"/>
|
||||||
|
<xsl:copy-of select="@group"/>
|
||||||
|
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Src" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Dst" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Srv" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Itf" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:When" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRuleOptions" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:for-each select="fwb:PolicyRuleOptions/fwb:Option">
|
||||||
|
<xsl:copy-of select="."/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">tagging</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">classification</xsl:attribute>True</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">routing</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="//fwb:PolicyRule[attribute::action='Route']" mode="copy">
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRule" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:copy-of select="@id"/>
|
||||||
|
<xsl:copy-of select="@disabled"/>
|
||||||
|
<xsl:copy-of select="@position"/>
|
||||||
|
<xsl:copy-of select="@direction"/>
|
||||||
|
<xsl:attribute name="action">Continue</xsl:attribute>
|
||||||
|
<xsl:copy-of select="@log"/>
|
||||||
|
<xsl:copy-of select="@comment"/>
|
||||||
|
<xsl:copy-of select="@group"/>
|
||||||
|
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Src" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Dst" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Srv" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:Itf" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="fwb:When" mode="copy"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
|
||||||
|
<xsl:element name="PolicyRuleOptions" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:for-each select="fwb:PolicyRuleOptions/fwb:Option">
|
||||||
|
<xsl:copy-of select="."/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">tagging</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">classification</xsl:attribute>False</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:element name="Option" namespace="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="name">routing</xsl:attribute>True</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:element>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="*[attribute::id='root']">
|
||||||
|
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/">
|
||||||
|
<xsl:attribute name="version">20</xsl:attribute>
|
||||||
|
<xsl:attribute name="lastModified"><xsl:value-of select="@lastModified"/></xsl:attribute>
|
||||||
|
<xsl:attribute name="id">root</xsl:attribute>
|
||||||
|
<xsl:apply-templates select="*" mode="copy"/>
|
||||||
|
</FWObjectDatabase>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE FWObjectDatabase SYSTEM "fwbuilder.dtd">
|
<!DOCTYPE FWObjectDatabase SYSTEM "fwbuilder.dtd">
|
||||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="19" lastModified="1265059184" id="root">
|
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="20" lastModified="1265059184" id="root">
|
||||||
<Library id="syslib000" color="#d4f8ff" name="Standard" comment="Standard objects" ro="True">
|
<Library id="syslib000" color="#d4f8ff" name="Standard" comment="Standard objects" ro="True">
|
||||||
<AnyNetwork id="sysid0" name="Any" comment="Any Network" ro="False" address="0.0.0.0" netmask="0.0.0.0"/>
|
<AnyNetwork id="sysid0" name="Any" comment="Any Network" ro="False" address="0.0.0.0" netmask="0.0.0.0"/>
|
||||||
<AnyIPService id="sysid1" protocol_num="0" name="Any" comment="Any IP Service" ro="False"/>
|
<AnyIPService id="sysid1" protocol_num="0" name="Any" comment="Any IP Service" ro="False"/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE FWObjectDatabase SYSTEM "fwbuilder.dtd">
|
<!DOCTYPE FWObjectDatabase SYSTEM "fwbuilder.dtd">
|
||||||
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="19" lastModified="1270752748" id="root">
|
<FWObjectDatabase xmlns="http://www.fwbuilder.org/1.0/" version="20" lastModified="1270752748" id="root">
|
||||||
<Library id="syslib000" color="#d4f8ff" name="Standard" comment="Standard objects" ro="True">
|
<Library id="syslib000" color="#d4f8ff" name="Standard" comment="Standard objects" ro="True">
|
||||||
<AnyNetwork id="sysid0" name="Any" comment="Any Network" ro="False" address="0.0.0.0" netmask="0.0.0.0"/>
|
<AnyNetwork id="sysid0" name="Any" comment="Any Network" ro="False" address="0.0.0.0" netmask="0.0.0.0"/>
|
||||||
<AnyIPService id="sysid1" protocol_num="0" name="Any" comment="Any IP Service" ro="False"/>
|
<AnyIPService id="sysid1" protocol_num="0" name="Any" comment="Any IP Service" ro="False"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user