From 9183d53dd706fc6cf2da442eac0d791630796da2 Mon Sep 17 00:00:00 2001 From: sam Date: Thu, 30 Oct 2003 23:02:51 +0000 Subject: Overhaul routing table entry cleanup by introducing a new rtexpunge routine that takes a locked routing table reference and removes all references to the entry in the various data structures. This eliminates instances of recursive locking and also closes races where the lock on the entry had to be dropped prior to calling rtrequest(RTM_DELETE). This also cleans up confusion where the caller held a reference to an entry that might have been reclaimed (and in some cases used that reference). Supported by: FreeBSD Foundation --- sys/net/route.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/net/route.h') diff --git a/sys/net/route.h b/sys/net/route.h index bec78bd..2c60780 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -297,6 +297,7 @@ int rt_setgate(struct rtentry *, struct sockaddr *, struct sockaddr *); void rtalloc_ign(struct route *, u_long); /* NB: the rtentry is returned locked */ struct rtentry *rtalloc1(struct sockaddr *, int, u_long); +int rtexpunge(struct rtentry *); void rtfree(struct rtentry *); int rtinit(struct ifaddr *, int, int); int rtioctl(u_long, caddr_t); -- cgit v1.1