Valgrind is nagging us, saying we pass uninitialized data through a setsockopt() call. This patch fixes the issue by clearing the entire passed structure.
Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- raw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/raw.c b/raw.c index 8b7bcf1..d9a3468 100644 --- a/raw.c +++ b/raw.c @@ -103,6 +103,7 @@ static int raw_configure(int fd, int event, int index, option = enable ? PACKET_ADD_MEMBERSHIP : PACKET_DROP_MEMBERSHIP; + memset(&mreq, 0, sizeof(mreq)); mreq.mr_ifindex = index; mreq.mr_type = PACKET_MR_MULTICAST; mreq.mr_alen = MAC_LEN; -- 2.11.0 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel