Revision 88cc00db
Added by Ermal LUÇI over 12 years ago
etc/inc/services.inc | ||
---|---|---|
1001 | 1001 |
} |
1002 | 1002 |
|
1003 | 1003 |
if(is_ipaddrv6(ifcfgipv6)) { |
1004 |
$subnet6 = Net_IPv6::compress(gen_subnetv6($ifcfgipv6, $ifcfgsnv6));
|
|
1004 |
$subnet6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6);
|
|
1005 | 1005 |
$dhcpdv6conf .= "subnet6 {$subnet6}/{$ifcfgsnv6} {\n"; |
1006 | 1006 |
} else { |
1007 |
$subnet6 = Net_IPv6::compress(gen_subnetv6($dhcpv6ifconf['range']['from'], "64"));
|
|
1007 |
$subnet6 = gen_subnetv6($dhcpv6ifconf['range']['from'], "64");
|
|
1008 | 1008 |
$dhcpdv6conf .= "subnet6 {$subnet6}/64 {\n"; |
1009 | 1009 |
} |
1010 | 1010 |
|
etc/inc/util.inc | ||
---|---|---|
284 | 284 |
return ""; |
285 | 285 |
|
286 | 286 |
$address = Net_IPv6::getNetmask($ipaddr, $bits); |
287 |
$address = Net_IPv6::compress($address); |
|
287 | 288 |
return $address; |
288 | 289 |
} |
289 | 290 |
|
... | ... | |
307 | 308 |
|
308 | 309 |
$inet_end = $inet_ip | ~$inet_mask; |
309 | 310 |
|
310 |
return(Net_IPv6::uncompress(inet_ntop($inet_end)));
|
|
311 |
return (inet_ntop($inet_end));
|
|
311 | 312 |
} |
312 | 313 |
|
313 | 314 |
/* returns a subnet mask (long given a bit count) */ |
usr/local/www/firewall_virtual_ip_edit.php | ||
---|---|---|
167 | 167 |
$parent_ip = get_interface_ipv6($_POST['interface']); |
168 | 168 |
$parent_sn = get_interface_subnetv6($_POST['interface']); |
169 | 169 |
$subnet = gen_subnetv6($parent_ip, $parent_sn); |
170 |
if (!ip_in_subnet($_POST['subnet'], gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['subnet'])) {
|
|
170 |
if (!ip_in_subnet($_POST['subnet'], "{$subnet}/{$parent_sn}") && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['subnet'])) {
|
|
171 | 171 |
$cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ; |
172 | 172 |
$input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find); |
173 | 173 |
} |
usr/local/www/system_routes_edit.php | ||
---|---|---|
110 | 110 |
$current_targets = get_staticroutes(true); |
111 | 111 |
$new_targets = array(); |
112 | 112 |
if(is_ipaddrv6($_POST['network'])) { |
113 |
$osn = Net_IPv6::compress(gen_subnetv6($_POST['network'], $_POST['network_subnet'])) . "/" . $_POST['network_subnet'];
|
|
113 |
$osn = gen_subnetv6($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet'];
|
|
114 | 114 |
$new_targets[] = $osn; |
115 | 115 |
} |
116 | 116 |
if (is_ipaddrv4($_POST['network'])) { |
Also available in: Unified diff
Make gen_subnetv6 return a compressed form IPv6 address/net representation. This removes some issues reported during Ticket #2746 and solve the issue on some cases