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.
This commit is contained in:
Patrik Flykt 2017-10-20 11:59:15 +03:00 committed by Zbigniew Jędrzejewski-Szmek
parent dd202fa492
commit 6852c0f6b0
1 changed files with 3 additions and 2 deletions

View 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),