summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_gr.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2024-09-24 09:50:19 -0400
committerGitHub <noreply@github.com>2024-09-24 09:50:19 -0400
commit3c89cb638f005213107a00a3b76eba54c9942ca6 (patch)
tree1cf20239c49fffe7d354580f6e0362e160450628 /ospf6d/ospf6_gr.c
parentde43ca890dfe9dff5296c902f977ee4f3ba8dcf7 (diff)
parentb2526ddc3f992bb6e2dcc95fad9bbbd8c23b0bdf (diff)
Merge pull request #16533 from acooks-at-bda/less-controversial-ospf6d-refactor-before-adding-tlvs
OSPF6: Refactor to prepare for E-LSA handling
Diffstat (limited to 'ospf6d/ospf6_gr.c')
-rw-r--r--ospf6d/ospf6_gr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c
index ab119a4ea4..64eb90d5f2 100644
--- a/ospf6d/ospf6_gr.c
+++ b/ospf6d/ospf6_gr.c
@@ -16,6 +16,7 @@
#include "printfrr.h"
#include "lib_errors.h"
+#include "ospf6_proto.h"
#include "ospf6d/ospf6_lsa.h"
#include "ospf6d/ospf6_lsdb.h"
#include "ospf6d/ospf6_route.h"
@@ -30,6 +31,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"
@@ -54,16 +56,17 @@ static int ospf6_gr_lsa_originate(struct ospf6_interface *oi,
/* prepare buffer */
memset(buffer, 0, sizeof(buffer));
lsa_header = (struct ospf6_lsa_header *)buffer;
- grace_lsa = (struct ospf6_grace_lsa *)ospf6_lsa_header_end(lsa_header);
+ grace_lsa = lsa_after_header(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 */