freebsd-dev/sys/netinet6
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
..
dest6.c
frag6.c frag6: use callout(9) directly instead of pr_slowtimo 2022-08-17 11:50:31 -07:00
icmp6.c mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
icmp6.h
in6_cksum.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in6_fib_algo.c Fix dpdk/ldradix fib lookup algorithm preference calculation. 2021-03-07 22:17:53 +00:00
in6_fib.c routing: refactor private KPI 2022-08-01 10:02:12 +00:00
in6_fib.h Add modular fib lookup framework. 2020-12-25 11:33:17 +00:00
in6_gif.c net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros 2021-03-04 20:56:48 +01:00
in6_ifattach.c nd6: Mark several callouts as MPSAFE 2021-08-09 13:27:52 -04:00
in6_ifattach.h
in6_jail.c sysent: Get rid of bogus sys/sysent.h include. 2022-05-28 20:52:17 +03:00
in6_mcast.c in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch 2021-12-06 14:33:23 -08:00
in6_pcb.c in_pcb: use jenkins hash over the entire IPv6 (or IPv4) address 2021-12-26 10:47:28 -08:00
in6_pcb.h Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
in6_proto.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
in6_rmx.c routing: add nhop(9) kpi. 2022-08-01 08:52:26 +00:00
in6_rss.c Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
in6_rss.h Implement flowid calculation for outbound connections to balance 2020-10-18 17:15:47 +00:00
in6_src.c netinet6: simplify selectroute() 2022-07-08 11:27:16 +00:00
in6_var.h netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
in6.c mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
in6.h protosw: separate pr_input and pr_ctlinput out of protosw 2022-08-17 11:50:31 -07:00
ip6_ecn.h
ip6_fastfwd.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip6_forward.c ipv6: quit dropping packets looping back on p2p interfaces 2020-08-31 01:45:48 +00:00
ip6_gre.c udp: allow udp_tun_func_t() to indicate it did not eat the packet 2022-04-12 10:04:59 +02:00
ip6_id.c
ip6_input.c ip6_input: explicitly include <sys/eventhandler.h> 2022-08-17 14:54:46 -07:00
ip6_mroute.c ip6_mroute: Mark a variable only used in a debug trace as unused. 2022-04-06 16:45:29 -07:00
ip6_mroute.h
ip6_output.c netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00
ip6_var.h frag6: use callout(9) directly instead of pr_slowtimo 2022-08-17 11:50:31 -07:00
ip6.h
ip6protosw.h
ip_fw_nat64.h
ip_fw_nptv6.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
mld6_var.h mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
mld6.c mld6: use callout(9) directly instead of pr_slowtimo, pr_fasttimo 2022-08-17 11:50:31 -07:00
mld6.h
nd6_nbr.c netinet6: fix ndp proxying 2022-05-30 10:53:33 +00:00
nd6_rtr.c netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
nd6.c netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
nd6.h netinet6: fix SIOCSPFXFLUSH_IN6 by skipping manually-configured prefixes 2022-08-24 13:59:13 +00:00
pim6_var.h
pim6.h
raw_ip6.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
raw_ip6.h
route6.c
scope6_var.h Make net.inet6.ip6.deembed_scopeid behaviour default & remove sysctl. 2020-08-15 11:37:44 +00:00
scope6.c ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
sctp6_usrreq.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
sctp6_var.h protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
send.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
send.h
tcp6_var.h protosw: separate pr_input and pr_ctlinput out of protosw 2022-08-17 11:50:31 -07:00
udp6_usrreq.c protosw: refactor protosw and domain static declaration and load 2022-08-17 11:50:32 -07:00
udp6_var.h