Add support for compressed form of IPv6#3
Add support for compressed form of IPv6#3ip2location-com merged 1 commit intomasterfrom unknown repository
Conversation
|
Something seems wrong with your code. For IP 2001:4860:4860::8844, I am getting 9 chunks when we expect a max of 8 chunks for IPv6. |
|
I do not get that in a test script that makes use of my changes posted in the commit. I get 8 chunks. Is there an extra |
|
My test code below: bn = require("nums.bn") function checkip(ip) -- check for format 1.11.111.111 for ipv4 end local isIPv6 = false; if #chunks == 0 then -- expand the ipv6 address and add zeroes for i = 1, #chunks do print("no. of chunks: " .. #chunks) checkip("2001:4860:4860::8844") The output I'm seeing is: hextet: 2001 Is that how it's supposed to appear? |
|
No. The output of mine looks like this: The only difference I see between your test and mine is that I am using single quotes in a variable assignment in the script instead of this function:
We have also tested this on our server and it appears to be working properly. |
|
Can you please share your test script? We need to check if there is any issue with our Lua version. |
I am using 5.4.1. It has also been tested in version 5.3 on our server. Thanks for the help. :) |
|
I'm getting the below: Address = 2001:4860:4860::8844 Starting to look like an issue with my Lua 5.3 running on ZeroBrane Studio. |
|
I am running it in a standard terminal on Manjaro Linux. You might try that just to confirm. |
|
Works just fine in Debian. So I'll merge this pull request first then check on the ZeroBrane issue. Address = 2001:4860:4860::8844 |
|
Thank you for the quick response! |
Resolves issue: #2