-
Notifications
You must be signed in to change notification settings - Fork 217
keyfile parser: add support for all tunnel types (LP: #2016473) #360
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
keyfile parser: add support for all tunnel types (LP: #2016473) #360
Conversation
Add the minimum support necessary to generate a YAML that will be accepted by the parser. The rest of the tunnel settings will be stored in the passthrough section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Danilo, this is another big step in our NM backend support!
It's looking mostly good to me, but I had a few remarks about the handling of NetplanTunnelMode
, the termination of validation after a warning and the NM tunnels support in general.
I left a bunch of (mostly simple) inline remarks, which we might want to fix before merging.
PS: I assume you already ran the new NM autopkgtests (from https://code.launchpad.net/~danilogondolfo/network-manager/+git/network-manager/+merge/443011) against this branch and those PASSed?
NETPLAN_TUNNEL_MODE_VXLAN = 10, | ||
NETPLAN_TUNNEL_MODE_GRETAP = 10, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: This change has the potential to break ABI. But AFAICT it is only being used internal to libnetplan.so and thus should not break anything in reality. Our abi-compat checker didn't catch any issue either.
Keeping the enum in sync with NM is a good thing and was the original intent, according to the comment above.
Netplan doesn't allow partial Wireguard configuration while Network Manager does. The original Netplan's behavior will not allow NM to build a WG connection in separate steps.
Sync the enum NetplanTunnelMode with the tunnel modes supported by Network Manager.
And add few more tests.
They are conflicting with functions with the same name from parse.c when these files are include in ctests.
The keyfile is already being automatically released.
The second parameter of g_datalist_set_data_full() is not stored in the list and must be free'd.
7949d36
to
14c54a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Thanks for resolving my concerns.
Description
Support for Wireguard keyfiles parsing is required to get the new Network Manager autopkgtests passing [1]. The original plan was to add support only for WG, but I ended up including all tunnel types.
There is a not-so-nice function renaming in src/parse-nm.c that was required to get new ctests compiling.
[1] - https://code.launchpad.net/~danilogondolfo/network-manager/+git/network-manager/+merge/443011
Checklist
make check
successfully.make check-coverage
).