You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if you end up here because valgrind told you were are doing something wrong
// with msgh->msg_controllen, please refer to https://github.com/PowerDNS/pdns/pull/3962
// first.
void addCMsgSrcAddr(struct msghdr* msgh, void* cmsgbuf, const ComboAddress* source, int itfIndex)
But note that this valgrind report is about msg_control and not msg_controllen
The text was updated successfully, but these errors were encountered:
Apart form the alignment thing below the code looks ok.
So the reason why valgrind complains could be msg_controllen is set to CMSG_SPACE(size), but only size is filled in addCMsgSrcAddr. So alignment bytes are left uninitialized. It's debatable if valgrind should complain about that.
That said, I do noticed that the buffer is not aligned explicitly. At least OpenBSD recommends that. A PR will be upcoming.
Short description
As reported by valgrind
But do consider:
But note that this valgrind report is about
msg_control
and notmsg_controllen
The text was updated successfully, but these errors were encountered: