diff options
author | Seth Mos <seth.mos@dds.nl> | 2012-03-15 03:02:08 -0700 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2012-03-15 03:02:08 -0700 |
commit | 7a7638986004929feddc8a84665b10fb9057ff97 (patch) | |
tree | 1fd28075b7b7a3f9bc7057114a6ebf9d02b297ab | |
parent | c3f01709d6d932f9f49f771ecd5f2652af05d5fe (diff) | |
parent | 29bf947e245a9a3f5202012582e7ba1dde0a57e8 (diff) | |
download | pfsense-7a7638986004929feddc8a84665b10fb9057ff97.zip pfsense-7a7638986004929feddc8a84665b10fb9057ff97.tar.gz |
Merge pull request #64 from phil-davis/master
Bug #2284: rc.newwanip handle case when gifs config is null
-rwxr-xr-x | etc/rc.newwanip | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/etc/rc.newwanip b/etc/rc.newwanip index 86dac23..c50b5d3 100755 --- a/etc/rc.newwanip +++ b/etc/rc.newwanip @@ -118,17 +118,19 @@ if (!empty($bridgetmp)) system_routing_configure($interface); /* Check Gif tunnels */ -foreach($config['gifs']['gif'] as $gif) { - if($gif['if'] == $interface) { - foreach($config['interfaces'] as $ifname => $ifparent) { - // echo "interface $ifparent, ifname $ifname, gif {$gif['gifif']}\n"; - if(($ifparent['if'] == $gif['gifif']) && (isset($ifparent['enable']))) { - // echo "Running routing configure for $ifname\n"; - $gif['gifif'] = interface_gif_configure($gif); - $confif = convert_real_interface_to_friendly_interface_name($gif['gifif']); - if ($confif <> "") - interface_configure($confif); - system_routing_configure($ifname); +if(is_array($config['gifs']['gif'])){ + foreach($config['gifs']['gif'] as $gif) { + if($gif['if'] == $interface) { + foreach($config['interfaces'] as $ifname => $ifparent) { + // echo "interface $ifparent, ifname $ifname, gif {$gif['gifif']}\n"; + if(($ifparent['if'] == $gif['gifif']) && (isset($ifparent['enable']))) { + // echo "Running routing configure for $ifname\n"; + $gif['gifif'] = interface_gif_configure($gif); + $confif = convert_real_interface_to_friendly_interface_name($gif['gifif']); + if ($confif <> "") + interface_configure($confif); + system_routing_configure($ifname); + } } } } |