]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp: adjust type of elements in duid
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 7 Aug 2018 03:07:12 +0000 (12:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Aug 2018 01:15:00 +0000 (10:15 +0900)
These values should be stored in network byte order.

src/libsystemd-network/dhcp-identifier.h

index add546f31c1de7dc8d082fdc270f3a43f9283e4e..cebfa8f4a838fd19c3411550a0fd1af636a69a3d 100644 (file)
@@ -27,18 +27,18 @@ struct duid {
         union {
                 struct {
                         /* DUID_TYPE_LLT */
-                        uint16_t htype;
-                        uint32_t time;
+                        be16_t htype;
+                        be32_t time;
                         uint8_t haddr[0];
                 } _packed_ llt;
                 struct {
                         /* DUID_TYPE_EN */
-                        uint32_t pen;
+                        be32_t pen;
                         uint8_t id[8];
                 } _packed_ en;
                 struct {
                         /* DUID_TYPE_LL */
-                        int16_t htype;
+                        be16_t htype;
                         uint8_t haddr[0];
                 } _packed_ ll;
                 struct {