svn commit: r334239 - head/sys/dev/hyperv/netvsc
Eric van Gyzen
vangyzen at FreeBSD.org
Sat May 26 14:14:57 UTC 2018
Author: vangyzen
Date: Sat May 26 14:14:56 2018
New Revision: 334239
URL: https://svnweb.freebsd.org/changeset/base/334239
Log:
if_hn: fix use of uninitialized variable
omcast was used without being initialized in the non-multicast case.
The only effect was that the interface's multicast output counter could be
incorrect.
Reported by: Coverity
CID: 1379662
MFC after: 3 days
Sponsored by: Dell EMC
Modified:
head/sys/dev/hyperv/netvsc/if_hn.c
Modified: head/sys/dev/hyperv/netvsc/if_hn.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/if_hn.c Sat May 26 14:01:44 2018 (r334238)
+++ head/sys/dev/hyperv/netvsc/if_hn.c Sat May 26 14:14:56 2018 (r334239)
@@ -5939,8 +5939,7 @@ hn_transmit(struct ifnet *ifp, struct mbuf *m)
int obytes, omcast;
obytes = m->m_pkthdr.len;
- if (m->m_flags & M_MCAST)
- omcast = 1;
+ omcast = (m->m_flags & M_MCAST) != 0;
if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) {
if (bpf_peers_present(ifp->if_bpf)) {
More information about the svn-src-all
mailing list