lnd/onionmessage
Gijs van Dam 261babcf09
onionmessage: drop onion messages cycling back to the sending peer
Block forwarding of an onion message when the resolved next hop is the
same peer that delivered it. Such a forward would immediately bounce the
message back over the very connection it arrived on, which is never
useful and can be abused to amplify traffic against a peer.

The check runs after the routing action is resolved, so both direct
next-node-ID and SCID-resolved paths are covered. A new
`ErrSamePeerCycle` is returned (and logged at warn level) when a cycle
is detected.
2026-04-17 12:33:08 +02:00
..
actor.go onionmessage: drop onion messages cycling back to the sending peer 2026-04-17 12:33:08 +02:00
actor_test.go onionmessage: drop onion messages cycling back to the sending peer 2026-04-17 12:33:08 +02:00
errors.go onionmessage: drop onion messages cycling back to the sending peer 2026-04-17 12:33:08 +02:00
hop.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
hop_test.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
interfaces.go multi: OnionPeerActor for per-peer message support 2026-03-02 15:46:21 +01:00
log.go multi: endpoints for onion messages 2025-11-12 22:54:04 +08:00
onion_endpoint.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
ratelimit.go onionmessage: add token-bucket rate limiter primitives 2026-04-15 13:23:50 -07:00
ratelimit_test.go onionmessage: add token-bucket rate limiter primitives 2026-04-15 13:23:50 -07:00
resolver.go onionmessage: add LRU cache to SCID resolver 2026-03-02 15:46:21 +01:00
resolver_test.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00
test_utils.go multi: actor-based onion message forwarding 2026-03-02 15:46:21 +01:00