When a veth device already exists in the kernel (from a previous failed
cleanup or external creation), attempting to create it again with
NLM_F_EXCL fails with -EEXIST. This leaves the device in a broken state
where netifd marks it as present but cannot bring it up.
Signed-off-by: Felix Fietkau <[email protected]>
{
int ret;
+ system_veth_del(&veth->dev);
+
ret = system_veth_add(&veth->dev, &veth->config);
if (ret < 0)
return ret;