Commit eaa654f1 authored by Oleksij Rempel's avatar Oleksij Rempel Committed by Marc Kleine-Budde

can: j1939: transport: j1939_session_fresh_new(): make sure EOMA is send with...

can: j1939: transport: j1939_session_fresh_new(): make sure EOMA is send with the total message size set

We were sending malformed EOMA messageswith total message size set to 0.

This patch fixes the bug.

Reported-by: https://github.com/linux-can/can-utils/issues/159Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Acked-by: default avatarKurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 896daf72
...@@ -1432,7 +1432,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv, ...@@ -1432,7 +1432,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
skcb = j1939_skb_to_cb(skb); skcb = j1939_skb_to_cb(skb);
memcpy(skcb, rel_skcb, sizeof(*skcb)); memcpy(skcb, rel_skcb, sizeof(*skcb));
session = j1939_session_new(priv, skb, skb->len); session = j1939_session_new(priv, skb, size);
if (!session) { if (!session) {
kfree_skb(skb); kfree_skb(skb);
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment