opnsense-src/tests/sys/netinet
Alexander V. Chernikov 34a5582c47 Bring back redirect route expiration.
Redirect (and temporal) route expiration was broken a while ago.
This change brings route expiration back, with unified IPv4/IPv6 handling code.

It introduces net.inet.icmp.redirtimeout sysctl, allowing to set
 an expiration time for redirected routes. It defaults to 10 minutes,
 analogues with net.inet6.icmp6.redirtimeout.

Implementation uses separate file, route_temporal.c, as route.c is already
 bloated with tons of different functions.
Internally, expiration is implemented as an per-rnh callout scheduled when
 route with non-zero rt_expire time is added or rt_expire is changed.
 It does not add any overhead when no temporal routes are present.

Callout traverses entire routing tree under wlock, scheduling expired routes
 for deletion and calculating the next time it needs to be run. The rationale
 for such implemention is the following: typically workloads requiring large
 amount of routes have redirects turned off already, while the systems with
 small amount of routes will not inhibit large overhead during tree traversal.

This changes also fixes netstat -rn display of route expiration time, which
 has been broken since the conversion from kread() to sysctl.

Reviewed by:	bz
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D23075
2020-01-22 13:53:18 +00:00
..
fibs_test.sh tests/sys/netinet/fibs_test: skip selected tests when firewalls are enabled 2017-08-08 15:37:21 +00:00
ip_reass_test.c Plug a trivial memory leak. 2018-11-20 18:13:18 +00:00
Makefile Bring back redirect route expiration. 2020-01-22 13:53:18 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
redirect.py Bring back redirect route expiration. 2020-01-22 13:53:18 +00:00
redirect.sh Bring back redirect route expiration. 2020-01-22 13:53:18 +00:00
so_reuseport_lb_test.c Rename the SO_REUSEPORT_LB test file to be consistent with other tests. 2018-11-16 18:59:58 +00:00
socket_afinet.c Skip sys.netinet.socket_afinet.socket_afinet_bind_zero temporarily because it 2019-06-23 19:37:12 +00:00
tcp_user_cookie.c Initial srv before using it in bind(2) 2017-05-28 09:08:30 +00:00
udp_dontroute.c Add fibs_test:udp_dontroute6, another IPv6 multi-FIB test 2017-02-07 17:40:59 +00:00