warn on uselessly low MTU - #1797
Conversation
| } | ||
|
|
||
| func localAddrs(l *slog.Logger, allowList *LocalAllowList) []localAddr { | ||
| //FIXME: This function is pretty garbage |
|
|
||
| const ( | ||
| // Both AES-256-GCM and ChaCha20-Poly1305 append a 16 byte AEAD tag | ||
| cipherTagLen = 16 |
There was a problem hiding this comment.
We should get this from the current cipher, will be slightly annoying to thread it through though. Keeps us from the future footgun.
|
|
||
| // checkLocalLinkMTU classifies e's link MTU, logs when the classification | ||
| // changes, and reports whether e should be advertised to lighthouses. | ||
| func (lh *LightHouse) checkLocalLinkMTU(e localAddr) bool { |
There was a problem hiding this comment.
Feels like all of this can move to its own package and relieve lighthouse.go of carrying it along.
There was a problem hiding this comment.
where do you wanna draw the line? I agree but its super blurry
There was a problem hiding this comment.
The stateless stuff. Feels like header should have the bits that matter for the header + relay, cipher config has the tag len (using a const there is future pain if we can avoid it now), the bits with state should stay in lighthouse.go, the rest can live somewhere else.
Like the stuff in hostmap.go, no reason for it, just never moved it anywhere else.
No description provided.