Commit ed59098b authored by Franco Fichtner's avatar Franco Fichtner

config: strip harmess transformations from sample

o comment blocks filled arrays disappear
o empty array tags disappear
o empty value tags collapse

This only leaves comment blocks in empty tags, which create
whitespace noise, which fucks up the config.xml real bad,
rippling through to the code that deal with is_array, isset
and actual = array() assignments to fix the faulty config.
Will clean this up one by one later.
parent 043324f8
......@@ -2,7 +2,6 @@
<opnsense>
<trigger_initial_wizard/>
<version>11.2</version>
<lastchange></lastchange>
<theme>opnsense</theme>
<sysctl>
<item>
......@@ -190,7 +189,6 @@
<optimization>normal</optimization>
<hostname>OPNsense</hostname>
<domain>localdomain</domain>
<dnsserver/>
<dnsallowoverride/>
<group>
<name>admins</name>
......@@ -234,17 +232,17 @@
<wan>
<enable/>
<if>mismatch1</if>
<mtu></mtu>
<mtu/>
<ipaddr>dhcp</ipaddr>
<ipaddrv6>dhcp6</ipaddrv6>
<subnet></subnet>
<gateway></gateway>
<subnet/>
<gateway/>
<blockpriv/>
<blockbogons/>
<dhcphostname></dhcphostname>
<media></media>
<mediaopt></mediaopt>
<dhcp6-duid></dhcp6-duid>
<media/>
<mediaopt/>
<dhcp6-duid/>
<dhcp6-ia-pd-len>0</dhcp6-ia-pd-len>
</wan>
<lan>
......@@ -254,8 +252,8 @@
<subnet>24</subnet>
<ipaddrv6>track6</ipaddrv6>
<subnetv6>64</subnetv6>
<media></media>
<mediaopt></mediaopt>
<media/>
<mediaopt/>
<track6-interface>wan</track6-interface>
<track6-prefix-id>0</track6-prefix-id>
</lan>
......@@ -277,66 +275,24 @@
<from>192.168.1.100</from>
<to>192.168.1.199</to>
</range>
<!--
<winsserver>xxx.xxx.xxx.xxx</winsserver>
<defaultleasetime></defaultleasetime>
<maxleasetime></maxleasetime>
<gateway>xxx.xxx.xxx.xxx</gateway>
<domain></domain>
<dnsserver></dnsserver>
<ntpserver>xxx.xxx.xxx.xxx</ntpserver>
<next-server></next-server>
<filename></filename>
<filename32></filename32>
<filename64></filename64>
-->
</lan>
<!--
<opt[n]>
...
</opt[n]>
-->
<!--
<staticmap>
<mac>xx:xx:xx:xx:xx:xx</mac>
<ipaddr>xxx.xxx.xxx.xxx</ipaddr>
<descr></descr>
</staticmap>
-->
</dhcpd>
<pptpd>
<mode><!-- off *or* server *or* redir --></mode>
<mode/>
<redir/>
<localip/>
<remoteip/>
<!-- <accounting/> -->
<!--
<user>
<name></name>
<password></password>
</user>
-->
</pptpd>
<dnsmasq>
<enable/>
<!--
<hosts>
<host></host>
<domain></domain>
<ip></ip>
<descr></descr>
</hosts>
-->
</dnsmasq>
<snmpd>
<!-- <enable/> -->
<syslocation/>
<syscontact/>
<rocommunity>public</rocommunity>
</snmpd>
<diag>
<ipv6nat>
<!-- <enable/> -->
<ipaddr/>
</ipv6nat>
</diag>
......@@ -345,64 +301,13 @@
</bridge>
<syslog>
<reverse/>
<!--
<enable/>
<remoteserver>xxx.xxx.xxx.xxx</remoteserver>
<filter/>
<dhcp/>
<system/>
<nologdefaultblock/>
-->
</syslog>
<nat>
<outbound>
<mode>automatic</mode>
<!--
<rule>
<interface></interface>
<source>
<network>xxx.xxx.xxx.xxx/xx</network>
</source>
<destination>
<not/>
<any/>
*or*
<network>xxx.xxx.xxx.xxx/xx</network>
</destination>
<target>xxx.xxx.xxx.xxx</target>
<descr></descr>
</rule>
-->
</outbound>
<!--
<rule>
<interface></interface>
<external-address></external-address>
<protocol></protocol>
<external-port></external-port>
<target></target>
<local-port></local-port>
<descr></descr>
</rule>
-->
<!--
<onetoone>
<interface></interface>
<external>xxx.xxx.xxx.xxx</external>
<internal>xxx.xxx.xxx.xxx</internal>
<subnet></subnet>
<descr></descr>
</onetoone>
-->
<!--
<servernat>
<ipaddr></ipaddr>
<descr></descr>
</servernat>
-->
</nat>
<filter>
<!-- <tcpidletimeout></tcpidletimeout> -->
<rule>
<type>pass</type>
<ipprotocol>inet</ipprotocol>
......@@ -427,34 +332,6 @@
<any/>
</destination>
</rule>
<!-- rule syntax:
<rule>
<disabled/>
<id>[0-9]*</id>
<type>pass|block|reject</type>
<ipprotocol>inet|inet6</ipprotocol>
<descr>...</descr>
<interface>lan|opt[n]|wan|pptp</interface>
<protocol>tcp|udp|tcp/udp|...</protocol>
<icmptype></icmptype>
<source>
<not/>
<address>xxx.xxx.xxx.xxx(/xx) or alias</address>
*or*
<network>lan|opt[n]|pptp</network>
*or*
<any/>
<port>a[-b]</port>
</source>
<destination>
*same as for source*
</destination>
<frags/>
<log/>
</rule>
-->
</filter>
<proxyarp>
<!--
......@@ -574,7 +451,7 @@
<type>send</type>
<descr><![CDATA[Generic SMTP]]></descr>
<options>
<send></send>
<send/>
<expect>220 *</expect>
</options>
</monitor_type>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment