Oliver,

in the patch below, I identified a line which I don't understand.
The targeted statement is within can_send(), when loopback is requested
but not supported by the device driver.
can_send() clones the skb (newskb) which will soon be injected in the
receive flow of the net_device.
By setting the type to PACKET_BROADCAST (over PACKET_LOOPBACK), a
socketcan receiver cannot distinguish between loopback'd and external
broadcasted can messages, which I tought was the reason to set
PACKET_LOOPBACK in the first place (a few lines up).

I seem not to understand the logic. Where did I go wrong?

Kurt

---

Index: net/can/af_can.c
===================================================================
--- net/can/af_can.c    (revision 1115)
+++ net/can/af_can.c    (working copy)
@@ -333,7 +333,6 @@
 
                        newskb->sk = skb->sk;
                        newskb->ip_summed = CHECKSUM_UNNECESSARY;
-                       newskb->pkt_type = PACKET_BROADCAST;
                }
        } else {
                /* indication for the CAN driver: no loopback required */
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to