All of lore.kernel.org
 help / color / mirror / Atom feed
* Truncate DLC to 8 instead of dropping?
@ 2012-08-31 11:59 Wolfram Sang
  2012-08-31 12:50 ` Kurt Van Dijck
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2012-08-31 11:59 UTC (permalink / raw)
  To: linux-can

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi,

I just noticed today that commit c7cd606f60e7679c7f9eee7010f02a6f000209c1
("can: Fix data length code handling in rx path") says regarding
overlong packets:

===

The ISO 11898-1 Chapter 8.4.2.3 (DLC field) says that register values > 8
should be reduced to 8 without any error reporting or frame drop.

===

and this is why get_can_dlc() came into existance.

However, functions like can_dropped_invalid_skb() from dev.h or can_rcv() from
af_can.c do check for a correct length, but drop the packet in the error case.
Don't those need to be fixed?

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-01 19:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 11:59 Truncate DLC to 8 instead of dropping? Wolfram Sang
2012-08-31 12:50 ` Kurt Van Dijck
2012-08-31 16:35   ` Oliver Hartkopp
2012-09-01 17:33     ` Wolfram Sang
2012-09-01 18:11       ` Kurt Van Dijck
2012-09-01 18:17         ` Wolfram Sang
2012-09-01 19:27           ` Oliver Hartkopp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.