diff options
author | Guy Harris <guy@alum.mit.edu> | 2020-05-06 22:31:19 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2020-05-06 22:31:19 -0700 |
commit | 858a202b939671ad315396b9f09a27a58cfb31ca (patch) | |
tree | 54ff6391f36f4b92ce04d53a09572b7d5e996f2c /pcap-linux.c | |
parent | 7763eb4c55ab257adde1064c4c5fc7dffd6604d5 (diff) |
linux: throw in a temporary hack to squelch MSAN warnings.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r-- | pcap-linux.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pcap-linux.c b/pcap-linux.c index 96d5a092..5c26d7a1 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -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; |