Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration parser: ensure tun_mtu is greater than the crypto overhead #51

Open
hannesm opened this issue Apr 5, 2020 · 0 comments
Open

Comments

@hannesm
Copy link
Contributor

hannesm commented Apr 5, 2020

at the moment, State.mtu : Conf_map.t -> bool -> int computes the amount of data bytes a tunnel can carry (by taking Tun_mtu and subtracting the overhead imposed by (a) hmac (b) iv (c) header (d) padding). This function asserts if the remainder is <= 0. Instead, we should be able to compute the overhead and check the configuration (and PUSH_REPLY) that the Tun_mtu is always greater -- it needs to be more than 20 bytes (for the IPv4 header) as well, and likely does not make sense to be < 28. Maybe a more reasonable minimum is 576, to-be-re-read in RFCs (or https://en.wikipedia.org/wiki/Maximum_transmission_unit) -- original comment #37 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant