Skip to content

For localhost connections set the mtu to the localhost interface mtu - #3500

Closed
Wunka wants to merge 3 commits into
PixelGuys:masterfrom
Wunka:localHostMTU
Closed

For localhost connections set the mtu to the localhost interface mtu#3500
Wunka wants to merge 3 commits into
PixelGuys:masterfrom
Wunka:localHostMTU

Conversation

@Wunka

@Wunka Wunka commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This should also work on mac. (I don't know why SIOCGIFMTU is in std.os.linux but it should work on mac)

This was made after I saw that I can see the mtu of the interface while working on #3491.
I can work on a windows implementation after this.

@Wunka Wunka moved this to Easy to Review in PRs to review Aug 8, 2026
@IntegratedQuantum

Copy link
Copy Markdown
Member

In my opinion we shouldn't treat localhost too different. If localhost uses a different way of discovering MTUs then it is less likely that we find issues in the MTU discovery algorithm (e.g. automated tests, once we have some would require special setup to cover the real MTU discovery algorithm).
Also at the end of the day localhost is also the one place where network bandwidth is not an issue anyways, so it makes no sense to have extra code for it being a bit more efficient than dynamic MTU discovery.

@Wunka

Wunka commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Okay that is understandable. When I started this code, my actual goal was to get a better max mtu value (which would have been the mtu of the interface) but it seems this is not really possible that's why this pr only did this at the end.

@Wunka Wunka closed this Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants