summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_top.c
diff options
context:
space:
mode:
authorAbhinay Ramesh <rabhinay@vmware.com>2021-05-30 16:33:41 +0000
committerAbhinay Ramesh <rabhinay@vmware.com>2022-02-09 01:57:08 +0000
commit6cb85350df7fdcea106947fdda42a91ddebcdd5e (patch)
tree9b995fe10714480472ba3c4b842ce32d9f6e1fc2 /ospf6d/ospf6_top.c
parentb592ec5ad037723887f6ba287b202bc33a9fe8b2 (diff)
ospf6d: Stitching the auth trailer code with rest of ospf6.
Problem Statement: ================== RFC 7166 support for OSPF6 in FRR code. RCA: ==== This feature is newly supported in FRR Fix: ==== Core functionality implemented in previous commit is stitched with rest of ospf6 code as part of this commit. Risk: ===== Low risk Tests Executed: =============== Have executed the combination of commands. Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r--ospf6d/ospf6_top.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 57a55a6ef4..9381fa7faf 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -54,6 +54,7 @@
#include "ospf6_gr.h"
#include "lib/json.h"
#include "ospf6_nssa.h"
+#include "ospf6_auth_trailer.h"
DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_TOP, "OSPF6 top");
@@ -445,6 +446,17 @@ static struct ospf6 *ospf6_create(const char *name)
/* Make ospf protocol socket. */
ospf6_serv_sock(o);
+ /* If sequence number is stored in persistent storage, read it.
+ */
+ if (ospf6_auth_nvm_file_exist() == OSPF6_AUTH_FILE_EXIST) {
+ ospf6_auth_seqno_nvm_read(o);
+ o->seqnum_h = o->seqnum_h + 1;
+ ospf6_auth_seqno_nvm_update(o);
+ } else {
+ o->seqnum_l = o->seqnum_h = 0;
+ ospf6_auth_seqno_nvm_update(o);
+ }
+
return o;
}
@@ -1386,6 +1398,10 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,
json_object_int_add(json, "numberOfAreaInRouter",
listcount(o->area_list));
+ json_object_int_add(json, "AuthTrailerHigherSeqNo",
+ o->seqnum_h);
+ json_object_int_add(json, "AuthTrailerLowerSeqNo", o->seqnum_l);
+
if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) {
if (CHECK_FLAG(o->config_flags,
OSPF6_LOG_ADJACENCY_DETAIL))
@@ -1466,6 +1482,10 @@ static void ospf6_show(struct vty *vty, struct ospf6 *o, json_object *json,
vty_out(vty, " Number of areas in this router is %u\n",
listcount(o->area_list));
+ vty_out(vty, " Authentication Sequence number info\n");
+ vty_out(vty, " Higher sequence no %u, Lower sequence no %u\n",
+ o->seqnum_h, o->seqnum_l);
+
if (CHECK_FLAG(o->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) {
if (CHECK_FLAG(o->config_flags,
OSPF6_LOG_ADJACENCY_DETAIL))