summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_ethersubr.c4
-rw-r--r--sys/net/intrq.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 94e0541..57baa21 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
+#include <sys/random.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
@@ -474,6 +475,9 @@ recvLocal:
#endif
/* Continue with upper layer processing */
ether_demux(ifp, eh, m);
+ /* First chunk of an mbuf contains good junk */
+ if (harvest.ethernet)
+ random_harvest(m, 16, 3, 0, RANDOM_NET);
}
/*
diff --git a/sys/net/intrq.c b/sys/net/intrq.c
index d05176c..89f9159 100644
--- a/sys/net/intrq.c
+++ b/sys/net/intrq.c
@@ -28,6 +28,7 @@
#include <sys/param.h>
#include <sys/mbuf.h>
+#include <sys/random.h>
#include <sys/socket.h>
#include <sys/systm.h>
#include <sys/time.h>
@@ -90,6 +91,9 @@ family_enqueue(family, m)
if (! IF_HANDOFF(queue[entry].q, m, NULL))
return ENOBUFS;
schednetisr(queue[entry].isr);
+ /* First chunk of an mbuf contains good junk */
+ if (harvest.point_to_point)
+ random_harvest(m, 16, 3, 0, RANDOM_NET);
return 0;
} else
break;
OpenPOWER on IntegriCloud