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

adds mtu and table to the config #3

Merged
merged 17 commits into from
Dec 16, 2021
Merged

Conversation

marneu
Copy link
Contributor

@marneu marneu commented Dec 10, 2021

There is a inoffial description for "Table" and "MTU" on https://github.com/pirate/wireguard-docs#Table.
Normal Linux kernels support slots between 0 and 255 (http://linux-ip.net/html/routing-tables.html#idm140337857356016). The code within this request will limit "Table" to a value within ranges of 1 to 252,256-(2^31-1) (253-255 do not need an explicit "Table" definition). This is helpful in policy-based routing scenarios. Table can be set to auto (default) or off if the route shall not be created.
The max MTU value could be a constant, as Ethernet II networks have a standard frame size of 1518 bytes. After looking at the WG source there are some suggestions when issuing help(Peer)
If DNS is not set (in plain routed environment) the parameter shall not show up in the config.

Copy link
Contributor

@jnhmcknight jnhmcknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition. Once the table validation issue has been resolved, we can merge this. Thanks, @marneu!

wireguard/peer.py Outdated Show resolved Hide resolved
wireguard/config.py Show resolved Hide resolved
README.rst Show resolved Hide resolved
@marneu marneu requested a review from jnhmcknight December 16, 2021 18:38
Copy link
Contributor

@jnhmcknight jnhmcknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! We'll add more tests and prevent the other config options from being output to the config files after this is merged.

@jnhmcknight jnhmcknight merged commit a6f8688 into fictive-kin:master Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants