You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #140 and adding a test that converts the valid ipv4 addresses to reverse arpa format and back and checks whether they match, I also tried adding the same kind of test for IPv6.
I'm not 100% sure about the reason reverseForm will cut the address shorter in those cases, I haven't found anything about that in the respective RFCs, if you could point me to somewhere where this is used I'd be interested.
Just changing the default behaviour probably isn't possible though, since someone might rely on this behaviour.
One possibility I see is adding another option to ReverseFormOptions to set whether the netmask should be considered when generating the reverse form or the full lenth reverse form should always be generated.
The text was updated successfully, but these errors were encountered:
While working on #140 and adding a test that converts the valid ipv4 addresses to reverse arpa format and back and checks whether they match, I also tried adding the same kind of test for IPv6.
That test however failed, because
reverseForm
will cut some nibbles off based on the netmask.Then, trying to convert back to an address will fail because
fromArpa
only accepts full-length reverse addresses.I'm not 100% sure about the reason
reverseForm
will cut the address shorter in those cases, I haven't found anything about that in the respective RFCs, if you could point me to somewhere where this is used I'd be interested.Just changing the default behaviour probably isn't possible though, since someone might rely on this behaviour.
One possibility I see is adding another option to
ReverseFormOptions
to set whether the netmask should be considered when generating the reverse form or the full lenth reverse form should always be generated.The text was updated successfully, but these errors were encountered: