OpenBSD CVS

CVS log for src/sys/netinet/ip_id.c


[BACK] Up to [local] / src / sys / netinet

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Wed Mar 10 10:21:48 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

spelling

ok gnezdo@ semarie@ mpi@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Nov 18 02:37:31 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

move arc4random prototype to systm.h. more appropriate for most code
to include that than rdnvar.h. ok deraadt dlg

Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 31 10:36:42 2011 UTC (13 years, 2 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

- use nitems(); no binary change

ok claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jun 9 07:07:17 2008 UTC (16 years ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

rename arc4random_bytes => arc4random_buf to match libc's nicer name;
ok deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Sat Mar 15 04:55:25 2008 UTC (16 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

revert - I'm a dumbfuck who doesn't know his own API

Revision 1.20 / (download) - annotate - [select for diffs], Sat Mar 15 04:52:23 2008 UTC (16 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

off by one at end of array

Revision 1.19 / (download) - annotate - [select for diffs], Sat Mar 15 04:36:31 2008 UTC (16 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.18: +10 -9 lines
Diff to previous 1.18 (colored)

Because the ip_id code initialisation is a specific case of shuffling
a set of incrementing integers (and not an arbitrary set of values) it
is possible to populate the array as we shuffle it in a single forward
pass. Clever optimisation from didickman AT gmail.com;
ok deraadt@ mcbride@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Mar 2 21:38:18 2008 UTC (16 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

because arc4random_uniform is being used, the modulo bias is taken care of

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 2 21:29:07 2008 UTC (16 years, 3 months ago) by djm
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Add a arc4random_uniform() that returns a uniformly distributed number
in the range 0 <= x < upper_bound

Please use this new API instead of "arc4random() % upper_bound", as it
avoids the "modulo bias" that favours small results when upper_bound is
not a power of two.

feedback deraadt@ mcbride@; ok deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Feb 29 03:37:26 2008 UTC (16 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +59 -167 lines
Diff to previous 1.15 (colored)

replacement algorithm.  initialize a 64K-short buffer using Durstenfeld
shuffle. Upon allocation, swap-permute the new value to a random slot in
the 0..32K-1 th entry of the buffer as we move forward, ensuring randomness
but also satisfying the non-repeating property we need.  Also avoid the value
of 0, since IP ID's of 0 are special.  Inspired by Dillon's implementation.
We believe this is easier to read though, initializes with less bias, handles
the ID of 0 properly, and wins speed tests.
Thanks a lot to mcbride and djm for doing a bunch of statistical and speed
analysis, and comments from nordin
ok mcbride djm

Revision 1.15 / (download) - annotate - [select for diffs], Mon Nov 26 09:28:33 2007 UTC (16 years, 6 months ago) by martynas
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

typos;  ok jmc@
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@
sys/dev/pci/bktr/* ok jakemsr@

Revision 1.14 / (download) - annotate - [select for diffs], Sun May 27 19:59:11 2007 UTC (17 years ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

remove more static to avoid confusing the profiler (and maybe ddb too)

prodded by art@ ja ja claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jun 21 23:50:37 2004 UTC (19 years, 11 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.

ok art@ niklas@ nordin@

Revision 1.2.4.4 / (download) - annotate - [select for diffs], Sat Jun 5 23:11:25 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.2.4.3: +1 -1 lines
Diff to previous 1.2.4.3 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Merge with the trunk

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 22 04:37:20 2004 UTC (20 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

spelling; jjy2+@pitt.edu

Revision 1.2.4.3 / (download) - annotate - [select for diffs], Thu Feb 19 10:57:24 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.2.4.2: +7 -8 lines
Diff to previous 1.2.4.2 (colored) to branchpoint 1.2 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 12 06:57:12 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.10: +1 -6 lines
Diff to previous 1.10 (colored)

niels kindly dropped clause 3/4 from the license.  tnx!

Revision 1.10 / (download) - annotate - [select for diffs], Fri Dec 12 02:50:44 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

previous commit included bad hunk.  sorry

Revision 1.9 / (download) - annotate - [select for diffs], Fri Dec 12 02:03:27 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.8: +3 -4 lines
Diff to previous 1.8 (colored)

no need to call arc4random() if we don't skip numbers in ip_randomid().
from markus

Revision 1.8 / (download) - annotate - [select for diffs], Wed Dec 10 07:21:00 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.7: +6 -2 lines
Diff to previous 1.7 (colored)

correct non-repetitive ID code, based on comments from niels provos.
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x".
- skipping number is not needed, so disable it for 16bit generator (makes
  the repetition period to 30000)

Revision 1.7 / (download) - annotate - [select for diffs], Sun Sep 21 04:06:39 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored)

"exp" is a reserved symbol under gcc3/posix.  mcbride ok

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:31:36 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.4: +4 -10 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Sync UBC branch to -current

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Thu Mar 28 14:56:45 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.2.4.1: +4 -10 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored)

Merge in -current from roughly a week ago

Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 15 18:19:52 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.5: +1 -7 lines
Diff to previous 1.5 (colored)

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:11 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

First round of __P removal in sys

Revision 1.2.4.1 / (download) - annotate - [select for diffs], Wed Jul 4 10:54:48 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.2: +29 -35 lines
Diff to previous 1.2 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 8 03:53:46 2001 UTC (23 years ago) by angelos
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.3: +1 -2 lines
Diff to previous 1.3 (colored)

Cut down on include files.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 4 19:57:22 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.2: +29 -34 lines
Diff to previous 1.2 (colored)

use faster arc4random() for small amounts fo data, some spaces; niels ok

Revision 1.2 / (download) - annotate - [select for diffs], Thu Aug 26 13:37:01 1999 UTC (24 years, 9 months ago) by provos
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.1: +5 -3 lines
Diff to previous 1.1 (colored)

add an inner xor to make prediction attacks against the ids harder, due
to an attack pointed out by David Wagner.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Dec 26 12:35:12 1998 UTC (25 years, 5 months ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5

make ip_id random but ensure that ids dont repeat for some period.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.