summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_opaque.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-08-11 01:21:19 +0200
committerDonald Sharp <sharpd@nvidia.com>2021-09-14 19:07:06 +0200
commitcf680c38a91f92f3389c08b947faa37a16f08076 (patch)
tree20567c2166e495916b5a3d0a3c1ea6bd0c1c891d /ospfd/ospf_opaque.h
parentMerge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display (diff)
downloadfrr-cf680c38a91f92f3389c08b947faa37a16f08076.tar.xz
frr-cf680c38a91f92f3389c08b947faa37a16f08076.zip
ospfd: Ensure we have some non header lsa data
In some cases FRR is receiving a lsa data packet with a length set to the length of the header only. If we are expecting data from a peer in the form of lsa data. Let's enforce it. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd/ospf_opaque.h')
-rw-r--r--ospfd/ospf_opaque.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h
index 7d401c3dc..aeaeea918 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)) \