]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: address label: use struct in6_addr instead
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 May 2021 04:05:31 +0000 (13:05 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 7 Jun 2021 21:33:27 +0000 (06:33 +0900)
Address label is for IPv6.

src/network/networkd-address-label.c
src/network/networkd-address-label.h

index c697a55fb27d996865b15c5faa420a8fd93ffb89..cf99473cf84adef3eb16350cfa38124adae45acc 100644 (file)
@@ -113,7 +113,7 @@ static int address_label_configure(AddressLabel *label, Link *link) {
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not append IFAL_LABEL attribute: %m");
 
-        r = sd_netlink_message_append_in6_addr(req, IFA_ADDRESS, &label->in_addr.in6);
+        r = sd_netlink_message_append_in6_addr(req, IFA_ADDRESS, &label->in_addr);
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not append IFA_ADDRESS attribute: %m");
 
@@ -197,7 +197,7 @@ int config_parse_address_label_prefix(const char *unit,
                 return 0;
         }
 
-        n->in_addr = a;
+        n->in_addr = a.in6;
         n->prefixlen = prefixlen;
 
         TAKE_PTR(n);
index 11fdd9abfe2ffab4aee57555ff4cd74d3acd0cbf..5a93de4dfc02151285c70718e86dbc4b762ae577 100644 (file)
@@ -16,7 +16,7 @@ typedef struct AddressLabel {
 
         unsigned char prefixlen;
         uint32_t label;
-        union in_addr_union in_addr;
+        struct in6_addr in_addr;
 } AddressLabel;
 
 AddressLabel *address_label_free(AddressLabel *label);