Can otherwise lead to unbounded growth in input_buffer if
lldp devices send notifications simultaneously thus
a socket callback contains multiple notifications
and only the first one is cleared. This leads to continous
growth of the input buffer and will crash the system.
Change-Id: I3331de2d8201f574a91b8e8f2d51a98010f7a7ab
memcpy(conn->input_buffer + conn->input_buffer_len, data, length);
conn->input_buffer_len += length;
- /* Is it a notification? */
- check_for_notification(conn);
+ /* Read all notifications */
+ while(!check_for_notification(conn));
RESET_ERROR(conn);