summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_gr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_gr.c')
-rw-r--r--ospf6d/ospf6_gr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ospf6d/ospf6_gr.c b/ospf6d/ospf6_gr.c
index 34cb970..ab119a4 100644
--- a/ospf6d/ospf6_gr.c
+++ b/ospf6d/ospf6_gr.c
@@ -54,9 +54,7 @@ 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 *)((caddr_t)lsa_header
- + sizeof(struct ospf6_lsa_header));
+ 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);