odhcpd: use proper struct msghdr initializers to fix build error on musl
[project/odhcpd.git] / src / dhcpv6-ia.c
index b21b39e..d103ecb 100644 (file)
@@ -810,7 +810,8 @@ static size_t append_reply(uint8_t *buf, size_t buflen, uint16_t status,
                                        n.addr.s6_addr32[3] = htonl(a->assigned);
                                        size_t entrlen = sizeof(n) - 4;
 
-                                       if (!a->accept_reconf && iface->managed < RELAYD_MANAGED_NO_AFLAG)
+                                       if (!a->accept_reconf && iface->managed < RELAYD_MANAGED_NO_AFLAG &&
+                                                       addrs[i].prefix == 64)
                                                n.preferred = htonl(1);
 
 #ifdef DHCPV6_OPT_PREFIX_CLASS