diff options
author | Denys Vlasenko | 2017-06-27 18:31:08 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-06-27 18:31:08 +0200 |
commit | 470bebe672fa179c89c0b04ee252ca564e8ee4d5 (patch) | |
tree | 54158444e31a478ad052d3cb12377f8671a2d323 /networking | |
parent | f56ddf2e4ce42d7914d048f42fd952302027e8a3 (diff) | |
download | busybox-470bebe672fa179c89c0b04ee252ca564e8ee4d5.zip busybox-470bebe672fa179c89c0b04ee252ca564e8ee4d5.tar.gz |
udhcpc6: add comments about option 39, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/udhcp/d6_common.h | 36 | ||||
-rw-r--r-- | networking/udhcp/d6_dhcpc.c | 8 |
2 files changed, 42 insertions, 2 deletions
diff --git a/networking/udhcp/d6_common.h b/networking/udhcp/d6_common.h index ca57883..3105503 100644 --- a/networking/udhcp/d6_common.h +++ b/networking/udhcp/d6_common.h @@ -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 diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c index 08a26fb..ef9b9a5 100644 --- a/networking/udhcp/d6_dhcpc.c +++ b/networking/udhcp/d6_dhcpc.c @@ -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 ***/ |