Commit 33eb6e4
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 7625efb commit 33eb6e4
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | | - | |
| 388 | + | |
| 389 | + | |
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| |||
| 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