Revision df966626
Added by Chris Buechler over 10 years ago
etc/inc/interfaces.inc | ||
---|---|---|
1318 | 1318 |
case "6to4": |
1319 | 1319 |
$realif = "{$interface}_stf"; |
1320 | 1320 |
if (does_interface_exist("$realif")) { |
1321 |
$ip6 = get_interface_ipv6($interface); |
|
1322 |
if (is_ipaddrv6($ip6)) { |
|
1323 |
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " inet6 {$ip6} delete", true); |
|
1321 |
/* destroy stf interface if tunnel is being disabled or tunnel type is being changed */ |
|
1322 |
if (($ifcfg['ipaddrv6'] == '6rd' && (!isset($config['interfaces'][$interface]['ipaddrv6']) || $config['interfaces'][$interface]['ipaddrv6'] != '6rd')) || |
|
1323 |
($ifcfg['ipaddrv6'] == '6to4' && (!isset($config['interfaces'][$interface]['ipaddrv6']) || $config['interfaces'][$interface]['ipaddrv6'] != '6to4'))) { |
|
1324 |
$destroy = true; |
|
1325 |
} else { |
|
1326 |
/* get_interface_ipv6() returns empty value if interface is being disabled */ |
|
1327 |
$ip6 = get_interface_ipv6($interface); |
|
1328 |
if (is_ipaddrv6($ip6)) |
|
1329 |
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " inet6 {$ip6} delete", true); |
|
1324 | 1330 |
} |
1325 | 1331 |
interface_ipalias_cleanup($interface, "inet6"); |
1326 | 1332 |
if ($destroy == true) { |
Also available in: Unified diff
Destroy stf interface when 6rd or 6to4 tunnel is disabled. Fixes #4471