summaryrefslogtreecommitdiffstats
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-10-30 23:02:51 +0000
committersam <sam@FreeBSD.org>2003-10-30 23:02:51 +0000
commit9183d53dd706fc6cf2da442eac0d791630796da2 (patch)
tree86b489ad92452a54684a5299e07cbdce8229465b /sys/net/route.h
parent778c2eee4276d3b48a83b3d80320a61f39ea8d83 (diff)
downloadFreeBSD-src-9183d53dd706fc6cf2da442eac0d791630796da2.zip
FreeBSD-src-9183d53dd706fc6cf2da442eac0d791630796da2.tar.gz
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
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h1
1 files changed, 1 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud