vrp85Read8021QConfig: fix vlan list parsing
authorAlexey Andriyanov <alan@al-an.info>
Tue, 17 Sep 2013 15:45:32 +0000 (19:45 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 17 Oct 2013 09:07:24 +0000 (13:07 +0400)
wwwroot/inc/deviceconfig.php

index 2656fae9f5d6a05b0ad75eae36216f383778a4dc..7ea10dc4f2dddeb598a97f6e722658dc3a542b1d 100644 (file)
@@ -995,7 +995,8 @@ function vrp85Read8021QConfig ($input)
                                elseif (preg_match('/^-+$/', $line))
                                {
                                        // commit $current into vlanlist
-                                       $range = trim (preg_replace('/\s+/', ',', $current['vlanlist']), ',-');
+                                       $range = preg_replace ('/\s+to\s+/', '-', $current['vlanlist']);
+                                       $range = trim (preg_replace('/\s+/', ',', $range), ',-');
                                        $ret['vlanlist'] = $range == '' ? array() : iosParseVLANString ($range);
                                        $current = array();