diff --git a/show.php b/show.php index 62f49ae..ac692df 100644 --- a/show.php +++ b/show.php @@ -19,10 +19,10 @@ $otherPattern = " .*$NLP"; $endPattern = "(?\d+)\/0\/(?P\d+)$NLP"; -$portAccessPattern = " port (?:access |trunk |hybrid |pvid |vlan )*(?P\d+)$NLP"; +$pvidPattern = " port (?:access vlan|trunk pvid) (?P\d+)$NLP"; $portHybridPattern = " port hybrid (?:pvid )?vlan (?:(?P\d+)(?: [0-9a-z ]*)? tagged|(?P\d+)(?: \d+)* untagged)$NLP"; $voiceVlanPattern = " voice-vlan (?P\d+) enable$NLP"; -preg_match_all("/$startPattern$interfaceAddressPattern(?:$portAccessPattern|$portHybridPattern|$voiceVlanPattern|$otherPattern)*$endPattern/", $conf, $interfaces, PREG_SET_ORDER); +preg_match_all("/$startPattern$interfaceAddressPattern(?:$pvidPattern|$portHybridPattern|$voiceVlanPattern|$otherPattern)*$endPattern/", $conf, $interfaces, PREG_SET_ORDER); $stack = array(); foreach ($interfaces as $interface) {