gnrc 802154: discard packets from ourselves#5258
gnrc 802154: discard packets from ourselves#5258OlegHahm wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
This is a workaround to deal with drivers that can hear themselves somehow.
|
Interestingly this bug doesn't show if enable DEBUG in |
|
waitaminute. a radio driver, sometimes, but reproducably, hears itself? always with the same packets? and they end up as loopback packets in the ipv6 stack? that is indeed ugly. |
| tmp_src = gnrc_netif_hdr_get_src_addr(hdr); | ||
|
|
||
| uint8_t my_long_addr[IEEE802154_LONG_ADDRESS_LEN]; | ||
| netdev2_ieee802154_get(state, NETOPT_ADDRESS_LONG, my_long_addr, sizeof(my_long_addr)); |
There was a problem hiding this comment.
I may have some lack of knowledge regarding the netdev2 api, but which address would this call return if I have two 15.4 devices attached to my board? Shouldn't you somehow specify that you want the address from the incoming netif header in this case?
|
Shouldn't this rather be fixed in the device drivers? EDIT: the last sentence doesn't make much sense, but I still think this should go into the device driver itself, as it appears to be a bug. |
Yes, this is not a fix, but a workaround. And even the workaround would even go into the driver, but since the receive function inside the driver knows nothing about the IEEE 802.15.4 header it would make the patch much bigger and more complicated.
We could check if we are in promiscuous mode - but even there one usually doesn't want to receive own packets. |
|
I actually don't understand how a transceiver with only one antenna is able to receive frames from itself, while it is in send mode. This looks like corrupt buffers or something in that direction.. |
I would assume the same. And anyways, this workaround is too ugly. ;) |
|
Yes, the transceiver itself is most definitely not to blame. It's probably a bug in the driver. |
|
@OlegHahm with which driver did you encounter this? |
|
at86rf233 on SAMR21-xpro, reproducable with #4725 after the third broadcast. |
If you have a better solution, please shoot. Otherwise we will have a broken behavior in the release. |
|
#5261 is probably the better solution, since it addresses the actual problem and doesn't deal with the consequences like this PR. |
This is a workaround to deal with drivers that can hear themselves somehow.