From 53b0d9d391dcd7c53a8eecb3dd89cc3e414f2b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Tue, 2 Feb 2010 22:05:39 +0000 Subject: 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. --- etc/inc/interfaces.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'etc/inc') 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; -- cgit v1.1