Skip to content

Commit

Permalink
Reinitialize VIFs on reload if new interfaces have been found
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Aug 22, 2021
1 parent 7d50e3f commit 3202f4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/mroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ void mroute_reload_beg(void)
}
}

void mroute_reload_end(void)
void mroute_reload_end(int do_vifs)
{
struct mroute *entry, *tmp;
struct iface *iface;
Expand All @@ -1011,7 +1011,8 @@ void mroute_reload_end(void)
if (iface->unused) {
mroute_del_vif(iface->ifname);
iface->unused = 0;
}
} else if (do_vifs)
mroute_add_vif(iface->ifname, iface->mrdisc, iface->threshold);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/mroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int mroute_add_route (struct mroute *mroute);
int mroute_del_route (struct mroute *mroute);

void mroute_reload_beg (void);
void mroute_reload_end (void);
void mroute_reload_end (int do_vifs);

int mroute_show (int sd, int detail);

Expand Down
2 changes: 1 addition & 1 deletion src/smcrouted.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void reload(void)
conf_read(conf_file, do_vifs);

mcgroup_reload_end();
mroute_reload_end();
mroute_reload_end(do_vifs);

/* Acknowledge client SIGHUP/reload */
notify_ready(NULL, uid, gid);
Expand Down

0 comments on commit 3202f4b

Please sign in to comment.