Commit 9b20657
lnpeer: on_ping: drain out-socket buffer
might help against some memory exhaustion attacks
f321x said:
> maybe a peer could just fill up our sockets outgoing buffer by ~234mb/h
> if they stop reading from their socket and keep sending pings every second.
Co-authored-by: f321x <f@f321x.com>1 parent 262c1eb commit 9b20657
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
| 390 | + | |
390 | 391 | | |
391 | 392 | | |
392 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
0 commit comments