mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-05 22:50:50 +00:00
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>
This commit is contained in:
parent
2a8ded2b97
commit
cf680c38a9
@ -77,6 +77,8 @@
|
|||||||
|
|
||||||
#define OPAQUE_TYPE_RANGE_RESERVED(type) (127 < (type) && (type) <= 255)
|
#define OPAQUE_TYPE_RANGE_RESERVED(type) (127 < (type) && (type) <= 255)
|
||||||
|
|
||||||
|
#define OSPF_OPAQUE_LSA_MIN_SIZE 4U
|
||||||
|
|
||||||
#define VALID_OPAQUE_INFO_LEN(lsahdr) \
|
#define VALID_OPAQUE_INFO_LEN(lsahdr) \
|
||||||
((ntohs((lsahdr)->length) >= sizeof(struct lsa_header)) \
|
((ntohs((lsahdr)->length) >= sizeof(struct lsa_header)) \
|
||||||
&& ((ntohs((lsahdr)->length) < OSPF_MAX_LSA_SIZE)) \
|
&& ((ntohs((lsahdr)->length) < OSPF_MAX_LSA_SIZE)) \
|
||||||
|
@ -108,9 +108,9 @@ static const uint16_t ospf_lsa_minlen[] = {
|
|||||||
0,
|
0,
|
||||||
OSPF_AS_EXTERNAL_LSA_MIN_SIZE,
|
OSPF_AS_EXTERNAL_LSA_MIN_SIZE,
|
||||||
0,
|
0,
|
||||||
0,
|
OSPF_OPAQUE_LSA_MIN_SIZE,
|
||||||
0,
|
OSPF_OPAQUE_LSA_MIN_SIZE,
|
||||||
0,
|
OSPF_OPAQUE_LSA_MIN_SIZE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* for ospf_check_auth() */
|
/* for ospf_check_auth() */
|
||||||
|
Loading…
Reference in New Issue
Block a user