diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-02 21:38:19 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-02 21:38:19 +0000 |
commit | dab86171f41996643a0e3c5f00b2b4e03e7de179 (patch) | |
tree | ba9c35d97dd469259dc688b985308d4d5859fb17 /sys/netinet/ip_id.c | |
parent | 651ffa5adcb99a62ece90b467f06f8a9a55ca894 (diff) |
because arc4random_uniform is being used, the modulo bias is taken care of
Diffstat (limited to 'sys/netinet/ip_id.c')
-rw-r--r-- | sys/netinet/ip_id.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netinet/ip_id.c b/sys/netinet/ip_id.c index b75d79940b7..07834dfcd25 100644 --- a/sys/netinet/ip_id.c +++ b/sys/netinet/ip_id.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_id.c,v 1.17 2008/03/02 21:29:07 djm Exp $ */ +/* $OpenBSD: ip_id.c,v 1.18 2008/03/02 21:38:18 deraadt Exp $ */ /* * Copyright (c) 2008 Theo de Raadt, Ryan McBride @@ -58,7 +58,6 @@ ip_randomid(void) for (i = 0; i < sizeof(ip_shuffle)/sizeof(ip_shuffle[0]); ++i) ip_shuffle[i] = i; for (i = sizeof(ip_shuffle)/sizeof(ip_shuffle[0]); --i; ) { - /* disregard the modulo bias because it is small */ i2 = arc4random_uniform(i + 1); r = ip_shuffle[i]; ip_shuffle[i] = ip_shuffle[i2]; |