NetBSD/sys/netipsec
joerg eb04733c4e Introduce new helper functions to abstract the route caching.
rtcache_init and rtcache_init_noclone lookup ro_dst and store
the result in ro_rt, taking care of the reference counting and
calling the domain specific route cache.
rtcache_free checks if a route was cashed and frees the reference.
rtcache_copy copies ro_dst of the given struct route, checking that
enough space is available and incrementing the reference count of the
cached rtentry if necessary.
rtcache_check validates that the cached route is still up. If it isn't,
it tries to look it up again. Afterwards ro_rt is either a valid again
or NULL.
rtcache_copy is used internally.

Adjust to callers of rtalloc/rtflush in the tree to check the sanity of
ro_dst first (if necessary). If it doesn't fit the expectations, free
the cache, otherwise check if the cached route is still valid. After
that combination, a single check for ro_rt == NULL is enough to decide
whether a new lookup needs to be done with a different ro_dst.
Make the route checking in gre stricter by repeating the loop check
after revalidation.
Remove some unused RADIX_MPATH code in in6_src.c. The logic is slightly
changed here to first validate the route and check RTF_GATEWAY
afterwards. This is sementically equivalent though.
etherip doesn't need sc_route_expire similiar to the gif changes from
dyoung@ earlier.

Based on the earlier patch from dyoung@, reviewed and discussed with
him.
2006-12-15 21:18:52 +00:00
..
ah_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ah.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
esp_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
esp.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
files.netipsec merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
ipcomp_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ipcomp.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ipip_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ipsec6.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ipsec_input.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
ipsec_mbuf.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
ipsec_netbsd.c integrate kauth. 2006-05-14 21:19:33 +00:00
ipsec_osdep.h clarify time scale semantic issue 2006-06-10 11:42:07 +00:00
ipsec_output.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ipsec_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
ipsec.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
ipsec.h __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
key_debug.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
key_debug.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
key_var.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
key.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
key.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
keydb.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00
keysock.c more __unused 2006-10-13 20:53:59 +00:00
keysock.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
Makefile merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
xform_ah.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
xform_esp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
xform_ipcomp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
xform_ipip.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
xform_tcp.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
xform.h Multiple inclusion protection, as suggested by christos@ on tech-kern@ 2005-12-10 23:44:08 +00:00