freebsd-dev/sys
Alexander V. Chernikov 8036234c72 netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes
Summary:
Currently netinet6/ code allocates IPv6 prefixes (nd_prefix) for
 both manually-assigned addresses and advertised prefixes. As a result,
 prefixes from manually-assigned prefixes can be seen in `ndp -p` list
 and be cleared via `ndp -P`. The latter relies on the SIOCSPFXFLUSH_IN6
 ioctl to clear to prefix list.
The original intent of the SIOCSPFXFLUSH_IN6 was to clear prefixes
 originated from the advertising routers:

```
1998-09-02  JINMEI, Tatuya  <jinmei@isl.rdc.toshiba.co.jp>
	* nd6.c (nd6_ioctl): added 2 new ioctls; SIOCSRTRFLUSH_IN6 and
	SIOCSPFXFLUSH_IN6. The former is to flush all default routers
	in the default router list, and the latter is to flush all the
	prefixes and the addresses derived from them in the prefix list.
```

Restore the intent by marking prefixes derived from the RA messages
with newly-added ndpr_flags.ra_derived flag and skip prefixes not marked
 with such flag during deletion and listing.

Differential Revision: https://reviews.freebsd.org/D36312
MFC after:	2 weeks
2022-08-24 13:59:13 +00:00
..
amd64 Define _NPCM and the last PC_FREEn constant in terms of _NPCPV. 2022-08-23 13:31:02 -07:00
arm Define _NPCM and the last PC_FREEn constant in terms of _NPCPV. 2022-08-23 13:31:02 -07:00
arm64 arm64: Remove unused typedef 2022-08-24 06:35:41 -06:00
bsm
cam
cddl
compat linuxkpi: unbreak linux_i2cbb 2022-08-24 16:23:37 +03:00
conf cxgbe(4): Update firmwares to 1.27.0.0. 2022-08-16 01:06:32 -07:00
contrib iwlwifi: add FreeBSD specific debugging 2022-08-17 16:11:47 +00:00
crypto
ddb
dev pmu_dmc620: Remove unused devclass from DRIVER_MODULE. 2022-08-23 09:36:12 -07:00
dts
fs Retire clone_drain_lock 2022-08-20 09:44:05 +00:00
gdb
geom
gnu
i386 Define _NPCM and the last PC_FREEn constant in terms of _NPCPV. 2022-08-23 13:31:02 -07:00
isa
kern rms: add rms_assert_rlock_ok 2022-08-23 19:15:48 +00:00
kgssapi
libkern
modules cxgbe(4): Update firmwares to 1.27.0.0. 2022-08-16 01:06:32 -07:00
net pfsync: replace struct pfsync_pkt with int flags 2022-08-22 23:46:50 +02:00
net80211 net80211: LinuxKPI 802.11: harmonize IEEE80211_VHT_MCS_* 2022-08-18 20:34:30 +00:00
netgraph protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
netinet tcp: Rack rwnd collapse. 2022-08-23 09:17:05 -04:00
netinet6 netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
netipsec protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
netpfil pfsync: replace struct pfsync_pkt with int flags 2022-08-22 23:46:50 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ibcore: Add support for RDMA/RoCE using VLAN(4) devices. 2022-08-22 10:04:26 +02:00
opencrypto
powerpc Define _NPCM and the last PC_FREEn constant in terms of _NPCPV. 2022-08-23 13:31:02 -07:00
riscv Define _NPCM and the last PC_FREEn constant in terms of _NPCPV. 2022-08-23 13:31:02 -07:00
rpc nfsd: Allow multiple instances of rpc.tlsservd 2022-08-22 13:54:24 -07:00
security protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
sys rms: add rms_assert_rlock_ok 2022-08-23 19:15:48 +00:00
teken
tests
tools sound(4): Fix order of parameters for custom equalizer band pass filter. 2022-08-22 10:04:26 +02:00
ufs
vm protosw: retire pr_drain and use EVENTHANDLER(9) directly 2022-08-17 11:50:31 -07:00
x86
xdr
xen
Makefile