]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-radv: Allocate space also for DNSSL iov option (#7144)
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 20 Oct 2017 08:59:15 +0000 (11:59 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Oct 2017 08:59:15 +0000 (10:59 +0200)
The iov array needs to hold five entries in addition to the number
of prefixes.

src/libsystemd-network/sd-radv.c

index a3aa5c9c628782432764dc5fecdc76b3bd9f5cb0..e4d12977cd94ee4b1189098e4a6aacfdc608be7f 100644 (file)
@@ -160,8 +160,9 @@ static int radv_send(sd_radv *ra, const struct in6_addr *dst,
                 .nd_opt_mtu_type = ND_OPT_MTU,
                 .nd_opt_mtu_len = 1,
         };
-        /* Reserve iov space for RA header, linkaddr, MTU, N prefixes, RDNSS */
-        struct iovec iov[4 + ra->n_prefixes];
+        /* Reserve iov space for RA header, linkaddr, MTU, N prefixes, RDNSS
+           and DNSSL */
+        struct iovec iov[5 + ra->n_prefixes];
         struct msghdr msg = {
                 .msg_name = &dst_addr,
                 .msg_namelen = sizeof(dst_addr),