summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2019-10-25 15:04:13 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-11-04 21:47:23 +0100
commiteaa654f164ba9acd5656e6485eeb5e73da8bfc3e (patch)
tree97faed6b6f66be7d3d410d1328e6f0e24c29361c /net
parent896daf723c845289a4ea1e68e74a5a5475aa796d (diff)
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/159 Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r--net/can/j1939/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
index fe000ea757ea..06183d6f4fb7 100644
--- a/net/can/j1939/transport.c
+++ b/net/can/j1939/transport.c
@@ -1432,7 +1432,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
skcb = j1939_skb_to_cb(skb);
memcpy(skcb, rel_skcb, sizeof(*skcb));
- session = j1939_session_new(priv, skb, skb->len);
+ session = j1939_session_new(priv, skb, size);
if (!session) {
kfree_skb(skb);
return NULL;