mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
interfaces: allow private addresses in 6RD, cleanups #1501
This commit is contained in:
parent
9e1a4ce83b
commit
c3a4e45a86
@ -2613,8 +2613,8 @@ function interface_track6_6rd_configure($interface = 'lan', $lancfg)
|
||||
}
|
||||
|
||||
$ip4address = get_interface_ip($lancfg['track6-interface']);
|
||||
if (!is_ipaddrv4($ip4address)) { /* XXX: This should not be needed by 6rd || (is_private_ip($ip4address))) { */
|
||||
log_error("The interface IPv4 '{$ip4address}' address on interface '{$lancfg['track6-interface']}' is not public, not configuring 6RD tunnel");
|
||||
if (!is_ipaddrv4($ip4address)) {
|
||||
log_error("The interface IPv4 address '{$ip4address}' on interface '{$lancfg['track6-interface']}' is invalid, not configuring 6RD tracking");
|
||||
return;
|
||||
}
|
||||
$hexwanv4 = return_hex_ipv4($ip4address);
|
||||
@ -2658,7 +2658,7 @@ function interface_track6_6to4_configure($interface = 'lan', $lancfg)
|
||||
{
|
||||
$ip4address = get_interface_ip($lancfg['track6-interface']);
|
||||
if (!is_ipaddrv4($ip4address) || is_private_ip($ip4address)) {
|
||||
log_error("The interface IPv4 '{$ip4address}' address on interface '{$lancfg['track6-interface']}' is not public, not configuring 6RD tunnel");
|
||||
log_error("The interface IPv4 address '{$ip4address}' on interface '{$lancfg['track6-interface']}' is not public, not configuring 6to4 tracking");
|
||||
return;
|
||||
}
|
||||
$hexwanv4 = return_hex_ipv4($ip4address);
|
||||
@ -2696,16 +2696,14 @@ function interface_track6_6to4_configure($interface = 'lan', $lancfg)
|
||||
|
||||
function interface_6rd_configure($interface = "wan", $wancfg)
|
||||
{
|
||||
/* because this is a tunnel interface we can only function
|
||||
* with a public IPv4 address on the interface */
|
||||
if (!is_array($wancfg)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$wanif = get_real_interface($interface);
|
||||
$ip4address = find_interface_ip($wanif);
|
||||
if ((!is_ipaddrv4($ip4address)) || (is_private_ip($ip4address))) {
|
||||
log_error("The interface IPv4 '{$ip4address}' address on interface '{$wanif}' is not public, not configuring 6RD tunnel");
|
||||
if (!is_ipaddrv4($ip4address)) {
|
||||
log_error("The interface IPv4 address '{$ip4address}' on interface '{$wanif}' is invalid, not configuring 6RD tunnel");
|
||||
return false;
|
||||
}
|
||||
$hexwanv4 = return_hex_ipv4($ip4address);
|
||||
@ -2775,15 +2773,10 @@ function interface_6to4_configure($interface = 'wan', $wancfg)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Because this is a tunnel interface we can only function
|
||||
* with a public IPv4 address on the interface
|
||||
*/
|
||||
|
||||
$wanif = get_real_interface($interface);
|
||||
$ip4address = find_interface_ip($wanif);
|
||||
if ((!is_ipaddrv4($ip4address)) || (is_private_ip($ip4address))) {
|
||||
log_error("The interface IPv4 '{$ip4address}' address on interface '{$wanif}' is not public, not configuring 6RD tunnel");
|
||||
if (!is_ipaddrv4($ip4address) || is_private_ip($ip4address)) {
|
||||
log_error("The interface IPv4 address '{$ip4address}' on interface '{$wanif}' is not public, not configuring 6to4 tunnel");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user