Commit b10e16fe authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement config file parsing of the faraway flag.

parent a49f86af
......@@ -427,6 +427,12 @@ parse_nconf(gnc_t gnc, void *closure)
if(c < -1)
goto error;
nconf->wired = v;
} else if(strcmp(token, "faraway") == 0) {
int v;
c = getbool(c, &v, gnc, closure);
if(c < -1)
goto error;
nconf->faraway = v;
} else if(strcmp(token, "link-quality") == 0) {
int v;
c = getbool(c, &v, gnc, closure);
......
......@@ -312,6 +312,9 @@ network_up(struct network *net, int up)
net->flags |= NET_LQ;
}
if(NET_CONF(net, faraway) == CONFIG_YES)
net->flags |= NET_FARAWAY;
net->activity_time = now.tv_sec;
update_hello_interval(net);
/* Since the interface was marked as active above, the
......
......@@ -35,6 +35,7 @@ struct network_conf {
char wired;
char split_horizon;
char lq;
char faraway;
int channel;
struct network_conf *next;
};
......
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