]> The Tcpdump Group git mirrors - libpcap/commitdiff
linux: throw in a temporary hack to squelch MSAN warnings.
authorGuy Harris <[email protected]>
Thu, 7 May 2020 05:31:19 +0000 (22:31 -0700)
committerGuy Harris <[email protected]>
Thu, 7 May 2020 05:31:19 +0000 (22:31 -0700)
pcap-linux.c

index 96d5a092dd7149a9b9770c2fe9faba37dfb3277a..5c26d7a1b08a714763dca8d536431c09908fbf2b 100644 (file)
@@ -1811,6 +1811,17 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf)
        memset(&ifr, 0, sizeof(ifr));
        pcap_strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
        info.cmd = ETHTOOL_GLINK;
+       /*
+        * XXX - while Valgrind handles SIOCETHTOOL and knows that
+        * the ETHTOOL_GLINK command sets the .data member of the
+        * structure, Memory Sanitizer doesn't yet do so:
+        *
+        *    https://bugs.llvm.org/show_bug.cgi?id=45814
+        *
+        * For now, we zero it out to squelch warnings; if the bug
+        * in question is fixed, we can remove this.
+        */
+       info.data = 0;
        ifr.ifr_data = (caddr_t)&info;
        if (ioctl(sock, SIOCETHTOOL, &ifr) == -1) {
                int save_errno = errno;