Commit b2a6ba84 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't send update when ifindex changes.

This now happens automatically.
parent 27b92105
...@@ -261,7 +261,7 @@ network_up(struct network *net, int up) ...@@ -261,7 +261,7 @@ network_up(struct network *net, int up)
void void
check_networks(void) check_networks(void)
{ {
int i, rc, ifindex, changed = 0, ifindex_changed = 0; int i, rc, ifindex, ifindex_changed = 0;
for(i = 0; i < numnets; i++) { for(i = 0; i < numnets; i++) {
ifindex = if_nametoindex(nets[i].ifname); ifindex = if_nametoindex(nets[i].ifname);
...@@ -270,7 +270,6 @@ check_networks(void) ...@@ -270,7 +270,6 @@ check_networks(void)
nets[i].ifindex = 0; nets[i].ifindex = 0;
network_up(&nets[i], 0); network_up(&nets[i], 0);
nets[i].ifindex = ifindex; nets[i].ifindex = ifindex;
changed = 1;
ifindex_changed = 1; ifindex_changed = 1;
} }
...@@ -283,16 +282,11 @@ check_networks(void) ...@@ -283,16 +282,11 @@ check_networks(void)
network_up(&nets[i], rc > 0); network_up(&nets[i], rc > 0);
if(rc > 0) if(rc > 0)
send_request(&nets[i], NULL, 0, 0, 0, 0); send_request(&nets[i], NULL, 0, 0, 0, 0);
changed = 1;
} }
check_network_ipv4(&nets[i]); check_network_ipv4(&nets[i]);
} }
if(changed)
send_update(NULL, 0, NULL, 0);
if(ifindex_changed) if(ifindex_changed)
renumber_filters(); renumber_filters();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment