NetBSD/sys/net
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
..
agr make agr headers include lock.h and queue.h by themselves. 2006-10-29 22:14:14 +00:00
Makefile New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
bpf.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
bpf.h
bpf_filter.c It is not sufficient for MINDEX to just 'return 0' if the MINDEX macro 2006-10-04 20:47:43 +00:00
bpfdesc.h
bridgestp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
bsd-comp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
dlt.h
ethertypes.h
files.pf
if.c Fix spelling, s/straglers/stragglers/. 2006-12-03 19:17:41 +00:00
if.h implement ipv6 TSO. 2006-11-23 19:41:58 +00:00
if_arc.h
if_arcsubr.c
if_arp.h
if_atm.h
if_atmsubr.c
if_bridge.c New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
if_bridgevar.h
if_dl.h
if_eco.h
if_ecosubr.c
if_ether.h The change I committed to etherip was wrong. ether_snprintf doesn't make 2006-11-24 01:04:30 +00:00
if_etherip.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
if_etherip.h Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
if_ethersubr.c explain XID constants, and fix a wrong one 2006-12-10 11:39:43 +00:00
if_faith.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_faith.h
if_fddi.h
if_fddisubr.c Explain llc XID magic constants, correcting the XID header format tag. 2006-12-10 14:21:32 +00:00
if_gif.c New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
if_gif.h Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
if_gre.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
if_gre.h Cosmetic: s/g_proto/sc_proto/. 2006-11-16 22:32:38 +00:00
if_hippi.h
if_hippisubr.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_ieee1394.h
if_ieee1394subr.c
if_llc.h define some more magic LLC constants 2006-12-10 11:35:36 +00:00
if_loop.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_media.c
if_media.h
if_ppp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_ppp.h
if_pppoe.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_pppoe.h
if_pppvar.h Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
if_sl.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_slvar.h
if_sppp.h
if_spppsubr.c Correct spelling of "immediate(ly)". From Zafer. 2006-11-24 21:23:07 +00:00
if_spppvar.h
if_stf.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
if_stf.h
if_strip.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_stripvar.h
if_tap.c The change I committed to etherip was wrong. ether_snprintf doesn't make 2006-11-24 01:04:30 +00:00
if_tap.h
if_token.h
if_tokensubr.c Explain XID magic constants, correcting the format ID 2006-12-10 14:52:29 +00:00
if_tun.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_tun.h
if_types.h
if_vlan.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_vlanvar.h
net_osdep.h PR/19795: Joel Wilsson: net_osdep.h is lying. 2006-09-23 15:17:58 +00:00
netisr.h remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
netisr_dispatch.h remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
pfil.c
pfil.h
pfkeyv2.h
ppp-comp.h
ppp-deflate.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
ppp_defs.h
ppp_tty.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
radix.c Extract subroutines rn_walkfirst() and rn_walknext() from rn_walktree(). 2006-12-04 01:45:50 +00:00
radix.h don't leak kernel variable declarations to userland. 2006-10-22 20:55:09 +00:00
raw_cb.c
raw_cb.h
raw_usrreq.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
route.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
route.h Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
rtsock.c make the routing socket report the right source address in RTM_GET 2006-11-13 19:16:01 +00:00
slcompress.c
slcompress.h
slip.h
zlib.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
zlib.h