From 93b7498b7516d0822df48ea72b22add29821263f Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 11 Apr 2025 17:08:07 +0200 Subject: [PATCH] rename --- show.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {