summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManfred Spraul <manfred@colorfullife.com>2004-10-05 00:23:17 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-10-05 00:23:17 -0700
commit34b0db5bd992d35c5a6f11172af4d86ea40d9948 (patch)
tree368351adf6b9f59aa035592026d2e2faf4673038 /include
parentba87371d8b557699a4a21ba8f059668769f648a3 (diff)
[NET]: Fix secure tcp sequence number generation
Ted's recent random.c update broke the periodic rekeying: schedule_work() doesn't provide synchronization. Additionally the first syn values after boot are generated with secret 0 - not good. Attached is a big cleanup. Linus asked me to send to to you for merging: The tcp sequence number generator needs a random seed that is reset every few minutes. Since the sequence numbers should be constantly increasing, for each rekey 2^24 is added to the sequence number. The actual use of the sequence number generator is lockless, synchronization is achieved by having two copies of the control structure. The attached patch: - fixes a race in rekey_seq_generator(): schedule_work doesn't provide synchronization. - Uses schedule_delayed_work() for the rekey: simplifies synchronization and speeds up the hot path. - Adds a late_initcall for the first initialization after boot. init_call would be too early, I've checked that the late_initcall runs before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration. Signed-Off-By: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions