Skip to content

statd: handle IP origin for IPv6 RA - #148

Merged
rical merged 1 commit into
kernelkit:mainfrom
rical:statd-ipv6-ra-origin
Oct 3, 2023
Merged

rical merged 1 commit into
kernelkit:mainfrom
rical:statd-ipv6-ra-origin

Conversation

@rical

@rical rical commented Sep 27, 2023

Copy link
Copy Markdown
Contributor

Handle IPv6 Router Advertisement (RA) based addresses.

If the last 64 bits of a link-local address is generated using the local MAC address of the interface, i.e. a EUI-64 based address. Then the origin is set to "link-layer".

If the addrgenmode is set to "random" instead of "eui64", then the device will generate the interface identifier portion of the address (the last 64 bits) randomly rather than deriving it from the MAC address using the EUI-64 process. This will result in a "random" origin.

Handle IPv6 Router Advertisement (RA) based addresses.

If the last 64 bits of a link-local address is generated using the
local MAC address of the interface, i.e. a EUI-64 based address. Then
the origin is set to "link-layer".

If the addrgenmode is set to "random" instead of "eui64", then the
device will generate the interface identifier portion of the address
(the last 64 bits) randomly rather than deriving it from the MAC
address using the EUI-64 process. This will result in a "random"
origin.

Signed-off-by: Richard Alpe <richard@bit42.se>

@troglobit troglobit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm 👍

Comment: we'll probably add support for "stable-privacy" later (24Q3), it's just like random, only resulting in the same address every boot.

@jovatn

jovatn commented Oct 2, 2023

Copy link
Copy Markdown
Contributor

IPv6 global addresses shows origin "other" rather than "link-layer" or "random". It should mimic the behavior of the fe80-address, as both use the same address suffix.

admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
eth0            ethernet   UP          02:00:00:00:00:00                        
                ipv6                   2001:db8:0:1:0:ff:fe00:0/64 (other)
                ipv6                   fe80::ff:fe00:0/64 (link-layer)
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/> configure
admin@infix-00-00-00:/config/> set interfaces interface eth0 ipv6 autoconf create-temporary-addresses true 
admin@infix-00-00-00:/config/> leave
admin@infix-00-00-00:/> show interfaces 
INTERFACE       PROTOCOL   STATE       DATA                                     
eth0            ethernet   UP          02:00:00:00:00:00                        
                ipv6                   2001:db8:0:1:ea05:e93e:ad9c:56df/64 (other)
                ipv6                   fe80::f9:2297:2ac:6b65/64 (random)
lo              ethernet   UP          00:00:00:00:00:00                        
                ipv4                   127.0.0.1/8 (static)
                ipv6                   ::1/128 (static)
admin@infix-00-00-00:/> 

@jovatn

jovatn commented Oct 2, 2023

Copy link
Copy Markdown
Contributor

Apologize for my comment above. Must have been tested on older image.

@troglobit

Copy link
Copy Markdown
Contributor

@rical I've just merged #152, so you can go ahead and rebase on the fixed main branch now 👍

@rical
rical merged commit e11c46d into kernelkit:main Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants