summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Hartkopp <oliver@hartkopp.net>2008-12-04 15:01:08 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-18 09:13:37 -0800
commit26c5652a335bdf4a4476c9d23a0b381eaa3e2073 (patch)
tree7af7c0857079412fd0512da7141af5674f82e521
parentded40f69197fcdb5a223aef09cb3b382eaa36b85 (diff)
downloadlwn-26c5652a335bdf4a4476c9d23a0b381eaa3e2073.tar.gz
lwn-26c5652a335bdf4a4476c9d23a0b381eaa3e2073.zip
can: omit received RTR frames for single ID filter lists
commit f706644d55f90e8306d87060168fef33804d6dd9 upstream. Since commit d253eee20195b25e298bf162a6e72f14bf4803e5 the single CAN identifier filter lists handle only non-RTR CAN frames. So we need to omit the check of these filter lists when receiving RTR CAN frames. Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--net/can/af_can.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index f8df8f420fa1..150f0b261d7a 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -622,7 +622,10 @@ static int can_rcv_filter(struct dev_rcv_lists *d, struct sk_buff *skb)
}
}
- /* check CAN_ID specific entries */
+ /* check filterlists for single non-RTR can_ids */
+ if (can_id & CAN_RTR_FLAG)
+ return matches;
+
if (can_id & CAN_EFF_FLAG) {
hlist_for_each_entry_rcu(r, n, &d->rx[RX_EFF], list) {
if (r->can_id == can_id) {