Page MenuHomeFreeBSD

inet6: manally added addresses manage their own prefix
Needs ReviewPublic

Authored by roy_marples.name on Aug 23 2022, 10:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 3:04 AM
Unknown Object (File)
Fri, Oct 18, 2:09 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Oct 9 2024, 9:48 AM
Unknown Object (File)
Oct 3 2024, 9:39 AM
Unknown Object (File)
Oct 3 2024, 2:36 AM
Unknown Object (File)
Oct 2 2024, 11:12 PM

Details

Reviewers
bz
hrs
melifaro
Summary

Manage prefixes dervied from adding/deleting addresses via ioctl
seperately from those derived from Neighbor Discovery.

ndp(8) now only shows prefixes learned by Neighbor Discovery.
SIOCSPFXFLUSH_IN6 now only removes prefixes learned by Neighbor Discovery.

Test Plan

Setup rtadvd to announce a prefix on a router.
Setup a client to accept router advertisements.
Add an INET6 address outside of the advertised prefix.
Run ndp -p to only see the advertised prefix.
Run ndp -P to remove the advertised prefix keeping the manually added one.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47070
Build 43959: arc lint + arc unit

Event Timeline

  • Fix a minor issue managing the prefix with prior.

First of all, would like to thank you for rootcausing the issue & providing the solution.
I certainly agree that as of now, SIOCSPFXFLUSH_IN6 does not do what is supposed to and that needs to be fixed.

Speaking of the implementation, I have mixed feelings about removing prefixes derived from manually-assigned addresses from the prefix list. While the current code is certainly not ideal, concept of the abstraction prefix layer still set useful to me. Another thing is that I don't feel comfortable to merge such change to FreeBSD 12.

I'd rather prefer to address this specific issue in minimally-invasive way so it be easily backported and address the manual addresses & prefix list situation separately. I created D36312 which specifically fixes SIOCSPFXFLUSH_IN6 without touching routing layer. Do you have any concerns over landing the latter diff?

You've addressed my concerns, thanks.
If it lands, this revision no longer fixes anything as such but interestingly should still apply if anyone wants to go down the route of seperating this in the future.

I agree getting D36312 in first is the way to go, as it is a clean/straightforward MFC, and we can have a separate discussion/decision on this change.

Should we revisit this (with D36312 handled)?

IMO this revision can be closed, "overcome by events" :)