Commit 262c1eb
committed
lnpeer: add some rate-limiting against ping flood
A remote peer could send us lots of small ping messages, requesting large pong responses. This is cheap for them but potentially expensive for us.
Does not seem too serious, but I think we could add some rate-limiting.
note: There are many ways for a remote peer to inflate our incoming traffic usage,
but the cost of that is usually shared between them and us (they need to send the data, we receive it).1 parent fd070a9 commit 262c1eb
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
372 | 373 | | |
373 | 374 | | |
374 | 375 | | |
375 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
376 | 388 | | |
377 | 389 | | |
378 | 390 | | |
| |||
0 commit comments