Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5.15
-
None
-
CentOS 3.10 x86_64
cacti 1.2.22 (if needed)
Description
I have an issue to extract the subnet part of an IPv4 based on the subnet mask and the ip adress.
In my DB the ip adress are of type varbinary(16) and the ip is stored using INET6_ATON
I'm using this Mysql function to test it:
this one work:
select INET_NTOA(INET_ATON("255.255.0.0")&INET_ATON("10.65.1.2" ))
return: 10.65.0.0
This don't :
select INET6_NTOA(INET6_ATON("255.255.0.0")&INET6_ATON("10.65.1.2" ))
return: null
And I need the record be able to handle either IPv4 and IPv6.
Is that the problem of 64 vs 128bit whay to handle the & function ?