foreach ($ospf->networks->network->iterateItems() as $network) { if ((string)$network->enabled == '1') { $fw->registerFilterRule( 1, /* priority */ array( 'ipprotocol' => 'inet', 'protocol' => 'ospf', 'statetype' => 'keep', 'label' => 'Pass OSPF (autogenerated)', 'from' => $network->ipaddr . '/' . $network->netmask, 'to' => '224.0.0.0/24', 'direction' => 'in', 'type' => 'pass', 'disablereplyto' => 1, 'quick' => true ), null ); $fw->registerFilterRule( 1, array( 'ipprotocol' => 'inet', 'protocol' => 'ospf', 'statetype' => 'keep', 'label' => 'Pass OSPF UNICAST (autogenerated)', 'from' => $network->ipaddr . '/' . $network->netmask, 'to' => '(self)', 'direction' => 'in', 'type' => 'pass', 'disablereplyto' => 1, 'quick' => true ), null ); $fw->registerFilterRule( 1, array( 'ipprotocol' => 'inet', 'protocol' => 'ospf', 'statetype' => 'keep', 'label' => 'Pass OSPF (autogenerated)', 'from' => '224.0.0.0/24', 'to' => $network->ipaddr . '/' . $network->netmask, 'direction' => 'out', 'type' => 'pass', 'disablereplyto' => 1, 'quick' => true ), null ); $fw->registerFilterRule( 1, array( 'ipprotocol' => 'inet', 'protocol' => 'ospf', 'statetype' => 'keep', 'label' => 'Pass OSPF UNICAST (autogenerated)', 'from' => '(self)', 'to' => $network->ipaddr . '/' . $network->netmask, 'direction' => 'out', 'type' => 'pass', 'disablereplyto' => 1, 'quick' => true ), null );