Page MenuHomeFreeBSD

D24776.id71603.diff
No OneTemporary

D24776.id71603.diff

Index: head/sys/net/route.h
===================================================================
--- head/sys/net/route.h
+++ head/sys/net/route.h
@@ -392,8 +392,6 @@
/*
* Note the following locking behavior:
*
- * rtalloc1() returns a locked rtentry
- *
* rtfree() and RTFREE_LOCKED() require a locked rtentry
*
* RTFREE() uses an unlocked entry.
@@ -414,14 +412,12 @@
/* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */
/* Thes are used by old code not yet converted to use multiple FIBS */
-struct rtentry *rtalloc1(struct sockaddr *, int, u_long);
int rtinit(struct ifaddr *, int, int);
/* XXX MRT NEW VERSIONS THAT USE FIBs
* For now the protocol indepedent versions are the same as the AF_INET ones
* but this will change..
*/
-struct rtentry *rtalloc1_fib(struct sockaddr *, int, u_long, u_int);
int rtioctl_fib(u_long, caddr_t, u_int);
int rtrequest_fib(int, struct sockaddr *,
struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int);
Index: head/sys/net/route.c
===================================================================
--- head/sys/net/route.c
+++ head/sys/net/route.c
@@ -420,76 +420,6 @@
}
/*
- * Look up the route that matches the address given
- * Or, at least try.. Create a cloned route if needed.
- *
- * The returned route, if any, is locked.
- */
-struct rtentry *
-rtalloc1(struct sockaddr *dst, int report, u_long ignflags)
-{
-
- return (rtalloc1_fib(dst, report, ignflags, RT_DEFAULT_FIB));
-}
-
-struct rtentry *
-rtalloc1_fib(struct sockaddr *dst, int report, u_long ignflags,
- u_int fibnum)
-{
- RIB_RLOCK_TRACKER;
- struct rib_head *rh;
- struct radix_node *rn;
- struct rtentry *newrt;
- struct rt_addrinfo info;
- int err = 0, msgtype = RTM_MISS;
-
- KASSERT((fibnum < rt_numfibs), ("rtalloc1_fib: bad fibnum"));
- rh = rt_tables_get_rnh(fibnum, dst->sa_family);
- newrt = NULL;
- if (rh == NULL)
- goto miss;
-
- /*
- * Look up the address in the table for that Address Family
- */
- if ((ignflags & RTF_RNH_LOCKED) == 0)
- RIB_RLOCK(rh);
-#ifdef INVARIANTS
- else
- RIB_LOCK_ASSERT(rh);
-#endif
- rn = rh->rnh_matchaddr(dst, &rh->head);
- if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
- newrt = RNTORT(rn);
- RT_LOCK(newrt);
- RT_ADDREF(newrt);
- if ((ignflags & RTF_RNH_LOCKED) == 0)
- RIB_RUNLOCK(rh);
- return (newrt);
-
- } else if ((ignflags & RTF_RNH_LOCKED) == 0)
- RIB_RUNLOCK(rh);
- /*
- * Either we hit the root or could not find any match,
- * which basically means: "cannot get there from here".
- */
-miss:
- RTSTAT_INC(rts_unreach);
-
- if (report) {
- /*
- * If required, report the failure to the supervising
- * Authorities.
- * For a delete, this is not an error. (report == 0)
- */
- bzero(&info, sizeof(info));
- info.rti_info[RTAX_DST] = dst;
- rt_missmsg_fib(msgtype, &info, 0, err, fibnum);
- }
- return (newrt);
-}
-
-/*
* Remove a reference count from an rtentry.
* If the count gets low enough, take it out of the routing table
*/

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 7:07 AM (12 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28551011
Default Alt Text
D24776.id71603.diff (2 KB)

Event Timeline