summaryrefslogtreecommitdiff
path: root/zebra/zebra_mlag_private.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-09-23 15:32:31 -0400
committerGitHub <noreply@github.com>2020-09-23 15:32:31 -0400
commit4020564a3cc230d4ef14d39b69d15e1c967d33e7 (patch)
treed5001b4296dfd1cdea3570aadf25e90e17376e61 /zebra/zebra_mlag_private.c
parent57d7d1948e33d3aec2a5ef75f673e4f159d35341 (diff)
parentc19808acad0fa0f60ee2ada922258d98d17944bc (diff)
Merge pull request #7163 from donaldsharp/zebra_mlag_bugs
Zebra mlag bugs
Diffstat (limited to 'zebra/zebra_mlag_private.c')
-rw-r--r--zebra/zebra_mlag_private.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/zebra/zebra_mlag_private.c b/zebra/zebra_mlag_private.c
index 0f0285ed31..1dae758b12 100644
--- a/zebra/zebra_mlag_private.c
+++ b/zebra/zebra_mlag_private.c
@@ -117,6 +117,15 @@ static int zebra_mlag_read(struct thread *thread)
/* This will be the actual length of the packet */
tot_len = h_msglen + ZEBRA_MLAG_LEN_SIZE;
+ /*
+ * If the buffer read we are about to do is too large
+ * we are really really really not double plus good
+ *
+ * I'm not sure what to do here other than to bail
+ * We'll need to revisit this in the future.
+ */
+ assert(tot_len < ZEBRA_MLAG_BUF_LIMIT);
+
if (curr_len < tot_len) {
ssize_t data_len;