Skip to content

Commit

Permalink
relax whitespace in some IOS 12 regexps
Browse files Browse the repository at this point in the history
As far as a draft commit in pull request RackTables#225 went, this is supposed to
improve compatibility with IOS 15.

[skip ci]
  • Loading branch information
infrastation authored and lrupp committed Jul 5, 2019
1 parent 1b66b2e commit ca9c1e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wwwroot/inc/deviceconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function ios12ScanTopLevel (&$work, $line)
$work['current'] = array ('port_name' => $port_name);
$work['portconfig'][$port_name][] = array ('type' => 'line-header', 'line' => $line);
return 'ios12-get8021q-readport'; // switch to interface block reading
case (preg_match ('/^VLAN Name Status Ports$/', $line, $matches)):
case (preg_match ('/^VLAN Name\s+Status\s+Ports$/', $line, $matches)):
return 'ios12-get8021q-readvlan';
default:
return 'ios12-get8021q-top'; // continue scan
Expand Down Expand Up @@ -509,7 +509,7 @@ function ios12PickVLANCommand (&$work, $line)
{
case (preg_match ('@! END OF VLAN LIST$@', $line)):
return 'ios12-get8021q-top';
case (preg_match ('@^([[:digit:]]+) {1,4}.{32} active @', $line, $matches)):
case (preg_match ('@^([[:digit:]]+) {1,4}.{32} active\s*@', $line, $matches)):
$work['vlanlist'][] = $matches[1];
break;
default:
Expand Down

0 comments on commit ca9c1e5

Please sign in to comment.