The IP addresses are de/serialized using long2ip and ip2long, which only support ipv4.
inet_ntop and inet_pton work with both ipv4 and ipv6 but use a different format.
IP addresses need to be converted with long2ip to a string and then serialized with inet_pton in hook_update_N().
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1936276-d7-ipv6-4.patch | 3.3 KB | bluegeek9 |
Issue fork visitors-1936276
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
bluegeek9 commentedIt looks like 45 characters are needed for IPv6.
https://stackoverflow.com/a/166157
Comment #2
bluegeek9 commentedThe ip address uses long2ip and ip2long which only references IPv4.
inet_ntop and inet_pton mention both IPv4 and IPv6.
The database field should probably be a big unsigned int.
Comment #3
bluegeek9 commentedComment #4
bluegeek9 commentedPatch for 7.x-1.x
Comment #5
bluegeek9 commentedComment #7
bluegeek9 commentedComment #10
bluegeek9 commentedAdds ipv6 support to 8.x-2.x
Comment #12
bluegeek9 commented