summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2009-03-12 07:34:16 +0100
committerSeth Mos <seth.mos@xs4all.nl>2009-03-12 07:35:08 +0100
commitb9064a4d01ae3f15f5593cf278ecc9c0ae3f5e2a (patch)
tree81c46f9e824e383ba7f7b17976ab1d6e90895684 /etc
parent0dfd5d3318242cc60e7ff594e778c6fa247feb42 (diff)
downloadpfsense-b9064a4d01ae3f15f5593cf278ecc9c0ae3f5e2a.zip
pfsense-b9064a4d01ae3f15f5593cf278ecc9c0ae3f5e2a.tar.gz
Reverse style fixes to get our subnet mask listed backed from get_interface_info()
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pfsense-utils.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 03b63eb..1dd4721 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -3036,13 +3036,17 @@ function get_interface_info($ifdescr) {
unset($ifconfiginfo, $link0);
exec("/sbin/ifconfig " . $ifinfo['if'], $ifconfiginfo);
foreach ($ifconfiginfo as $ici) {
- if (preg_match("/inet (\S+)/", $ici, $matches))
+ if (preg_match("/inet (\S+)/", $ici, $matches)) {
$ifinfo['ipaddr'] = $matches[1];
- else if (preg_match("/netmask (\S+)/", $ici, $matches))
- if (preg_match("/^0x/", $matches[1]))
+ }
+ if (preg_match("/netmask (\S+)/", $ici, $matches)) {
+ if (preg_match("/^0x/", $matches[1])) {
$ifinfo['subnet'] = long2ip(hexdec($matches[1]));
- if (strpos($ici, 'LINK0') !== false)
+ }
+ }
+ if (strpos($ici, 'LINK0') !== false) {
$link0 = "down";
+ }
}
switch ($config['interfaces'][$if]['ipaddr']) {
@@ -3509,4 +3513,4 @@ function compare_hostname_to_dnscache($hostname) {
}
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud