udhcpc6: add comments about option 39, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-06-27 18:31:08 +02:00
parent f56ddf2e4c
commit 470bebe672
2 changed files with 42 additions and 2 deletions

View File

@ -87,6 +87,42 @@ struct d6_option {
#define D6_OPT_IA_PD 25
#define D6_OPT_IAPREFIX 26
/* RFC 4704 "The DHCPv6 Client FQDN Option"
* uint16 option-code OPTION_CLIENT_FQDN (39)
* uint16 option-len 1 + length of domain name
* uint8 flags
* char[] domain-name partial or fully qualified domain name
*
* Flags format is |MBZ|N|O|S|
* The "S" bit indicates whether the server SHOULD or SHOULD NOT perform
* the AAAA RR (FQDN-to-address) DNS updates. A client sets the bit to
* 0 to indicate that the server SHOULD NOT perform the updates and 1 to
* indicate that the server SHOULD perform the updates. The state of
* the bit in the reply from the server indicates the action to be taken
* by the server; if it is 1, the server has taken responsibility for
* AAAA RR updates for the FQDN.
* The "O" bit indicates whether the server has overridden the client's
* preference for the "S" bit. A client MUST set this bit to 0. A
* server MUST set this bit to 1 if the "S" bit in its reply to the
* client does not match the "S" bit received from the client.
* The "N" bit indicates whether the server SHOULD NOT perform any DNS
* updates. A client sets this bit to 0 to request that the server
* SHOULD perform updates (the PTR RR and possibly the AAAA RR based on
* the "S" bit) or to 1 to request that the server SHOULD NOT perform
* any DNS updates. A server sets the "N" bit to indicate whether the
* server SHALL (0) or SHALL NOT (1) perform DNS updates. If the "N"
* bit is 1, the "S" bit MUST be 0.
*
* If a client knows only part of its name, it MAY send a name that is not
* fully qualified, indicating that it knows part of the name but does not
* necessarily know the zone in which the name is to be embedded.
* To send a fully qualified domain name, the Domain Name field is set
* to the DNS-encoded domain name including the terminating zero-length
* label. To send a partial name, the Domain Name field is set to the
* DNS-encoded domain name without the terminating zero-length label.
* A client MAY also leave the Domain Name field empty if it desires the
* server to provide a name.
*/
#define D6_OPT_CLIENT_FQDN 39
#define D6_OPT_TZ_POSIX 41

View File

@ -98,8 +98,12 @@ static const char opt_req[] = {
static const char opt_fqdn_req[] = {
(D6_OPT_CLIENT_FQDN >> 8), (D6_OPT_CLIENT_FQDN & 0xff),
0, 2,
0, 0
0, 2, /* optlen */
0, /* flags: */
/* S=0: server SHOULD NOT perform AAAA RR updates */
/* O=0: client MUST set this bit to 0 */
/* N=0: server SHOULD perform updates (PTR RR only in our case, since S=0) */
0 /* empty DNS-encoded name */
};
/*** Utility functions ***/