shithub: riscv

Download patch

ref: 314faec39447f98c0dfd96a91dbd25fd757d106d
parent: e4509d40cc9759baddf1c2571247b95d2f5b61a5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Apr 21 09:08:19 EDT 2024

rudp: fix start generation randomization and cleanup

the start generation was allocated by calling rand(),
which gives a value between 0 and 2^15.

Instead, make a newgen() function that returns a new
generation id in the full 32-bit range, but also
avoids 0 and Hangupgen special values.

Cleanup and make all helper functions static.