Revision 909de400
Added by Ermal LUÇI over 12 years ago
etc/inc/gwlb.inc | ||
---|---|---|
429 | 429 |
$gateway['friendlyiface'] = $gateway['interface']; |
430 | 430 |
|
431 | 431 |
/* special treatment for tunnel interfaces */ |
432 |
if($gateway['ipprotocol'] == "inet6") { |
|
433 |
switch($wancfg['ipaddrv6']) { |
|
434 |
case "6rd": |
|
435 |
case "6to4": |
|
436 |
$gateway['interface'] = "{$gateway['interface']}_stf"; |
|
437 |
break; |
|
438 |
default: |
|
439 |
$gateway['interface'] = get_real_interface($gateway['interface']); |
|
440 |
break; |
|
441 |
} |
|
442 |
} |
|
443 |
if($gateway['ipprotocol'] == "inet") { |
|
432 |
if ($gateway['ipprotocol'] == "inet6") |
|
433 |
$gateway['interface'] = get_real_interface($gateway['interface'], "inet6"); |
|
434 |
else if ($gateway['ipprotocol'] == "inet") |
|
444 | 435 |
$gateway['interface'] = get_real_interface($gateway['interface']); |
445 |
} |
|
446 | 436 |
|
447 | 437 |
/* entry has a default flag, use it */ |
448 | 438 |
if (isset($gateway['defaultgw'])) { |
... | ... | |
584 | 574 |
$gateway['dynamic'] = false; |
585 | 575 |
$gateway['ipprotocol'] = "inet6"; |
586 | 576 |
$gateway['gateway'] = get_interface_gateway_v6($ifname, $gateway['dynamic']); |
577 |
$gateway['interface'] = get_real_interface($ifname, "inet6"); |
|
587 | 578 |
switch($ifcfg['ipaddrv6']) { |
588 |
case "6to4": |
|
589 |
$gateway['interface'] = "{$ifname}_stf"; |
|
590 |
$gateway['dynamic'] = "default"; |
|
591 |
break; |
|
592 | 579 |
case "6rd": |
593 |
$gateway['interface'] = "{$ifname}_stf";
|
|
580 |
case "6to4":
|
|
594 | 581 |
$gateway['dynamic'] = "default"; |
595 | 582 |
break; |
596 |
default: |
|
597 |
$gateway['interface'] = get_real_interface($ifname); |
|
598 |
break; |
|
599 | 583 |
} |
600 | 584 |
$gateway['friendlyiface'] = $ifname; |
601 | 585 |
$gateway['name'] = "{$friendly}{$ctype}"; |
Also available in: Unified diff
Try to remove as much as possible _stf special case through the code