summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_gr.c
diff options
context:
space:
mode:
authorAndrew Cooks <acooks.at.bda@gmail.com>2024-04-09 15:01:23 +1000
committerAndrew Cooks <acooks.at.bda@gmail.com>2024-09-16 18:38:16 +1000
commit7c9a79f1823cdc59a94ddf7c442a604feb054544 (patch)
treef5c23da7b7a17f893807c46cd3284826ff62eff2 /ospf6d/ospf6_gr.c
parent81db47a175ef62e8089638a2d66ddb557fb9e031 (diff)
ospf6d: factor out generic TLV handling
In preperation for Extended LSA types and their TLVs, factor out the TLV handling from the Gracefull Restart functionality. Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_gr.c')
-rw-r--r--ospf6d/ospf6_gr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c
index ab119a4ea4..7295dee0f0 100644
--- a/ospf6d/ospf6_gr.c
+++ b/ospf6d/ospf6_gr.c
@@ -30,6 +30,7 @@
#include "ospf6d/ospf6_flood.h"
#include "ospf6d/ospf6_intra.h"
#include "ospf6d/ospf6_spf.h"
+#include "ospf6d/ospf6_tlv.h"
#include "ospf6d/ospf6_gr.h"
#include "ospf6d/ospf6_gr_clippy.c"
@@ -57,13 +58,13 @@ static int ospf6_gr_lsa_originate(struct ospf6_interface *oi,
grace_lsa = (struct ospf6_grace_lsa *)ospf6_lsa_header_end(lsa_header);
/* Put grace period. */
- grace_lsa->tlv_period.header.type = htons(GRACE_PERIOD_TYPE);
- grace_lsa->tlv_period.header.length = htons(GRACE_PERIOD_LENGTH);
+ grace_lsa->tlv_period.header.type = htons(TLV_GRACE_PERIOD_TYPE);
+ grace_lsa->tlv_period.header.length = htons(TLV_GRACE_PERIOD_LENGTH);
grace_lsa->tlv_period.interval = htonl(gr_info->grace_period);
/* Put restart reason. */
- grace_lsa->tlv_reason.header.type = htons(RESTART_REASON_TYPE);
- grace_lsa->tlv_reason.header.length = htons(RESTART_REASON_LENGTH);
+ grace_lsa->tlv_reason.header.type = htons(TLV_GRACE_RESTART_REASON_TYPE);
+ grace_lsa->tlv_reason.header.length = htons(TLV_GRACE_RESTART_REASON_LENGTH);
grace_lsa->tlv_reason.reason = reason;
/* Fill LSA Header */