Skip to content
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

gnrc/netif: fix source address selection for non-matching prefixes #8536

Merged
merged 1 commit into from Feb 27, 2018

Conversation

daniel-k
Copy link
Member

@daniel-k daniel-k commented Feb 8, 2018

Contribution description

According to RFC 6724 ch. 5 rule 8, the source address candidate with the longest matching prefix has to be selected. The current implementation discards source addresses that have no matching prefix (match = 0) which is perfectly fine for any global destination address.

Problem solved

It wasn't possible for a node to communicate via gnrc_border_router to the outside world, the node would send packets erroneously with its local address as source address. The BR would then discard the packets because it isn't supposed to forward such packets.

According to RFC 6724 ch. 5 rule 8, the source address candidate with
the longest matching prefix has to be selected. The current
implementation discards source addresses that have no matching prefix
(`match = 0`) which is perfectly fine for any global address.
@daniel-k daniel-k requested a review from miri64 February 8, 2018 12:57
@smlng smlng added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking GNRC CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 8, 2018
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

Didn't test, but the code looks sane.

@miri64 miri64 merged commit 8c632b1 into RIOT-OS:master Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants