I was able to make some changes to dev branch in my forked repo (https://github.com/alakuapark/question2answer
) for getting ipv6 working in q2a.
All ip storing fields in database where changed to varbinary(16) and read/writes to this fields are made with the following stored procedures:
CREATE FUNCTION `IpToString`(`ip` VARBINARY(16)) RETURNS varchar(39) BEGIN
IF IS_IPV6(INET6_NTOA(ip)) THEN RETURN INET6_NTOA(ip);
ELSE RETURN INET_NTOA(ip);
CREATE FUNCTION `StringToIp`(`ip` VARCHAR(39)) RETURNS VARBINARY(16)
DECLARE s VARBINARY(16);
IF IS_IPV6(ip) THEN set s=INET6_ATON(ip);
ELSE set s=INET_ATON(ip);
I would like to discuss about this feature with maintainers before asking a pull request.