summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-02 22:05:39 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-02 22:05:39 +0000
commit53b0d9d391dcd7c53a8eecb3dd89cc3e414f2b6a (patch)
tree11cc8f220e515f9e8a28e14047b05a63ec8af339 /etc/inc
parent1de7408159d73ffb15aad4a64c2be3fc0c0b2757 (diff)
downloadpfsense-53b0d9d391dcd7c53a8eecb3dd89cc3e414f2b6a.zip
pfsense-53b0d9d391dcd7c53a8eecb3dd89cc3e414f2b6a.tar.gz
Add route automatically only when the route search type is enabled on gre and disable the route auto adding on gif. User can deal with routes on the Routing pages.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 12d2e18..8fdb4bd 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -574,7 +574,8 @@ function interface_gre_configure(&$gre) {
else
log_error("Could not bring greif up -- variable not defined.");
- mwexec("/sbin/route add {$gre['remote-addr']}/{$gre['tunnel-remote-net']} -iface {$greif}");
+ if (isset($gre['link1']) && $gre['link1'])
+ mwexec("/sbin/route add {$gre['tunnel-remote-addr']}/{$gre['tunnel-remote-net']} {$gre[tunnel-local-addr']}");
file_put_contents("{$g['tmp_path']}/{$greif}_router", $gre['tunnel-remote-addr']);
return $greif;
@@ -628,7 +629,8 @@ function interface_gif_configure(&$gif) {
else
log_error("could not bring gifif up -- variable not defined");
- mwexec("/sbin/route add {$gif['remote-addr']}/{$gif['tunnel-remote-net']} -iface {$gifif}");
+ /* XXX: Needed?! */
+ //mwexec("/sbin/route add {$gif['tunnel-remote-addr']}/{$gif['tunnel-remote-net']} -iface {$gifif}");
file_put_contents("{$g['tmp_path']}/{$gifif}_router", $gif['tunnel-remote-addr']);
return $gifif;
OpenPOWER on IntegriCloud