diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-09-23 15:32:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-23 15:32:31 -0400 |
| commit | 4020564a3cc230d4ef14d39b69d15e1c967d33e7 (patch) | |
| tree | d5001b4296dfd1cdea3570aadf25e90e17376e61 /zebra/zebra_mlag.c | |
| parent | 57d7d1948e33d3aec2a5ef75f673e4f159d35341 (diff) | |
| parent | c19808acad0fa0f60ee2ada922258d98d17944bc (diff) | |
Merge pull request #7163 from donaldsharp/zebra_mlag_bugs
Zebra mlag bugs
Diffstat (limited to 'zebra/zebra_mlag.c')
| -rw-r--r-- | zebra/zebra_mlag.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c index 3cf4ba8d39..fb8798ebd9 100644 --- a/zebra/zebra_mlag.c +++ b/zebra/zebra_mlag.c @@ -111,10 +111,13 @@ void zebra_mlag_send_deregister(void) void zebra_mlag_process_mlag_data(uint8_t *data, uint32_t len) { struct stream *s = NULL; - struct stream *s1 = NULL; int msg_type = 0; s = stream_new(ZEBRA_MAX_PACKET_SIZ); + /* + * Place holder we need the message type first + */ + stream_putl(s, msg_type); msg_type = zebra_mlag_protobuf_decode_message(s, data, len); if (msg_type <= 0) { @@ -128,12 +131,9 @@ void zebra_mlag_process_mlag_data(uint8_t *data, uint32_t len) /* * additional four bytes are for message type */ - s1 = stream_new(stream_get_endp(s) + ZEBRA_MLAG_METADATA_LEN); - stream_putl(s1, msg_type); - stream_put(s1, s->data, stream_get_endp(s)); + stream_putl_at(s, 0, msg_type); thread_add_event(zrouter.master, zebra_mlag_post_data_from_main_thread, - s1, 0, NULL); - stream_free(s); + s, 0, NULL); } /**********************End of MLAG Interaction********************************/ |
