File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
iroh/src/magicsock/transports Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,19 @@ impl RelayTransport {
100
100
}
101
101
} ;
102
102
103
+ if buf_out. len ( ) < dm. datagrams . contents . len ( ) {
104
+ // Our receive buffer isn't big enough to process this datagram.
105
+ // Continuing would cause a panic.
106
+ break ;
107
+ // In theory we could put some logic in here to fragment the datagram in case
108
+ // we still have enough room in our `buf_out` left to fit a couple of
109
+ // `dm.datagrams.segment_size`es, but we *should* have cut those datagrams
110
+ // to appropriate sizes earlier in the pipeline (just before we put them
111
+ // into the `relay_datagram_recv_queue` in the `ActiveRelayActor`).
112
+ // So the only case in which this happens is we receive a datagram via the relay
113
+ // that's essentially bigger than our configured `max_udp_payload_size`.
114
+ // In that case we drop it and let MTU discovery take over.
115
+ }
103
116
buf_out[ ..dm. datagrams . contents . len ( ) ] . copy_from_slice ( & dm. datagrams . contents ) ;
104
117
meta_out. len = dm. datagrams . contents . len ( ) ;
105
118
meta_out. stride = dm
You can’t perform that action at this time.
0 commit comments