Date: Sat, 2 Nov 2013 15:13:02 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257548 - in head/sys: net netgraph Message-ID: <201311021513.rA2FD2OZ024364@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Nov 2 15:13:02 2013 New Revision: 257548 URL: http://svnweb.freebsd.org/changeset/base/257548 Log: Restore the entropy gathering from the m_data pointer value, not the m_data payload. After talking with markm/bde, this is what markm actually intended. Modified: head/sys/net/if_ethersubr.c head/sys/net/if_tun.c head/sys/netgraph/ng_iface.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sat Nov 2 14:20:29 2013 (r257547) +++ head/sys/net/if_ethersubr.c Sat Nov 2 15:13:02 2013 (r257548) @@ -642,7 +642,7 @@ ether_input_internal(struct ifnet *ifp, } if (harvest.ethernet) - random_harvest(mtod(m, const void *), 12, 2, RANDOM_NET_ETHER); + random_harvest(&(m->m_data), 12, 2, RANDOM_NET_ETHER); ether_demux(ifp, m); CURVNET_RESTORE(); Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Sat Nov 2 14:20:29 2013 (r257547) +++ head/sys/net/if_tun.c Sat Nov 2 15:13:02 2013 (r257548) @@ -919,7 +919,7 @@ tunwrite(struct cdev *dev, struct uio *u return (EAFNOSUPPORT); } if (harvest.point_to_point) - random_harvest(mtod(m, const void *), 12, 2, RANDOM_NET_TUN); + random_harvest(&(m->m_data), 12, 2, RANDOM_NET_TUN); ifp->if_ibytes += m->m_pkthdr.len; ifp->if_ipackets++; CURVNET_SET(ifp->if_vnet); Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Sat Nov 2 14:20:29 2013 (r257547) +++ head/sys/netgraph/ng_iface.c Sat Nov 2 15:13:02 2013 (r257548) @@ -776,7 +776,7 @@ ng_iface_rcvdata(hook_p hook, item_p ite return (EAFNOSUPPORT); } if (harvest.point_to_point) - random_harvest(mtod(m, const void *), 12, 2, RANDOM_NET_NG); + random_harvest(&(m->m_data), 12, 2, RANDOM_NET_NG); M_SETFIB(m, ifp->if_fib); netisr_dispatch(isr, m); return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311021513.rA2FD2OZ024364>