NetBSD/sys/netbt
dyoung c308b1c661 Here are various changes designed to protect against bad IPv4
routing caused by stale route caches (struct route).  Route caches
are sprinkled throughout PCBs, the IP fast-forwarding table, and
IP tunnel interfaces (gre, gif, stf).

Stale IPv6 and ISO route caches will be treated by separate patches.

Thank you to Christoph Badura for suggesting the general approach
to invalidating route caches that I take here.

Here are the details:

Add hooks to struct domain for tracking and for invalidating each
domain's route caches: dom_rtcache, dom_rtflush, and dom_rtflushall.

Introduce helper subroutines, rtflush(ro) for invalidating a route
cache, rtflushall(family) for invalidating all route caches in a
routing domain, and rtcache(ro) for notifying the domain of a new
cached route.

Chain together all IPv4 route caches where ro_rt != NULL.  Provide
in_rtcache() for adding a route to the chain.  Provide in_rtflush()
and in_rtflushall() for invalidating IPv4 route caches.  In
in_rtflush(), set ro_rt to NULL, and remove the route from the
chain.  In in_rtflushall(), walk the chain and remove every route
cache.

In rtrequest1(), call rtflushall() to invalidate route caches when
a route is added.

In gif(4), discard the workaround for stale caches that involves
expiring them every so often.

Replace the pattern 'RTFREE(ro->ro_rt); ro->ro_rt = NULL;' with a
call to rtflush(ro).

Update ipflow_fastforward() and all other users of route caches so
that they expect a cached route, ro->ro_rt, to turn to NULL.

Take care when moving a 'struct route' to rtflush() the source and
to rtcache() the destination.

In domain initializers, use .dom_xxx tags.

KNF here and there.
2006-12-09 05:33:04 +00:00
..
bluetooth.h __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
bt_proto.c Here are various changes designed to protect against bad IPv4 2006-12-09 05:33:04 +00:00
bt_sysctl.c BluetootH SCO Audio update. 2006-08-27 11:41:58 +00:00
files.netbt update to bluetooth device attachment: 2006-09-10 15:45:55 +00:00
hci_event.c Endian issues: 2006-09-11 22:12:39 +00:00
hci_ioctl.c Endian issues: 2006-09-11 22:12:39 +00:00
hci_link.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
hci_misc.c
hci_socket.c Reduce memory usage by not allocating a chunk for a bitmask. 2006-10-01 10:13:54 +00:00
hci_unit.c update to bluetooth device attachment: 2006-09-10 15:45:55 +00:00
hci.h __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
l2cap_lower.c
l2cap_misc.c
l2cap_signal.c Do not use the output buffer to store data unless we mean it to go in 2006-12-07 21:36:27 +00:00
l2cap_socket.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
l2cap_upper.c
l2cap.h fix silent dependencies (uintN_t) 2006-10-01 06:08:08 +00:00
Makefile
rfcomm_dlc.c
rfcomm_session.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
rfcomm_socket.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
rfcomm_upper.c
rfcomm.h fix silent dependencies (uintN_t) 2006-10-01 06:08:08 +00:00
sco_socket.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
sco_upper.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
sco.h Bluetooth fixes by Iain Hibbert: 2006-07-26 10:20:56 +00:00