]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: add new DHCPv6 message types and options
authorssoss <skyler.soss@gmail.com>
Wed, 30 Jul 2025 15:42:45 +0000 (10:42 -0500)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 30 Jul 2025 20:41:53 +0000 (05:41 +0900)
Gives enum definitions for the DHCPv6 options from RFC9527 and RFC 9686
and the new message types defined in RFC 9686.

src/libsystemd-network/dhcp6-option.c
src/libsystemd-network/dhcp6-protocol.h
src/systemd/sd-dhcp6-protocol.h

index 1de4bacd1b434169ccbe59161879bcf61844c4ed..4eef68fa3b312f0d19cb4e091c8b3f6629b9dc67 100644 (file)
@@ -210,6 +210,10 @@ bool dhcp6_option_can_request(uint16_t option) {
         case SD_DHCP6_OPTION_V6_DOTS_ADDRESS:
         case SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF:
         case SD_DHCP6_OPTION_V6_DNR:
+        case SD_DHCP6_OPTION_REGISTERED_DOMAIN:
+        case SD_DHCP6_OPTION_FORWARD_DIST_MANAGER:
+        case SD_DHCP6_OPTION_REVERSE_DIST_MANAGER:
+        case SD_DHCP6_OPTION_ADDR_REG_ENABLE:
                 return true;
         default:
                 return false;
index 75608348cdd1276fb1213b396444aff17f2ef8a9..794b003248488d32585aae3d275131c0ed160e44 100644 (file)
@@ -98,6 +98,8 @@ typedef enum DHCP6MessageType {
         DHCP6_MESSAGE_DISCONNECT                = 33, /* RFC 8156 */
         DHCP6_MESSAGE_STATE                     = 34, /* RFC 8156 */
         DHCP6_MESSAGE_CONTACT                   = 35, /* RFC 8156 */
+        DHCP6_MESSAGE_ADDR_REG_INFORM           = 36, /* RFC 9686 */
+        DHCP6_MESSAGE_ADDR_REG_REPLY            = 37, /* RFC 9686 */
         _DHCP6_MESSAGE_TYPE_MAX,
         _DHCP6_MESSAGE_TYPE_INVALID             = -EINVAL,
 } DHCP6MessageType;
index b1d9ca1ffab8be16a3f847d96cf13cd6312f1abf..6c1cf5367952279d8eb518e922f69b31b4b6cd38 100644 (file)
@@ -165,9 +165,13 @@ enum {
         SD_DHCP6_OPTION_SLAP_QUAD                  = 140, /* RFC 8948 */
         SD_DHCP6_OPTION_V6_DOTS_RI                 = 141, /* RFC 8973 */
         SD_DHCP6_OPTION_V6_DOTS_ADDRESS            = 142, /* RFC 8973 */
-        SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF         = 143,  /* RFC 6153 */
-        SD_DHCP6_OPTION_V6_DNR                     = 144  /* RFC 9463 */
-        /* option codes 145-65535 are unassigned */
+        SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF         = 143, /* RFC 6153 */
+        SD_DHCP6_OPTION_V6_DNR                     = 144, /* RFC 9463 */
+        SD_DHCP6_OPTION_REGISTERED_DOMAIN          = 145, /* RFC 9527 */
+        SD_DHCP6_OPTION_FORWARD_DIST_MANAGER       = 146, /* RFC 9527 */
+        SD_DHCP6_OPTION_REVERSE_DIST_MANAGER       = 147, /* RFC 9527 */
+        SD_DHCP6_OPTION_ADDR_REG_ENABLE            = 148  /* RFC 9686 */
+        /* option codes 149-65535 are unassigned */
 };
 
 _SD_END_DECLARATIONS;