Netplan does not provide "key" parameter to GRE tunnel configuration via systemd-networkd
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Medium
|
Unassigned | ||
systemd |
Fix Released
|
Unknown
|
Bug Description
The following example should configure a GRE tunnel between 172.16.4.2 and 172.16.1.2, with key 33490175. The effect should be like manually configured with: sudo ip tunnel add test1 mode gre local 172.16.4.2 remote 172.16.1.2 key 33490175.
However, the following Netplan configuration fails under Ubuntu 22.04 (latest development version, March 25, 2022):
network:
version: 2
renderer: networkd
tunnels:
gre1-255-255:
mode: gre
ttl: 255
local: 172.16.4.2
remote: 172.16.1.2
key: 33490175
addresses:
- 172.20.82.94/30
Result of "sudo netplan generate": Error in network definition: gre1-255-255: 'input-key' is not required for this tunnel type
Note: There should be no input and output keys. There is just one single key!
Trying to change the configuration:
keys:
input: 33490175
# key: 33490175
Result of "sudo netplan generate": Error in network definition: gre1-255-255: 'input-key' is not required for this tunnel type
Some investigation into the sources of Netplan (src/validation.c -> https:/
static gboolean
validate_
{
/* Backend-specific validation rules for tunnels */
switch (nd->backend) {
case NETPLAN_
switch (nd->tunnel.mode) {
/* TODO: Remove this exception and fix ISATAP handling with the
* networkd backend.
* systemd-networkd has grown ISATAP support in 918049a.
*/
}
break;
It seems that the cases NETPLAN_
Changed in systemd: | |
status: | Unknown → Fix Released |
Changed in netplan: | |
status: | Triaged → In Progress |
Changed in netplan: | |
status: | In Progress → Fix Committed |
Thank you for this bug report. I agree the validation should be less restrictive here and netplan should be adopted to support those newer systemd-networkd features.
I've drafted a potential fix in this PR: https:/ /github. com/canonical/ netplan/ pull/274