diff options
Diffstat (limited to 'ospf6d/ospf6_gr.c')
| -rw-r--r-- | ospf6d/ospf6_gr.c | 13 |
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 */ |
