mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
confd: interfaces: Flush addresses when exiting current generation
The interface in question might not exist at init:49 if some other change requires it to be recreated from scratch, in which case it will be removed in exit:50. Therefore, run the flush at exit:49, where it should always still exist.
This commit is contained in:
@@ -480,7 +480,7 @@ static int netdag_gen_ip_addrs(struct dagger *net, FILE *ip, const char *proto,
|
||||
if (!cni_find(ifname) && if_nametoindex(ifname)) {
|
||||
FILE *fp;
|
||||
|
||||
fp = dagger_fopen_next(net, "init", ifname, 49, "flush.sh");
|
||||
fp = dagger_fopen_current(net, "exit", ifname, 49, "flush.sh");
|
||||
if (fp) {
|
||||
fprintf(fp, "ip -%c addr flush dev %s\n", proto[3], ifname);
|
||||
fclose(fp);
|
||||
|
||||
Reference in New Issue
Block a user