raybellis / draft-bellis-dnsop-xpf

DNS X-Proxied-For
0 stars 1 forks source link

clarify length checking #6

Closed Habbie closed 7 years ago

Habbie commented 7 years ago

3.2 says

If the length of the IP addresses contained in the RR are not consistent with that expected for the given IP version then the server MUST return a FORMERR response.

but we can't actually check that, we can only see if we 'run out of RDATA too soon' or 'have some RDATA left over', maybe we can word this better. Thanks @mind04

raybellis commented 7 years ago

I don't follow this - if the version says "4" then the total RDATA length MUST be 14 octets or if it's 6 then it MUST be 38 octets.

Habbie commented 7 years ago

Yes, that's basically the clarification this language could use. IP length is implied by RDATA length, it's not explicit.

raybellis commented 7 years ago

I think this is already covered by this text:

The length of the Source Address and Destination Address fields will be variable depending on the IP Version in use

albeit the last few words could be read ambiguously, so I've changed those to "IP Version used by the client".