Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   joerg
Date:           Fri Dec 15 21:18:57 UTC 2006

Modified Files:
        src/sys/dist/ipf/netinet: ip_fil_netbsd.c
        src/sys/dist/pf/net: pf.c
        src/sys/net: if_etherip.c if_etherip.h if_gre.c if_stf.c route.c
            route.h
        src/sys/netatalk: ddp_input.c ddp_usrreq.c
        src/sys/netinet: in_gif.c in_pcb.c ip_etherip.c ip_flow.c ip_icmp.c
            ip_input.c ip_output.c tcp_input.c
        src/sys/netinet6: frag6.c icmp6.c in6_gif.c in6_pcb.c in6_src.c
            ip6_etherip.c ip6_forward.c ip6_input.c ip6_output.c ipsec.c
            nd6_nbr.c
        src/sys/netipsec: ipsec_output.c key.c
        src/sys/netiso: clnp_er.c clnp_raw.c clnp_subr.c if_eon.c iso_pcb.c
            tp_iso.c
        src/sys/netkey: key.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -r1.29 -r1.30 src/sys/dist/ipf/netinet/ip_fil_netbsd.c
cvs rdiff -r1.33 -r1.34 src/sys/dist/pf/net/pf.c
cvs rdiff -r1.3 -r1.4 src/sys/net/if_etherip.c
cvs rdiff -r1.1 -r1.2 src/sys/net/if_etherip.h
cvs rdiff -r1.80 -r1.81 src/sys/net/if_gre.c
cvs rdiff -r1.55 -r1.56 src/sys/net/if_stf.c
cvs rdiff -r1.82 -r1.83 src/sys/net/route.c
cvs rdiff -r1.48 -r1.49 src/sys/net/route.h
cvs rdiff -r1.11 -r1.12 src/sys/netatalk/ddp_input.c
cvs rdiff -r1.20 -r1.21 src/sys/netatalk/ddp_usrreq.c
cvs rdiff -r1.52 -r1.53 src/sys/netinet/in_gif.c
cvs rdiff -r1.111 -r1.112 src/sys/netinet/in_pcb.c
cvs rdiff -r1.2 -r1.3 src/sys/netinet/ip_etherip.c
cvs rdiff -r1.37 -r1.38 src/sys/netinet/ip_flow.c
cvs rdiff -r1.106 -r1.107 src/sys/netinet/ip_icmp.c
cvs rdiff -r1.239 -r1.240 src/sys/netinet/ip_input.c
cvs rdiff -r1.170 -r1.171 src/sys/netinet/ip_output.c
cvs rdiff -r1.258 -r1.259 src/sys/netinet/tcp_input.c
cvs rdiff -r1.32 -r1.33 src/sys/netinet6/frag6.c src/sys/netinet6/in6_src.c
cvs rdiff -r1.124 -r1.125 src/sys/netinet6/icmp6.c
cvs rdiff -r1.46 -r1.47 src/sys/netinet6/in6_gif.c
cvs rdiff -r1.79 -r1.80 src/sys/netinet6/in6_pcb.c
cvs rdiff -r1.2 -r1.3 src/sys/netinet6/ip6_etherip.c
cvs rdiff -r1.51 -r1.52 src/sys/netinet6/ip6_forward.c
cvs rdiff -r1.92 -r1.93 src/sys/netinet6/ip6_input.c
cvs rdiff -r1.108 -r1.109 src/sys/netinet6/ip6_output.c
cvs rdiff -r1.112 -r1.113 src/sys/netinet6/ipsec.c
cvs rdiff -r1.67 -r1.68 src/sys/netinet6/nd6_nbr.c
cvs rdiff -r1.18 -r1.19 src/sys/netipsec/ipsec_output.c
cvs rdiff -r1.31 -r1.32 src/sys/netipsec/key.c
cvs rdiff -r1.19 -r1.20 src/sys/netiso/clnp_er.c
cvs rdiff -r1.25 -r1.26 src/sys/netiso/clnp_raw.c
cvs rdiff -r1.23 -r1.24 src/sys/netiso/clnp_subr.c
cvs rdiff -r1.53 -r1.54 src/sys/netiso/if_eon.c
cvs rdiff -r1.34 -r1.35 src/sys/netiso/iso_pcb.c
cvs rdiff -r1.26 -r1.27 src/sys/netiso/tp_iso.c
cvs rdiff -r1.149 -r1.150 src/sys/netkey/key.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index