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)
Mon, Apr 22, 8:52 AM
Unknown Object (File)
Mon, Apr 22, 8:37 AM
Unknown Object (File)
Jan 28 2024, 4:55 AM
Unknown Object (File)
Jan 25 2024, 10:56 PM
Unknown Object (File)
Jan 12 2024, 1:03 AM
Unknown Object (File)
Dec 20 2023, 3:49 AM
Unknown Object (File)
Dec 16 2023, 1:16 AM
Unknown Object (File)
Dec 10 2023, 11:25 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 47073
Build 43962: 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" :)