From a8b512087103aa8f2892449c2e02bff9aef95e72 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 10 Feb 2025 14:31:12 +0100 Subject: [PATCH] confd: Allow reconfigurations on dummy and gre interfaces With the new iftype enum, we see that configuring an existing dummy or gre interface types was wrongly classified as an error rather than as a NOP. Example, before this change, this was OK: configure set interface foo set interface foo ipv4 address 10.0.0.1 prefix-length 24 leave However, this was not: configure set interface foo +leave +configure set interface foo ipv4 address 10.0.0.1 prefix-length 24 leave + --- src/confd/src/ietf-interfaces.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/confd/src/ietf-interfaces.c b/src/confd/src/ietf-interfaces.c index 0d3e581a..e1de591c 100644 --- a/src/confd/src/ietf-interfaces.c +++ b/src/confd/src/ietf-interfaces.c @@ -423,15 +423,16 @@ static int netdag_gen_afspec_set(sr_session_ctx_t *session, struct dagger *net, return bridge_gen(dif, cif, ip, 0); case IFT_VLAN: return netdag_gen_vlan(net, dif, cif, ip); + + case IFT_DUMMY: + case IFT_GRE: case IFT_GRETAP: case IFT_VETH: case IFT_VXLAN: return 0; - case IFT_DUMMY: case IFT_ETH: case IFT_ETHISH: - case IFT_GRE: case IFT_UNKNOWN: return ERR_IFACE(cif, -ENOSYS, "unsupported interface type \"%s\"", lydx_get_cattr(cif, "type"));