From: Yu Watanabe Date: Sat, 13 Aug 2022 17:43:51 +0000 (+0900) Subject: dhcp6: do not append ORO option when no option requested X-Git-Tag: v252-rc1~443^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24299%2Fhead;p=thirdparty%2Fsystemd.git dhcp6: do not append ORO option when no option requested Fixes #24292. --- diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 0727050ed2d..26114900677 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -690,6 +690,9 @@ static int client_append_oro(sd_dhcp6_client *client, uint8_t **opt, size_t *opt req_opts = client->req_opts; } + if (n == 0) + return 0; + return dhcp6_option_append(opt, optlen, SD_DHCP6_OPTION_ORO, n * sizeof(be16_t), req_opts); }