Merge pull request #2145 from onlyjob/arp_regex
fix regex to match IP and first numbers of MAC in the `arp -a` output (Closes: #2144)
This commit is contained in:
commit
f5dce7e863
|
@ -321,7 +321,7 @@ if ( $status )
|
|||
Fatal( "Unable to probe network cameras, status is '$status'" );
|
||||
foreach ( $output as $line )
|
||||
{
|
||||
if ( !preg_match( '/^.*([\d.]+).*([0-9a-f:]+).*/', $line, $matches ) )
|
||||
if ( !preg_match( '/(\d+\.\d+\.\d+\.\d+).*(([0-9a-f]{2}:){5})/', $line, $matches ) )
|
||||
continue;
|
||||
$ip = $matches[1];
|
||||
$host = $ip;
|
||||
|
|
Loading…
Reference in New Issue