summaryrefslogtreecommitdiff
path: root/proto/ospf/rt.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-04-23 13:54:28 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-04-23 13:54:28 +0200
commit145368f5474436ad7c48fa26f5bde8108ae5ef4a (patch)
tree3f4485fd44404d76135037913606151f2ca4937c /proto/ospf/rt.h
parent4dd24f05f384ac14546d4bebbfcb0ecf9a976ec6 (diff)
Extends multipath support for OSPF.
Fixes cases where the same network or external route are propagated by several OSPF routes and some other corner cases in next hop construction and ECMP. Allows to specify whether external routes should be merged. Thanks to Peter Christensen for the original patch.
Diffstat (limited to 'proto/ospf/rt.h')
-rw-r--r--proto/ospf/rt.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/proto/ospf/rt.h b/proto/ospf/rt.h
index 1ba76e3c..a11748fc 100644
--- a/proto/ospf/rt.h
+++ b/proto/ospf/rt.h
@@ -16,7 +16,8 @@
typedef struct orta
{
- int type;
+ u8 type; /* RTS_OSPF_* */
+ u8 nhs_reuse; /* Whether nhs nodes can be reused during merging */
u32 options;
/*
* For ORT_ROUTER routes, options field are router-LSA style
@@ -93,16 +94,24 @@ static inline int rt_is_nssa(ort *nf)
* - n.metric1 may be at most a small multiple of LSINFINITY,
* therefore sums do not overflow
* - n.oa is always non-NULL
- * - n.nhs is always non-NULL with one exception - configured stubnet
- * nodes (in po->rtf).
+ * - n.nhs is always non-NULL unless it is configured stubnet
+ * - n.en is non-NULL for external routes, NULL for intra/inter area routes.
* - oa->rtr does not contain calculating router itself
*
- * There are three types of nexthops in nhs fields:
+ * There are four types of nexthops in nhs fields:
* - gateway nexthops (non-NULL iface, gw != IPA_NONE)
* - device nexthops (non-NULL iface, gw == IPA_NONE)
* - dummy vlink nexthops (NULL iface, gw == IPA_NONE)
- * These three types don't mix, nhs field contains either
- * one device, one vlink node, or one/more gateway nodes.
+ * - configured stubnets (nhs is NULL, only RTS_OSPF orta nodes in po->rtf)
+ *
+ * Dummy vlink nexthops and configured stubnets cannot be mixed with
+ * regular ones, nhs field contains either list of gateway+device nodes,
+ * one vlink node, or NULL for configured stubnet.
+ *
+ * Dummy vlink nexthops can appear in both network (rtf) and backbone area router
+ * (rtr) tables for regular and inter-area routes, but only if areano > 1. They are
+ * replaced in ospf_rt_sum_tr() and removed in ospf_rt_abr1(), therefore cannot
+ * appear in ASBR pre-selection and external routes processing.
*/
void ospf_rt_spf(struct proto_ospf *po);