-
Notifications
You must be signed in to change notification settings - Fork 208
Add support for EUI64 IPv6 addresses #1300
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
base: main
Are you sure you want to change the base?
Conversation
Previous behavior allowed for either randomizing the host part or filling it with zeros. An IPv6 address with the host part set to all zeros is reserved for router anycasts by RFC4291. Instead, we're allowing the caller to either specify the host part of the address or we randomize it if NULL.
|
Hi @ljanyst , thanks for this PR. I am curious, what inspired you to add support for using EUI64 IPv6 addresses? |
It is not the case at all. The state machine for router advertisements starts with The reasoning for the feature is explained here: #1150 |
Sorry, you are right. It is a splendid solution! I tested it and it works on my LAN with RA router. The only "but" would be that we change the signature: BaseType_t FreeRTOS_CreateIPv6Address( IPv6_Address_t * pxIPAddress,
const IPv6_Address_t * pxPrefix,
size_t uxPrefixLength,
+ const IPv6_Address_t * pxHost )
- BaseType_t xDoRandom )If the function is called with a 0 or a 1 for and Otherwise I like it, and it works well! |
|
I guess that depends on the compiler and verbosity settings. 0 is a valid value for a pointer, but 1 is extremely unlikely to be one in a hosted environment. This function was used in the code exactly once and I don't think it's likely to have been used by a external caller. On top, the previous interface actually did not make much sense. An IPv6 address with all zeros in the host part is reserved for router anycasts by RFC4291. |
htibosch
left a comment
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 checked the changes and tested them in a real hardware setup. It looks good to me and I approve it.
|
Cool, so how do we get this landed? |
Add support for EUI64 IPv6 addresses
Description
Needed to run as a server.
Test Steps
Checklist:
Related Issue
Fixes #1150
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.