summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ospfd/ospf_opaque.h2
-rw-r--r--ospfd/ospf_packet.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h
index 7d401c3dcc..aeaeea9189 100644
--- a/ospfd/ospf_opaque.h
+++ b/ospfd/ospf_opaque.h
@@ -77,6 +77,8 @@
#define OPAQUE_TYPE_RANGE_RESERVED(type) (127 < (type) && (type) <= 255)
+#define OSPF_OPAQUE_LSA_MIN_SIZE 4U
+
#define VALID_OPAQUE_INFO_LEN(lsahdr) \
((ntohs((lsahdr)->length) >= sizeof(struct lsa_header)) \
&& ((ntohs((lsahdr)->length) < OSPF_MAX_LSA_SIZE)) \
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 1efdfee3b4..7c32c18d4c 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -108,9 +108,9 @@ static const uint16_t ospf_lsa_minlen[] = {
0,
OSPF_AS_EXTERNAL_LSA_MIN_SIZE,
0,
- 0,
- 0,
- 0,
+ OSPF_OPAQUE_LSA_MIN_SIZE,
+ OSPF_OPAQUE_LSA_MIN_SIZE,
+ OSPF_OPAQUE_LSA_MIN_SIZE,
};
/* for ospf_check_auth() */