mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 10:54:47 +00:00
ospf6d: set cmsg size correctly
On both Linux and FreeBSD, msg_controllen should be set to CMSG_LEN, not CMSG_SPACE. This avoids sending 4 bytes of trailing garbage to the kernel. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
parent
7d4aa1d57d
commit
1579a67f13
@ -206,7 +206,7 @@ ospf6_sendmsg (struct in6_addr *src, struct in6_addr *dst,
|
||||
smsghdr.msg_name = (caddr_t) &dst_sin6;
|
||||
smsghdr.msg_namelen = sizeof (struct sockaddr_in6);
|
||||
smsghdr.msg_control = (caddr_t) cmsgbuf;
|
||||
smsghdr.msg_controllen = sizeof (cmsgbuf);
|
||||
smsghdr.msg_controllen = scmsgp->cmsg_len;
|
||||
|
||||
retval = sendmsg (ospf6_sock, &smsghdr, 0);
|
||||
if (retval != iov_totallen (message))
|
||||
|
Loading…
Reference in New Issue
Block a user