opnsense-src/sys
Alexander V. Chernikov 8aafa7a027 Flush remaining routes from the routing table during VNET shutdown.
Summary:
This fixes rtentry leak for the cloned interfaces created inside the
 VNET.

Loopback teardown order is `SI_SUB_INIT_IF`, which happens after `SI_SUB_PROTO_DOMAIN` (route table teardown).
Thus, any route table operations are too late to schedule.
As the intent of the vnet teardown procedures to minimise the amount of effort by doing global cleanups instead of per-interface ones, address this by adding a relatively light-weight routing table cleanup function, `rib_flush_routes()`.
It removes all remaining routes from the routing table and schedules the deletion, which will happen later, when `rtables_destroy()` waits for the current epoch to finish.

Test Plan:
```
set_skip:set_skip_group_lo  ->  passed  [0.053s]
tail -n 200 /var/log/messages | grep rtentry
```

PR:	253998
Reported by:	rashey at superbox.pl
Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D29116

(cherry picked from commit b1d63265ac)
2021-03-13 20:19:17 +00:00
..
amd64 acpi: Make nexus_acpi quiet on amd64 and i386 2021-03-12 12:20:37 -05:00
arm arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible 2021-02-20 20:17:44 +01:00
arm64 arm64: add definition for IS_SSTEP_TRAP() 2021-03-08 10:02:42 -04:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam Do not exit ctl_be_block_worker() prematurely. 2021-03-08 21:47:22 -05:00
cddl Reimplemen FreeBSD/arm64 dtrace_gethrtime() to use the system timer. 2021-02-25 21:38:30 +00:00
compat linux: add support for SO_PEERSEC getsockopt 2021-03-02 18:43:27 +00:00
conf ice(4): Update to version 0.28.1-k 2021-03-09 14:35:54 -08:00
contrib Fix dpdk/ldradix fib lookup algorithm preference calculation. 2021-03-10 21:50:19 +00:00
crypto armv8crypto: fix AES-XTS regression introduced by ed9b7f44 2021-03-07 12:41:15 -08:00
ddb ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
dev netmap: Stop printing a line to the dmesg in netmap_init() 2021-03-12 12:20:59 -05:00
dts Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
fs Enforce net epoch in in6_selectsrc(). 2021-03-10 21:57:59 +00:00
gdb gdb(4): allow bulk write of registers 2020-12-23 14:37:05 -04:00
geom geom(4): make g_newprovider_event() return if G_P_WITHER is set 2020-12-29 14:29:59 +00:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 acpi: Make nexus_acpi quiet on amd64 and i386 2021-03-12 12:20:37 -05:00
isa Move back the isa non-PNP driver deadline to FreeBSD 14. 2021-03-08 16:02:44 -07:00
kern Restore AT_RESOLVE_BENEATH support for funlinkat(2)/unlinkat(2). 2021-03-13 04:52:01 +02:00
kgssapi State kgssapi dependency on xdr. 2020-09-17 22:29:38 +00:00
libkern Revert "Reimplement strlen" 2021-02-03 19:39:49 +00:00
mips MFC: mips: fix early kernel panic when setting up interrupt counters 2021-02-02 21:06:37 -08:00
modules zfs: update openzfs version reference to bedbc13da 2021-03-10 02:58:21 +01:00
net Flush remaining routes from the routing table during VNET shutdown. 2021-03-13 20:19:17 +00:00
net80211 net80211: fix a typo 2020-11-04 12:07:33 +00:00
netgraph netgraph/ng_car: Add color marking code 2021-02-26 13:29:39 +01:00
netinet Flush remaining routes from the routing table during VNET shutdown. 2021-03-13 20:19:17 +00:00
netinet6 Flush remaining routes from the routing table during VNET shutdown. 2021-03-13 20:19:17 +00:00
netipsec Convert unmapped mbufs before computing checksums in IPsec. 2021-01-19 11:52:00 -08:00
netpfil ipfw: add IPv6 support for sockarg opcode. 2021-03-09 11:50:48 +03:00
netsmb net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
nfs nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
nfsclient nfs: clean up empty lines in .c and .h files 2020-09-01 21:25:39 +00:00
nfsserver nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nlm nlm: clean up empty lines in .c and .h files 2020-09-01 22:14:52 +00:00
ofed 504ebd612e: kern: sonewconn: set so_options before pru_attach() 2021-02-23 22:48:42 -06:00
opencrypto opencrypto: Make cryptosoft attach silently 2021-03-12 12:21:09 -05:00
powerpc [PowerPC64] add mpr to GENERIC64 and GENERIC64LE 2021-03-09 21:09:49 -03:00
riscv riscv: fix errors in some atomic type aliases 2021-03-08 10:03:01 -04:00
rpc nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 2021-01-12 13:59:52 -08:00
security Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
sys MFC jail: Add PD_KILL to remove a prison in prison_deref(). 2021-03-12 10:48:20 -08:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests Enable running fib tests inside vnet jail. 2021-01-17 20:32:26 +00:00
tools Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
ufs FFS extattr: fix handling of the tail 2021-03-04 21:07:25 +02:00
vm uma: Update the comment above startup_alloc() to reflect reality 2021-02-28 19:31:58 -05:00
x86 x86: tsc: deprioritize TSC on VirtualBox 2021-03-12 12:43:43 -06:00
xdr xdr: clean up empty lines in .c and .h files 2020-09-01 22:13:28 +00:00
xen xen: remove .swp file from public headers 2021-01-11 18:14:11 +01:00
Makefile