Please sign in to comment.
interfaces/kiss: fix KISS interface MTU check on RX
`driver->rx_packet` holds each (temporally incomplete) incoming CSP packet, while `driver->rx_length` has said buffer's valid number of bytes. As `interface->mtu` only applies to CSP "data" (and `driver->rx_packet` is filled from `driver->rx_packet->id.ext`, not `driver->rx_packet->data`), size checks must take `CSP_HEADER_LENGTH` into account. Whatsmore, when "End char" is processed, this is correctly being handled, as evidenced by the following snippet: ``` /* The CSP packet length is without the header */ driver->rx_packet->length = driver->rx_length - CSP_HEADER_LENGTH; ```
- Loading branch information...