Skip to content

gnrc 802154: discard packets from ourselves#5258

Closed
OlegHahm wants to merge 2 commits intoRIOT-OS:masterfrom
OlegHahm:gnrc_netdev2_ieee802154_schizophrenic_fix
Closed

gnrc 802154: discard packets from ourselves#5258
OlegHahm wants to merge 2 commits intoRIOT-OS:masterfrom
OlegHahm:gnrc_netdev2_ieee802154_schizophrenic_fix

Conversation

@OlegHahm
Copy link
Copy Markdown
Member

@OlegHahm OlegHahm commented Apr 7, 2016

This is a workaround to deal with drivers that can hear themselves somehow.

This is a workaround to deal with drivers that can hear themselves somehow.
@OlegHahm OlegHahm added Area: network Area: Networking Area: drivers Area: Device drivers GNRC labels Apr 7, 2016
@OlegHahm OlegHahm added this to the Release 2016.04 milestone Apr 7, 2016
@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

Interestingly this bug doesn't show if enable DEBUG in gnrc_ipv6.c - seems to be kind of racey.

@OlegHahm OlegHahm closed this Apr 7, 2016
@OlegHahm OlegHahm reopened this Apr 7, 2016
@kaspar030
Copy link
Copy Markdown
Contributor

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));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

state is the device

@cgundogan
Copy link
Copy Markdown
Member

Shouldn't this rather be fixed in the device drivers? I can imagine that this workaround could break sniffing in monitor mode, because we wouldn't be able to see our own packets?

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.

@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

Shouldn't this rather be fixed in the device drivers?

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.

I can imagine that this workaround could break sniffing in monitor mode, because we wouldn't be able to see our own packets?

We could check if we are in promiscuous mode - but even there one usually doesn't want to receive own packets.

@cgundogan
Copy link
Copy Markdown
Member

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..

@kaspar030
Copy link
Copy Markdown
Contributor

This looks like corrupt buffers or something in that direction..

I would assume the same. And anyways, this workaround is too ugly. ;)

@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

Yes, the transceiver itself is most definitely not to blame. It's probably a bug in the driver.

@cgundogan
Copy link
Copy Markdown
Member

@OlegHahm with which driver did you encounter this?

@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

at86rf233 on SAMR21-xpro, reproducable with #4725 after the third broadcast.

@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

I would assume the same. And anyways, this workaround is too ugly. ;)

If you have a better solution, please shoot. Otherwise we will have a broken behavior in the release.

@OlegHahm
Copy link
Copy Markdown
Member Author

OlegHahm commented Apr 7, 2016

#5261 is probably the better solution, since it addresses the actual problem and doesn't deal with the consequences like this PR.

@OlegHahm OlegHahm closed this Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: network Area: Networking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants