]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/libsystemd-network/dhcp6-option.c
Merge pull request #18777 from yuwata/network-set-ifname-to-engines
[thirdparty/systemd.git] / src / libsystemd-network / dhcp6-option.c
index daaa940f97f61b8f4e6db2840d2e2fd601366a21..ff51758e0bc05f51bbfdbf0b38044d97dd1a0ce4 100644 (file)
@@ -257,9 +257,9 @@ int dhcp6_option_append_pd(uint8_t **buf, size_t *buflen, const DHCP6IA *pd, con
                 len += r;
         }
 
-        if (hint_pd_prefix) {
+        if (hint_pd_prefix && hint_pd_prefix->iapdprefix.prefixlen > 0) {
                 r = option_append_pd_prefix(buf, buflen, hint_pd_prefix);
-                if (r < 0 && r != -EINVAL)
+                if (r < 0)
                         return r;
 
                 len += r;