-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ieee802154: Set intra-PAN flag for packets where src/dst PANs match #5685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem with this comparison of
dst_len != 0is that for multicast messages such as RS the length actually is 0 see 1. The result is the for RS messages we have SRC_PAN==DST_PAN butdst_len=0and the flag will be unset which makes Linux drop those RS and never send an RA.This could be fixed, for instance in 2, by not not passing
netif_hdr->dst_l2addr_lendirectly but rather set this like withsrc_len. That is, if the packet is broadcast or multicast (see 3) then setdst_len = 2.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an explanation for this behavior: since
netif_hdr_tis L2 agnostic and the format of a multicast address can be very L2 specific, multicast is just handled by setting a special multicast flag and not setting the destination address in thenetif_hdr_t. The L2 then sets the multicast address to its liking according to e.g. the IPv6 destination address (or in IEEE 802.15.4 by just using the broadcast address).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri
where does this happen in the standard case of 6lo over 802154?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri64, ah forget about it, I found it: https://github.com/RIOT-OS/RIOT/blob/master/sys/net/link_layer/ieee802154/ieee802154.c#L60
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few lines below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri64 I don't understand why src address and length are set in
_sendhere but the destination is not set the same way when it is multicast? I mean the code ingnrc_netdev2_ieee802154.calready knows about L2 so it should be able to set the address like here, or not?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and what's the reasoning behind unset the broadcast flag here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the driver is not "supposed" to know the length of the broadcast address. That's this function's job.
The flag is not part of the IEEE 802.15.4 specs so adding it to the MAC header seems like a bad idea ;-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri64, this is no driver code (I thought)?! I was talking about these 2 files
both are not driver, but
srcis set in the GNRC (2.) part butdstif broad/multicast is set in the other file (2.). I argue for consistency, i.e., set broadcast address in GNRC too, and further get rid of this broadcast flag setting and later unsetting again.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to confess with "Because the driver is not 'supposed' to know […]" I was mixing terms myself. I meant "the glue code" gnrc_netdev2_ieee802154 ^^".
Might indeed be a good idea!