summaryrefslogtreecommitdiff
path: root/ospfd/ospf_zebra.c
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2021-01-05 16:05:09 +0100
committerOlivier Dugeon <olivier.dugeon@orange.com>2021-03-23 15:39:29 +0100
commitf173deb35206a09e8dc22828cb08638e289b72a5 (patch)
tree36f4e4bc522b4310510b4c3f1eed02eeebc37a38 /ospfd/ospf_zebra.c
parent2efd7e2bdc4b60b51e8d9fe10b0bb20355c373fa (diff)
ospfd: Add Link-State support
This patch allows to store Link State Information received through the various LSAs into a dedicated Traffic Engineering Database (TED). This feature is automatically activated once mpls-te is enabled. A new CLI command `mpls-te export` permits to export the TED to other daemons through the new ZAPI Opaque Link State messages. In complement, a new CLI command `show ip ospf mpls-te database ...` output the contains of the TED to the console. Major modifications take place in ospf_te.[c, h]. File ospf_zebra.c has been modified to handle TED synchronisation request. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r--ospfd/ospf_zebra.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 56b2f8d660..15a95162d3 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -2043,6 +2043,7 @@ static int ospf_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
struct zapi_opaque_msg info;
struct ldp_igp_sync_if_state state;
struct ldp_igp_sync_announce announce;
+ struct zapi_opaque_reg_info dst;
int ret = 0;
s = zclient->ibuf;
@@ -2051,6 +2052,13 @@ static int ospf_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
return -1;
switch (info.type) {
+ case LINK_STATE_SYNC:
+ STREAM_GETC(s, dst.proto);
+ STREAM_GETW(s, dst.instance);
+ STREAM_GETL(s, dst.session_id);
+ dst.type = LINK_STATE_SYNC;
+ ret = ospf_te_sync_ted(dst);
+ break;
case LDP_IGP_SYNC_IF_STATE_UPDATE:
STREAM_GET(&state, s, sizeof(state));
ret = ospf_ldp_sync_state_update(state);