Commit 6f530114 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add new flag SPLIT_HORIZON.

parent 3a055e6d
......@@ -894,7 +894,7 @@ flushupdates(struct network *net)
if(metric < INFINITY)
satisfy_request(route->src->prefix, route->src->plen,
seqno, route->src->id, net);
if(split_horizon && (net->flags & NET_WIRED) &&
if((net->flags & NET_SPLIT_HORIZON) &&
route->neigh->network == net)
continue;
really_send_update(net, route->src->id,
......
......@@ -262,6 +262,8 @@ network_up(struct network *net, int up)
if(wired) {
net->flags |= NET_WIRED;
net->cost = 96;
if(split_horizon)
net->flags |= NET_SPLIT_HORIZON;
} else {
net->flags &= ~NET_WIRED;
net->cost = 256;
......
......@@ -34,6 +34,7 @@ struct network_conf {
#define NET_UP (1 << 0)
#define NET_WIRED (1<<1)
#define NET_SPLIT_HORIZON (1 << 2)
struct network {
struct network *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