dhcpd 4.2.3-P2: DHCPv6 LQ replies don't contain delegated prefixes

Eric Rubin-Smith eas.bts at gmail.com
Fri Feb 17 00:33:50 UTC 2012


I'm using dhcpd 4.2.3-P2.

>From RFC5007 section 4.1.2.2:

   The encapsulated client-options include the OPTION_CLIENTID,
   OPTION_IAADDR, OPTION_IAPREFIX, and OPTION_CLT_TIME options and other
   options specific to the client and requested by the requestor in the
   OPTION_ORO in the OPTION_LQ_QUERY's query-options.  ***The server MUST
   return all of the client's statefully assigned addresses and
   delegated prefixes, with a non-zero valid lifetime, on the link.***

(emphasis mine).

However, my testing and read of the code indicate that under no
circumstances will this version of dhcpd return delegated prefixes in
a DHCPv6 LEASEQUERY-REPLY.

I.e. dhcpd does not conform to the RFC in this regard.

Now, from section 4.1.2.1,

   QUERY_BY_ADDRESS (1) -  The query-options MUST contain an
      OPTION_IAADDR option [2].  The link-address field, if not 0::0,
      specifies an address for the link on which the client is located
      if the address in the OPTION_IAADDR option is of insufficient
      scope.  Only the information for the client that has a lease for
      the specified address or was delegated a prefix that contains the
      specified address is returned (if available).

A plain reading of this section is that if I run a LQ on an address
that is within a delegated prefix, then the server should find that
prefix (and, as above, return information for all addresses leased to
the same client).

However, again by my testing and read of the code, dhcpd does not
consider delegated prefixes when it looks up by address.  It only
considers ia-na addresses.  So again the server is nonconformant.

Finally, dhcpd doesn't support lookup by client ID at all -- only
lookup by address.  However, since it returns an UnknownQueryType
status code in response to lookups by client ID, it technically
conforms to the RFC in this case (though obviously it would be nicer
to actually provide the lookup service).

Do I have all that right?

If so, is it in the road map to fix those bugs and add support for
lookup by client ID?

Thanks,
Eric


More information about the dhcp-users mailing list