On 2019-03-12 08:49:28 -0400, Bill Cole wrote:
> "0" is not an octet pair. Demo:
> 
> # cat accessdemo
> 2a04:5200:fff4:0      REJECT 554 trailing zero
> 2a04:5200:fff4:0000   REJECT 554 trailing octet pair zeros
> 2a04:5200:fff4        REJECT 554 NO trailing zero
> 
> # postmap hash:accessdemo
> 
> # postmap -q 2a04:5200:fff4:0000:0001:0000:0000:0001 accessdemo
> 
> # postmap -q 2a04:5200:fff4:0000:0001:0000:0000 accessdemo
> 
> # postmap -q 2a04:5200:fff4:0000:0001:0000 accessdemo
> 
> # postmap -q 2a04:5200:fff4:0000:0001 accessdemo
> 
> # postmap -q 2a04:5200:fff4:0000 accessdemo
> REJECT 554 trailing octet pair zeros
> 
> # postmap -q 2a04:5200:fff4 accessdemo
> REJECT 554 NO trailing zero

OK, so you mean that "0" must be written as "0000"?

Then why does the access(5) man page say "The access map lookup key
must be in canonical form" while "0000" is not the canonical form?

According to https://tools.ietf.org/html/rfc5952

------------------------------------------------------------------------
4.1.  Handling Leading Zeros in a 16-Bit Field

   Leading zeros MUST be suppressed.  For example, 2001:0db8::0001 is
   not acceptable and must be represented as 2001:db8::1.  A single 16-
   bit 0000 field MUST be represented as 0.
------------------------------------------------------------------------

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to