summaryrefslogtreecommitdiff
path: root/net/can/j1939/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/can/j1939/main.c')
-rw-r--r--net/can/j1939/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/can/j1939/main.c b/net/can/j1939/main.c
index 8452b0fbb78c..144c86b0e3ff 100644
--- a/net/can/j1939/main.c
+++ b/net/can/j1939/main.c
@@ -42,6 +42,10 @@ static void j1939_can_recv(struct sk_buff *iskb, void *data)
struct j1939_sk_buff_cb *skcb, *iskcb;
struct can_frame *cf;
+ /* make sure we only get Classical CAN frames */
+ if (!can_is_can_skb(iskb))
+ return;
+
/* create a copy of the skb
* j1939 only delivers the real data bytes,
* the header goes into sockaddr.