diff options
author | Ermal <eri@pfsense.org> | 2013-02-07 09:43:57 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-07 09:46:44 +0000 |
commit | 88cc00dbf56c7b900a6258a47f7f07329c2c19c8 (patch) | |
tree | 5e5867aed7f32d77ba3b48054a9cd8cfd80273dd /etc | |
parent | d7a1532bbf016674514daa01a8bbec20848f8870 (diff) | |
download | pfsense-88cc00dbf56c7b900a6258a47f7f07329c2c19c8.zip pfsense-88cc00dbf56c7b900a6258a47f7f07329c2c19c8.tar.gz |
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
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/services.inc | 4 | ||||
-rw-r--r-- | etc/inc/util.inc | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 7ffb555..4016d45 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1001,10 +1001,10 @@ EOD; } if(is_ipaddrv6(ifcfgipv6)) { - $subnet6 = Net_IPv6::compress(gen_subnetv6($ifcfgipv6, $ifcfgsnv6)); + $subnet6 = gen_subnetv6($ifcfgipv6, $ifcfgsnv6); $dhcpdv6conf .= "subnet6 {$subnet6}/{$ifcfgsnv6} {\n"; } else { - $subnet6 = Net_IPv6::compress(gen_subnetv6($dhcpv6ifconf['range']['from'], "64")); + $subnet6 = gen_subnetv6($dhcpv6ifconf['range']['from'], "64"); $dhcpdv6conf .= "subnet6 {$subnet6}/64 {\n"; } diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 74b11ce..e137c68 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -284,6 +284,7 @@ function gen_subnetv6($ipaddr, $bits) { return ""; $address = Net_IPv6::getNetmask($ipaddr, $bits); + $address = Net_IPv6::compress($address); return $address; } @@ -307,7 +308,7 @@ function gen_subnetv6_max($ipaddr, $bits) { $inet_end = $inet_ip | ~$inet_mask; - return(Net_IPv6::uncompress(inet_ntop($inet_end))); + return (inet_ntop($inet_end)); } /* returns a subnet mask (long given a bit count) */ |