summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-07-27 21:16:24 +0000
committerErmal Luçi <eri@pfsense.org>2009-07-27 21:16:24 +0000
commite78901cd168c736b4c3eca1108fb8275b5188c07 (patch)
tree19ce572e15272bbcd2dabdca3920c96a854ac58d /etc
parent670d3bc0761994a7333ef41d85edc3d38c847c2d (diff)
downloadpfsense-e78901cd168c736b4c3eca1108fb8275b5188c07.zip
pfsense-e78901cd168c736b4c3eca1108fb8275b5188c07.tar.gz
Fix routes on the same interface and the return value of guess_interface_from_ip to not include \n. Reported on http://forum.pfsense.org/index.php/topic,18001.0.html.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc2
-rw-r--r--etc/inc/interfaces.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 0d96548..741cf9c 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1739,7 +1739,7 @@ EOD;
* interface in question to avoid problems with complicated routing
* topologies
*/
- if (isset($config['system']['bypassstaticroutes']) && is_array($config['staticroutes']['route']) && count($config['staticroutes']['route'])) {
+ if (isset($config['filter']['bypassstaticroutes']) && is_array($config['staticroutes']['route']) && count($config['staticroutes']['route'])) {
$ipfrules .= "anchor \"staticrouted\" \n";
foreach ($config['staticroutes']['route'] as $route) {
$realif = guess_interface_from_ip(lookup_gateway_ip_by_name($route['gateway']));
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index c7eab73..44e11b2 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2185,7 +2185,7 @@ function get_real_interface($interface = "wan") {
}
function guess_interface_from_ip($ipaddress) {
- $ret = `/usr/bin/netstat -rn | /usr/bin/awk '/^{$ipaddress}/ {print \$6}'`;
+ $ret = `/usr/bin/netstat -rn | /usr/bin/awk '/^{$ipaddress}/ {print "%s", \$6}'`;
if (empty($ret))
return false;
OpenPOWER on IntegriCloud