We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 53d94d9 + 2e7beae commit 04f05dfCopy full SHA for 04f05df
lib/OperatingSystems/FreeBSD.php
@@ -118,8 +118,10 @@ public function getNetworkInfo(): array {
118
$alldns = implode(' ', $matches[0]);
119
$result['dns'] = $alldns;
120
$netstat = $this->executeCommand('netstat -rn');
121
- preg_match("/(?<=^default).*\b\d/m", $netstat, $gw);
122
- $result['gateway'] = $gw[0];
+ preg_match_all("/(?<=^default)\s*[0-9a-fA-f\.:]+/m", $netstat, $gw);
+ if (count($gw[0]) > 0) {
123
+ $result['gateway'] = implode(", ", array_map("trim", $gw[0]));
124
+ }
125
} catch (\RuntimeException $e) {
126
return $result;
127
}
0 commit comments