mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 23:43:20 +02:00
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
+<KABOOM>
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user