$intf) { if ($intf['if'] == $gre_intf) { return true; } } return false; } if (!isset($config['gres']['gre']) || !is_array($config['gres']['gre'])) { $a_gres = array(); } else { $a_gres = &$config['gres']['gre'] ; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (!empty($a_gres[$_POST['id']])) { $id = $_POST['id']; } if (!empty($_POST['action']) && $_POST['action'] == "del" && isset($id)) { if (gre_inuse($a_gres[$id]['greif'])) { $input_errors[] = gettext("This GRE tunnel cannot be deleted because it is still being used as an interface."); } else { mwexec("/sbin/ifconfig " . escapeshellarg($a_gres[$id]['greif']) . " destroy"); unset($a_gres[$id]); write_config(); header("Location: interfaces_gre.php"); exit; } } } include("head.inc"); legacy_html_escape_form_data($a_gres); $main_buttons = array( array('href'=>'interfaces_gre_edit.php', 'label'=>gettext('Add')), ); ?>
0) print_input_errors($input_errors); ?>
 
">