"") { $member = explode("-", $_POST["members{$x}"]); if (count($member) > 1) { if (preg_match("/([^0-9])+/", $member[0], $match) || preg_match("/([^0-9])+/", $member[1], $match)) $input_errors[] = gettext("Tags can contain only numbers or a range in format #-#."); for ($i = $member[0]; $i <= $member[1]; $i++) { if ($isfirst > 0) $members .= " "; $members .= $i; $isfirst++; } } else { if (preg_match("/([^0-9])+/", $_POST["members{$x}"], $match)) $input_errors[] = gettext("Tags can contain only numbers or a range in format #-#."); if ($isfirst > 0) $members .= " "; $members .= $_POST["members{$x}"]; $isfirst++; } } } if (!$input_errors) { $qinqentry['members'] = $members; $qinqentry['descr'] = $_POST['descr']; $qinqentry['vlanif'] = "{$_POST['if']}_{$_POST['tag']}"; $nmembers = explode(" ", $members); if (isset($id) && $a_qinqs[$id]) { $omembers = explode(" ", $a_qinqs[$id]['members']); $delmembers = array_diff($omembers, $nmembers); $addmembers = array_diff($nmembers, $omembers); if ((count($delmembers) > 0) || (count($addmembers) > 0)) { $fd = fopen("{$g['tmp_path']}/netgraphcmd", "w"); foreach ($delmembers as $tag) { fwrite($fd, "shutdown {$qinqentry['vlanif']}h{$tag}:\n"); fwrite($fd, "msg {$qinqentry['vlanif']}qinq: delfilter \\\"{$qinqentry['vlanif']}{$tag}\\\"\n"); } foreach ($addmembers as $member) { $qinq = array(); $qinq['if'] = $qinqentry['vlanif']; $qinq['tag'] = $member; $macaddr = get_interface_mac($qinqentry['vlanif']); interface_qinq2_configure($qinq, $fd, $macaddr); } fclose($fd); mwexec("/usr/sbin/ngctl -f {$g['tmp_path']}/netgraphcmd"); } $a_qinqs[$id] = $qinqentry; } else { interface_qinq_configure($qinqentry); $a_qinqs[] = $qinqentry; } if ($_POST['autogroup'] == "yes") { if (!is_array($config['ifgroups']['ifgroupentry'])) $config['ifgroups']['ifgroupentry'] = array(); foreach ($config['ifgroups']['ifgroupentry'] as $gid => $group) { if ($group['ifname'] == "QinQ") { $found = true; break; } } $additions = ""; foreach($nmembers as $qtag) $additions .= "{$qinqentry['vlanif']}_{$qtag} "; $additions .= "{$qinqentry['vlanif']}"; if ($found == true) $config['ifgroups']['ifgroupentry'][$gid]['members'] .= " {$additions}"; else { $gentry = array(); $gentry['ifname'] = "QinQ"; $gentry['members'] = "{$additions}"; $gentry['descr'] = gettext("QinQ VLANs group"); $config['ifgroups']['ifgroupentry'][] = $gentry; } } write_config(); header("Location: interfaces_qinq.php"); exit; } else { $pconfig['descr'] = $_POST['descr']; $pconfig['tag'] = $_POST['tag']; $pconfig['members'] = $members; } } include("head.inc"); ?> ">



/> Auto assign interface so it can be configured with ip etc...
/> Auto enable interface so it can be used on filter rules.
> Allows to keep clients mtu unchanged(1500).
NOTE: if you are using jumbo frames this option is not needed and may produce incorrect results!

>


"") { $item = explode(" ", $members); foreach($item as $ww) { $member = $item[$counter]; ?>
" />
  " /> " />