upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/rpc.cpp
diff options
context:
space:
mode:
authorbitflash <admin@bitflash.network>2026-08-18 10:04:28 -0300
committerbitflash <admin@bitflash.network>2026-08-18 10:04:28 -0300
commitdb84acfc5f99ac1ddf4962879b4cbaf1af9952dd (patch)
treeca7e4c67216880361dfd484c27fbf7b8c9d2d269 /src/rpc.cpp
parenta6eb8dab830be3135c054ae3ae442886f1867b4e (diff)
net: cap inbound connections per address
A single IP could hold every inbound slot up to MAX_CONNECTIONS -- which is what a connection-exhaustion flood did to the rendezvous relays, one address parking hundreds of sockets and starving real peers. Add MAX_CONNECTIONS_PER_IP (32): the accept path counts existing connections from the same address and refuses a new one past the cap. The relays' firewall connlimit does the same a layer lower; this makes every build carry the defense, including future poll()-based relays with no FD ceiling.
Diffstat (limited to 'src/rpc.cpp')
0 files changed, 0 insertions, 0 deletions