Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 address types are missing ULA #13

Closed
dkerr64 opened this issue Mar 27, 2017 · 7 comments
Closed

IPv6 address types are missing ULA #13

dkerr64 opened this issue Mar 27, 2017 · 7 comments

Comments

@dkerr64
Copy link

dkerr64 commented Mar 27, 2017

RFC 4193 specifies range of IPv6 for Unique Local Addressing unicast. Netcalc is not recognizing those, instead returning "Unassigned"

David

@troglobit
Copy link
Owner

That's unfortunate. Care to submit a small patch or pull request? :)

@dkerr64
Copy link
Author

dkerr64 commented Mar 27, 2017

I will try and find some time this evening.

David

@troglobit
Copy link
Owner

Got a bit curious myself. Would this work? 😵

diff --git a/misc.c b/misc.c
index 085069d..06533e6 100644
--- a/misc.c
+++ b/misc.c
@@ -1040,6 +1040,8 @@ void v6_type(struct v6addr *in6_addr)
                snprintf(buf, len, "Reserved");
        if ((a & 0xff00) == 0xff00)
                snprintf(buf, len, "Multicast Addresses");
+       if ((a & 0xfc00) == 0xfc00 && in6_addr->nmaskbits == 7)
+               snprintf(buf, len, "Unique Local Unicast");
        if ((a & 0xff80) == 0xfe80)
                snprintf(buf, len, "Link-Local Unicast Addresses");
        if ((a & 0xffc0) == 0xfec0)

@abelbeck
Copy link
Contributor

ULA's use /48 prefixes.

labeling any ((a & 0xfd00) == 0xfd00) should be enough, I think...

Ref: http://unique-local-ipv6.com

@dkerr64
Copy link
Author

dkerr64 commented Mar 27, 2017

I think it would be useful to have separate message for fc00 and fd00. Most (if not all for now) ULA's will be fdxx (signifying a "locally-assigned ULA") as a value of 0 in the least significant bit is reserved for future use. I would use the terms..
fd00... Locally-Assigned Unique Local Address
fc00... Unique Local Address
Who knows, at some point in the future the difference might be meaningful.

David

@troglobit
Copy link
Owner

Aha, I see. I was reading https://tools.ietf.org/html/rfc4193#section-8, so that's what confused me.

OK, I'll add two new types and reference this issue, if you can audit it later I'd be very grateful :)

@troglobit
Copy link
Owner

troglobit commented Mar 27, 2017

GitHub auto-closes issues with 'Fix #...'. If you find a problem with 694614e, just reopen this issue.

I'll hold off the v2.1 release another day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants