Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176842016
D61010.1793475054.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
597 B
Referenced Files
None
Subscribers
None
D61010.1793475054.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D61010: inpcb: treat the ephemeral port range as inclusive
Attached
Detach File
Event Timeline