aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2014-02-20 14:30:50 -0300
committerDanilo G. Baio (dbaio) <dbaio@bsd.com.br>2014-02-20 14:30:50 -0300
commite1776b88ed746f666a7384db414e119f11f1b069 (patch)
tree9e0b3aac733417629132dccc31f83a1660edcfe1
parent8d0adb058e23ce6e1c571c2a7d93adbefd268ceb (diff)
downloadpfsense-packages-e1776b88ed746f666a7384db414e119f11f1b069.tar.gz
pfsense-packages-e1776b88ed746f666a7384db414e119f11f1b069.tar.bz2
pfsense-packages-e1776b88ed746f666a7384db414e119f11f1b069.zip
openbgpd - fix blank listenip option
-rw-r--r--config/openbgpd/openbgpd.inc16
1 files changed, 12 insertions, 4 deletions
diff --git a/config/openbgpd/openbgpd.inc b/config/openbgpd/openbgpd.inc
index 9af83758..76aeb54f 100644
--- a/config/openbgpd/openbgpd.inc
+++ b/config/openbgpd/openbgpd.inc
@@ -90,9 +90,11 @@ function openbgpd_install_conf() {
$conffile .= "holdtime {$openbgpd_conf['holdtime']}\n";
// Specify listen ip
- if($openbgpd_conf['listenip'])
+ if(!empty($openbgpd_conf['listenip']))
$conffile .= "listen on {$openbgpd_conf['listenip']}\n";
-
+ else
+ $conffile .= "listen on 0.0.0.0\n";
+
// Specify router id
if($openbgpd_conf['routerid'])
$conffile .= "router-id {$openbgpd_conf['routerid']}\n";
@@ -127,8 +129,11 @@ function openbgpd_install_conf() {
$conffile .= "\t\t{$row['parameters']} {$row['parmvalue']} \n";
}
}
- if ($setlocaladdr == true)
+ if ($setlocaladdr == true && !empty($openbgpd_conf['listenip']))
$conffile .= "\t\tlocal-address {$openbgpd_conf['listenip']}\n";
+ else
+ $conffile .= "\t\tlocal-address 0.0.0.0\n";
+
$conffile .= "}\n";
}
}
@@ -157,8 +162,11 @@ function openbgpd_install_conf() {
$conffile .= "\t{$row['parameters']} {$row['parmvalue']} \n";
}
}
- if ($setlocaladdr == true)
+ if ($setlocaladdr == true && !empty($openbgpd_conf['listenip']))
$conffile .= "\tlocal-address {$openbgpd_conf['listenip']}\n";
+ else
+ $conffile .= "\tlocal-address 0.0.0.0\n";
+
$conffile .= "}\n";
}
}