summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_message.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_message.c')
-rw-r--r--ospf6d/ospf6_message.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index e8380af5c4..33d15e7243 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1304,9 +1304,7 @@ static unsigned ospf6_lsa_examin(struct ospf6_lsa_header *lsah,
4 bytes of referenced link state ID. */
if (headeronly)
break;
- as_external_lsa =
- (struct ospf6_as_external_lsa
- *)((caddr_t)lsah + OSPF6_LSA_HEADER_SIZE);
+ as_external_lsa = lsa_after_header(lsah);
exp_length =
OSPF6_LSA_HEADER_SIZE + OSPF6_AS_EXTERNAL_LSA_MIN_SIZE;
/* To find out if the last optional field (Referenced Link State
@@ -1351,8 +1349,7 @@ static unsigned ospf6_lsa_examin(struct ospf6_lsa_header *lsah,
by N>=0 IPv6 prefix blocks (with N declared beforehand). */
if (headeronly)
break;
- link_lsa = (struct ospf6_link_lsa *)((caddr_t)lsah
- + OSPF6_LSA_HEADER_SIZE);
+ link_lsa = lsa_after_header(lsah);
return ospf6_prefixes_examin(
(struct ospf6_prefix *)((caddr_t)link_lsa
+ OSPF6_LINK_LSA_MIN_SIZE),
@@ -1367,9 +1364,7 @@ static unsigned ospf6_lsa_examin(struct ospf6_lsa_header *lsah,
*/
if (headeronly)
break;
- intra_prefix_lsa =
- (struct ospf6_intra_prefix_lsa
- *)((caddr_t)lsah + OSPF6_LSA_HEADER_SIZE);
+ intra_prefix_lsa = lsa_after_header(lsah);
return ospf6_prefixes_examin(
(struct ospf6_prefix
*)((caddr_t)intra_prefix_lsa