NetBSD/sys/netinet
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
..
Makefile Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
files.ipfilter
files.netinet Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
icmp6.h
icmp_var.h
if_arp.c fix spelling of accidentally; from Zapher 2006-11-24 19:37:02 +00:00
if_atm.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
if_atm.h
if_ether.h
if_inarp.h
igmp.c
igmp.h
igmp_var.h
in.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
in.h Add a source-address selection policy mechanism to the kernel. 2006-11-13 05:13:38 +00:00
in4_cksum.c
in_cksum.c
in_gif.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
in_gif.h New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
in_ifattach.h Add a source-address selection policy mechanism to the kernel. 2006-11-13 05:13:38 +00:00
in_offload.c move tso-by-software code to their own files. no functional changes. 2006-11-25 18:41:36 +00:00
in_offload.h move tso-by-software code to their own files. no functional changes. 2006-11-25 18:41:36 +00:00
in_pcb.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
in_pcb.h
in_pcb_hdr.h
in_proto.c Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
in_proto.h
in_route.c Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
in_route.h Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
in_selsrc.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
in_selsrc.h Add a source-address selection policy mechanism to the kernel. 2006-11-13 05:13:38 +00:00
in_systm.h
in_var.h
ip.h
ip6.h
ip_carp.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
ip_carp.h
ip_ecn.c
ip_ecn.h
ip_encap.c
ip_encap.h
ip_etherip.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ip_etherip.h New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
ip_flow.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ip_gre.c Use LIST_FOREACH(). 2006-11-16 22:54:14 +00:00
ip_gre.h
ip_icmp.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ip_icmp.h
ip_id.c
ip_input.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ip_mroute.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
ip_mroute.h
ip_output.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
ip_var.h
pim.h
pim_var.h
raw_ip.c Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket is 2006-10-25 22:49:22 +00:00
tcp.h
tcp_congctl.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
tcp_congctl.h
tcp_debug.c
tcp_debug.h
tcp_fsm.h
tcp_input.c Introduce new helper functions to abstract the route caching. 2006-12-15 21:18:52 +00:00
tcp_output.c move tso-by-software code to their own files. no functional changes. 2006-11-25 18:41:36 +00:00
tcp_sack.c
tcp_seq.h
tcp_subr.c add some more tcp mowners. 2006-12-06 09:10:45 +00:00
tcp_timer.c
tcp_timer.h
tcp_usrreq.c add some more tcp mowners. 2006-12-06 09:10:45 +00:00
tcp_var.h add some more tcp mowners. 2006-12-06 09:10:45 +00:00
tcpip.h
udp.h
udp_usrreq.c Remove ifndef COMPAT_42. No objections in tech-net. 2006-11-14 12:05:55 +00:00
udp_var.h