diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-06-07 12:58:42 +0200 | 
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2018-09-05 11:38:13 +0200 | 
| commit | 414158882318898c970297d84d20935f4e4a7bb0 (patch) | |
| tree | cfa4fd2384e53bb420b0bd83d78f75722efc96dd /isisd/fabricd.c | |
| parent | 103e4a718fb6ddc1b8dab00cf87ea91b44dedf9e (diff) | |
fabricd: add support for completely unnumbered operation
With this commit, fabricd can run without any IPv4 addresses configured
except on loopback. There are two changes to achieve this:
a) If a circuit has no IPv4 address configured, fabricd will resort to
advertise the routers loopback IP in the OpenFabric hellos.
b) All the routes from OpenFabric are sent with ZEBRA_FLAG_ONLINK set,
so that zebra will install them into the fib without checking whether
the nexthop is reachable
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd/fabricd.c')
| -rw-r--r-- | isisd/fabricd.c | 24 | 
1 files changed, 24 insertions, 0 deletions
diff --git a/isisd/fabricd.c b/isisd/fabricd.c index b52f2b554e..7951efe5a1 100644 --- a/isisd/fabricd.c +++ b/isisd/fabricd.c @@ -691,3 +691,27 @@ void fabricd_trigger_csnp(struct isis_area *area)  				      &circuit->t_send_csnp[ISIS_LEVEL2 - 1]);  	}  } + +struct list *fabricd_ip_addrs(struct isis_circuit *circuit) +{ +	if (circuit->ip_addrs && listcount(circuit->ip_addrs)) +		return circuit->ip_addrs; + +	if (!fabricd || !circuit->area || !circuit->area->circuit_list) +		return NULL; + +	struct listnode *node; +	struct isis_circuit *c; + +	for (ALL_LIST_ELEMENTS_RO(circuit->area->circuit_list, node, c)) { +		if (c->circ_type != CIRCUIT_T_LOOPBACK) +			continue; + +		if (!c->ip_addrs || !listcount(c->ip_addrs)) +			return NULL; + +		return c->ip_addrs; +	} + +	return NULL; +}  | 
