summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tun.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2013-09-07 14:15:13 +0000
committermarkm <markm@FreeBSD.org>2013-09-07 14:15:13 +0000
commit42ac52f9511d3cdc3ff5b1f83dcf7c7332b8f348 (patch)
tree1be73fc39681022a74d47c894d7e3e2780ec021e /sys/net/if_tun.c
parent59c30969f90a33d9696fe5b69fe545018ad76caa (diff)
parentb41e1125b0d80cc6d7243ca4cb413371daa39c4e (diff)
downloadFreeBSD-src-42ac52f9511d3cdc3ff5b1f83dcf7c7332b8f348.zip
FreeBSD-src-42ac52f9511d3cdc3ff5b1f83dcf7c7332b8f348.tar.gz
Bring in some behind-the-scenes development, mainly By Arthur Mesh,
the rest by me. o Namespace cleanup; the Yarrow name is now restricted to where it really applies; this is in anticipation of being augmented or replaced by Fortuna in the future. Fortuna is mentioned, but behind #if logic, and is ignorable for now. o The harvest queue is pulled out into its own modules. o Entropy harvesting is emproved, both by being made more conservative, and by separating (a bit!) the sources. Available entropy crumbs are marginally improved. o Selection of sources is made clearer. With recent revelations, this will receive more work in the weeks and months to come. Submitted by: Arthur Mesh (partly) <arthurmesh@gmail.com>
Diffstat (limited to 'sys/net/if_tun.c')
-rw-r--r--sys/net/if_tun.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index fba423d..e67b213 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -920,9 +920,8 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag)
m_freem(m);
return (EAFNOSUPPORT);
}
- /* First chunk of an mbuf contains good junk */
if (harvest.point_to_point)
- random_harvest(m, 16, 3, 0, RANDOM_NET);
+ random_harvest(&(m->m_data), 12, 3, 0, RANDOM_NET_TUN);
ifp->if_ibytes += m->m_pkthdr.len;
ifp->if_ipackets++;
CURVNET_SET(ifp->if_vnet);
OpenPOWER on IntegriCloud