-
Notifications
You must be signed in to change notification settings - Fork 15
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
internal/*: add PREF64 support #42
Conversation
go.mod
Outdated
@@ -31,3 +31,5 @@ require ( | |||
golang.org/x/text v0.10.0 // indirect | |||
google.golang.org/protobuf v1.30.0 // indirect | |||
) | |||
|
|||
replace github.com/mdlayher/ndp => github.com/jmbaur/ndp v0.0.0-20240310235550-d810a7ebc0fa |
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.
Depends on these changes. Plan is to remove this if/when the ndp changes are merged
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.
SGTM! I will happily accept this contribution and the one to ndp.
Been testing out these changes on my home network and it appears to be working well. Android's clatd is using the pref64 prefix advertised from corerad and works when tested using IPv4 literals. Also tested on a generic linux workstation using tcpdump and changes from this patch with the following results (pref64 option at the bottom): $ sudo tcpdump --interface wlan0 -v "icmp6"
tcpdump: listening on wlan0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
...redacted...
23:42:41.224999 IP6 (flowlabel 0x59d0f, hlim 255, next-header ICMPv6 (58) payload length: 16) hostname > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16
source link-address option (1), length 8 (1): redacted
23:42:41.306765 IP6 (flowlabel 0x18f6f, hlim 255, next-header ICMPv6 (58) payload length: 152) _gateway > hostname: [icmp6 sum ok] ICMP6, router advertisement, length 152
hop limit 64, Flags [none], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
prefix info option (3), length 32 (4): redacted::/64, Flags [onlink, auto], valid time 86400s, pref. time 14400s
prefix info option (3), length 32 (4): redacted::/64, Flags [onlink, auto], valid time 86400s, pref. time 14400s
rdnss option (25), length 24 (3): lifetime 1200s, addr: redacted
dnssl option (31), length 24 (3): lifetime 1200s, domain(s): home.arpa.
source link-address option (1), length 8 (1): redacted
pref64 info option (38), length 16 (2): 64:ff9b::/96 (plc 0), lifetime 600s |
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.
LGTM overall so far. Let's sync up on your NDP PR and figure out where the maxInterval calculation should live (I am leaning CoreRAD) and then we can circle back on this one.
I'll plan to tag a new release once this is merged so we can both deploy it in NixOS.
go.mod
Outdated
@@ -31,3 +31,5 @@ require ( | |||
golang.org/x/text v0.10.0 // indirect | |||
google.golang.org/protobuf v1.30.0 // indirect | |||
) | |||
|
|||
replace github.com/mdlayher/ndp => github.com/jmbaur/ndp v0.0.0-20240310235550-d810a7ebc0fa |
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.
SGTM! I will happily accept this contribution and the one to ndp.
3b87369
to
6e88dd9
Compare
Adds initial PREF64 support. Multiple prefixes can be added on an interface, defaulting to a single prefix of the RFC 6052 reserved value "64:ff9b::/96" if the config's TOML section is defined but the prefix value is either unset or empty.
Cherry-picked to main with a couple of minor nits and to fix the formatting, thank you!! I'll cut a new tag. |
Thanks for the thorough reviews! |
@jmbaur It would appear I haven't reinstalled nix on this machine so I can't easily bump the NixOS package right now; would you be willing to submit a PR for that and I can +1 it as the maintainer? I'll work on getting the tooling set up in the meantime. |
Sure thing, PR is here: NixOS/nixpkgs#295391 |
Great stuff - you managed to beat radvd to shipping a release with PREF64! I've marked the Alpine package as out of date upstream. I'm not the maintainer but hopefully this new release will get picked up soon in Edge and I'll do some testing. |
Adds initial PREF64 support. Multiple prefixes can be added on an interface, defaulting to a single prefix of the RFC 6052 reserved value "64:ff9b::/96" if the config's TOML section is defined but the prefix value is either unset or empty.
Closes #24