systemd/0032-sd-radv-Allocate-space-also-for-DNSSL-iov-option-714.patch

30 lines
1.2 KiB
Diff
Raw Normal View History

From ffee10553f786e69787f9813dae5b0395040b443 Mon Sep 17 00:00:00 2001
From: Patrik Flykt <patrik.flykt@linux.intel.com>
Date: Fri, 20 Oct 2017 11:59:15 +0300
Subject: [PATCH] sd-radv: Allocate space also for DNSSL iov option (#7144)
The iov array needs to hold five entries in addition to the number
of prefixes.
(cherry picked from commit 6852c0f6b0f7a4ac666e1d174f366d003d31edb3)
---
src/libsystemd-network/sd-radv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c
index a3aa5c9c62..e4d12977cd 100644
--- a/src/libsystemd-network/sd-radv.c
+++ b/src/libsystemd-network/sd-radv.c
@@ -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),