Commit e38993d9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek Committed by Juliusz Chroboczek

Define new per-interface flag unicast.

parent 7edb0112
...@@ -562,6 +562,12 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure, ...@@ -562,6 +562,12 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure,
if(c < -1) if(c < -1)
goto error; goto error;
if_conf->faraway = v; if_conf->faraway = v;
} else if(strcmp(token, "unicast") == 0) {
int v;
c = getbool(c, &v, gnc, closure);
if(c < -1)
goto error;
if_conf->unicast = v;
} else if(strcmp(token, "link-quality") == 0) { } else if(strcmp(token, "link-quality") == 0) {
int v; int v;
c = getbool(c, &v, gnc, closure); c = getbool(c, &v, gnc, closure);
...@@ -713,6 +719,7 @@ merge_ifconf(struct interface_conf *dest, ...@@ -713,6 +719,7 @@ merge_ifconf(struct interface_conf *dest,
MERGE(split_horizon); MERGE(split_horizon);
MERGE(lq); MERGE(lq);
MERGE(faraway); MERGE(faraway);
MERGE(unicast);
MERGE(channel); MERGE(channel);
MERGE(enable_timestamps); MERGE(enable_timestamps);
MERGE(rfc6126); MERGE(rfc6126);
......
...@@ -391,6 +391,9 @@ interface_up(struct interface *ifp, int up) ...@@ -391,6 +391,9 @@ interface_up(struct interface *ifp, int up)
if(IF_CONF(ifp, faraway) == CONFIG_YES) if(IF_CONF(ifp, faraway) == CONFIG_YES)
ifp->flags |= IF_FARAWAY; ifp->flags |= IF_FARAWAY;
if(IF_CONF(ifp, unicast) == CONFIG_YES)
ifp->flags |= IF_UNICAST;
if(IF_CONF(ifp, hello_interval) > 0) if(IF_CONF(ifp, hello_interval) > 0)
ifp->hello_interval = IF_CONF(ifp, hello_interval); ifp->hello_interval = IF_CONF(ifp, hello_interval);
else if(type == IF_TYPE_WIRELESS) else if(type == IF_TYPE_WIRELESS)
......
...@@ -45,6 +45,7 @@ struct interface_conf { ...@@ -45,6 +45,7 @@ struct interface_conf {
char split_horizon; char split_horizon;
char lq; char lq;
char faraway; char faraway;
char unicast;
int channel; int channel;
int enable_timestamps; int enable_timestamps;
int rfc6126; int rfc6126;
...@@ -69,6 +70,8 @@ struct interface_conf { ...@@ -69,6 +70,8 @@ struct interface_conf {
#define IF_LQ (1 << 3) #define IF_LQ (1 << 3)
/* Nodes on the far end don't interfere with nodes on the near end. */ /* Nodes on the far end don't interfere with nodes on the near end. */
#define IF_FARAWAY (1 << 4) #define IF_FARAWAY (1 << 4)
/* Send most TLVs over unicast. */
#define IF_UNICAST (1 << 5)
/* Remain compatible with RFC 6126. */ /* Remain compatible with RFC 6126. */
#define IF_RFC6126 (1 << 6) #define IF_RFC6126 (1 << 6)
......
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