Start listening range at 1024 instead of 1

Avoid privileged ports by default

Closes #651
This commit is contained in:
Dirk-Willem van Gulik
2024-02-18 15:14:53 +01:00
committed by Sean DuBois
parent 5fcf0380e7
commit 970978e8c7

2
net.go
View File

@@ -106,7 +106,7 @@ func listenUDPInPortRange(n transport.Net, log logging.LeveledLogger, portMax, p
var i, j int var i, j int
i = portMin i = portMin
if i == 0 { if i == 0 {
i = 1 i = 1024 // Start at 1024 which is non-privileged
} }
j = portMax j = portMax
if j == 0 { if j == 0 {