Page MenuHomeFreeBSD

D61010.1793475054.diff
No OneTemporary

Authored By
Unknown
Size
597 B
Referenced Files
None
Subscribers
None

D61010.1793475054.diff

diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -799,7 +799,7 @@
#endif
if (V_ipport_randomized) {
- port = first + (arc4random() % (last - first));
+ port = first + arc4random_uniform(last - first + 1);
} else {
port = atomic_fetchadd_int(lastport, 1);
if (__predict_false(port < first || port > last)) {
@@ -808,7 +808,7 @@
}
}
- for (count = last - first; count > 0; count--) {
+ for (count = last - first + 1; count > 0; count--) {
struct inpcbinfo_ctx tmpctx = {
.pcbinfo = ipictx->pcbinfo
};

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 31, 7:30 PM (18 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41253740
Default Alt Text
D61010.1793475054.diff (597 B)

Event Timeline