Commit 848afca4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't add duplicate networks.

parent ecac798d
......@@ -64,6 +64,11 @@ add_network(char *ifname, struct network_conf *conf)
return NULL;
}
FOR_ALL_NETS(net) {
if(strcmp(net->ifname, ifname) == 0)
return net;
}
net = malloc(sizeof(struct network));
if(net == NULL)
return NULL;
......
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