diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-05-23 22:59:33 +0200 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-05-23 22:59:33 +0200 |
commit | 7c0571ce97992a41e6993c51b8a01ac9c5a4b404 (patch) | |
tree | dd589c975a167cb52524535278a4d15b3a66418c /etc/inc | |
parent | ed5c640d69ed17a83dfddcf1815fbcd9b1bcf0e4 (diff) | |
download | pfsense-7c0571ce97992a41e6993c51b8a01ac9c5a4b404.zip pfsense-7c0571ce97992a41e6993c51b8a01ac9c5a4b404.tar.gz |
When editing a gif interface with a gateway we need to call system_routing_configure() for that gif interface.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/interfaces.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 13cdf15..0a71138 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -811,8 +811,15 @@ function interface_gif_configure(&$gif, $gifkey = "") { else log_error("could not bring gifif up -- variable not defined"); - /* XXX: Needed?! Let them use the defined gateways instead */ - //mwexec("/sbin/route add {$gif['tunnel-remote-addr']}/{$gif['tunnel-remote-net']} -iface {$gifif}"); + $iflist = get_configured_interface_list(); + foreach($iflist as $ifname) { + if($config['interfaces'][$ifname]['if'] == $gifif) { + if(get_interface_gateway_v6($ifname)) { + system_routing_configure($ifname); + break; + } + } + } if(is_ipaddrv4($gif['tunnel-remote-addr'])) file_put_contents("{$g['tmp_path']}/{$gifif}_router", $gif['tunnel-remote-addr']); |