<def-group>
  <definition class="compliance" id="network_ipv6_default_gateway"
  version="1">
    <metadata>
      <title>Disable DHCP Client</title>
      <affected family="unix">
        <platform>CentOS 4</platform>
		<platform>CentOS 5</platform>
		<platform>Red Hat Enterprise Linux 4</platform>
		<platform>Red Hat Enterprise Linux 5</platform>
      </affected>
      <description>DHCP configuration should be static for all
      interfaces.</description>
    </metadata>
    <criteria comment="Test for IPV6_DEFAULTGW across all interfaces if IPV6 is enabled" operator="OR" >
      <criterion test_ref="test_network_ipv6_default_gateway_ipv6_disabled" />
      <criterion test_ref="test_network_ipv6_default_gateway" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="Look for argument 'NETWORKING_IPV6=no' in /etc/sysconfig/network" id="test_network_ipv6_default_gateway_ipv6_disabled" version="1">
    <ind:object object_ref="object_network_ipv6_default_gateway_ipv6_disabled" />
    <ind:state state_ref="state_network_ipv6_default_gateway_ipv6_disabled" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_network_ipv6_default_gateway_ipv6_disabled" version="1">
    <ind:filepath>/etc/sysconfig/network</ind:filepath>
    <ind:pattern operation="pattern match">^(?!#)[\s]*NETWORKING_IPV6[\s]*=[\s]*([a-z]+)[\s]*$</ind:pattern>
    <ind:instance datatype="int" operation="equals">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_state id="state_network_ipv6_default_gateway_ipv6_disabled" version="1">
    <ind:subexpression datatype="string" operation="equals">no</ind:subexpression>
  </ind:textfilecontent54_state>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="Tests the value of the IPV6_DEFAULTGW expression in the /etc/sysconfig/network-scripts/ifcfg-.* files"
  id="test_network_ipv6_default_gateway" version="1">
    <ind:object object_ref="obj_network_ipv6_default_gateway" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_network_ipv6_default_gateway"
  version="1">
    <ind:path>/etc/sysconfig/network-scripts</ind:path>
    <ind:filename operation="pattern match">ifcfg-.*</ind:filename>
    <ind:pattern operation="pattern match">^(?!#)[\s]*IPV6_DEFAULTGW[\s]*=[\s]*([a-zA-Z0-9:]+)[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
