summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2023-11-16 10:06:34 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2024-04-23 14:27:01 +0200
commita08922256a24b2c33e856e9f402ccd0d07946391 (patch)
tree89371a4bb82fe2a80969810f7e444350fd84c9c9 /lib
parentisisd, lib: add link state support for srv6 adjacencies (diff)
downloadfrr-a08922256a24b2c33e856e9f402ccd0d07946391.tar.xz
frr-a08922256a24b2c33e856e9f402ccd0d07946391.zip
isis, lib: add isis srv6 capability to ls_node
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/link_state.c6
-rw-r--r--lib/link_state.h9
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/link_state.c b/lib/link_state.c
index 321707493..c758b7f57 100644
--- a/lib/link_state.c
+++ b/lib/link_state.c
@@ -140,6 +140,12 @@ int ls_node_same(struct ls_node *n1, struct ls_node *n2)
if (CHECK_FLAG(n1->flags, LS_NODE_MSD) && (n1->msd != n2->msd))
return 0;
}
+ if (CHECK_FLAG(n1->flags, LS_NODE_SRV6)) {
+ if (n1->srv6_cap_flags != n2->srv6_cap_flags)
+ return 0;
+ if (memcmp(&n1->srv6_msd, &n2->srv6_msd, sizeof(n1->srv6_msd)))
+ return 0;
+ }
/* OK, n1 & n2 are equal */
return 1;
diff --git a/lib/link_state.h b/lib/link_state.h
index aaf97a28b..d819c20db 100644
--- a/lib/link_state.h
+++ b/lib/link_state.h
@@ -106,6 +106,7 @@ extern int ls_node_id_same(struct ls_node_id i1, struct ls_node_id i2);
#define LS_NODE_SR 0x0040
#define LS_NODE_SRLB 0x0080
#define LS_NODE_MSD 0x0100
+#define LS_NODE_SRV6 0x0200
/* Link State Node structure */
struct ls_node {
@@ -128,6 +129,14 @@ struct ls_node {
} srlb;
uint8_t algo[LIB_LS_SR_ALGO_COUNT]; /* Segment Routing Algorithms */
uint8_t msd; /* Maximum Stack Depth */
+
+ uint16_t srv6_cap_flags; /* draft-ietf-idr-bgpls-srv6-ext, 3.1., flags field */
+ struct ls_srv6_msd { /* draft-ietf-idr-bgpls-srv6-ext, 3.2. */
+ uint8_t max_seg_left_msd;
+ uint8_t max_end_pop_msd;
+ uint8_t max_h_encaps_msd;
+ uint8_t max_end_d_msd;
+ } srv6_msd;
};
/* Link State flags to indicate which Attribute parameters are valid */