From 4a05b1819a862b5d16a445d9f3e4e3bbddea370e Mon Sep 17 00:00:00 2001 From: melifaro Date: Tue, 28 Apr 2020 07:25:34 +0000 Subject: [PATCH] Eliminate now-unused parts of old routing KPI. r360292 switched most of the remaining routing customers to a new KPI, leaving a bunch of wrappers for old routing lookup functions unused. Remove them from the tree as a part of routing cleanup. Differential Revision: https://reviews.freebsd.org/D24569 --- sys/net/route.c | 22 ---------------------- sys/net/route.h | 1 - sys/netinet/in_rmx.c | 11 ----------- sys/netinet/in_var.h | 3 --- sys/netinet6/in6_rmx.c | 20 -------------------- sys/netinet6/in6_var.h | 3 --- 6 files changed, 60 deletions(-) diff --git a/sys/net/route.c b/sys/net/route.c index 88af8d9698fa..52e4a9a91d7b 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -433,28 +433,6 @@ sys_setfib(struct thread *td, struct setfib_args *uap) return (0); } -/* - * Packet routing routines. - */ -void -rtalloc_ign_fib(struct route *ro, u_long ignore, u_int fibnum) -{ - struct rtentry *rt; - - if (ro->ro_nh != NULL) { - if (NH_IS_VALID(ro->ro_nh)) - return; - NH_FREE(ro->ro_nh); - ro->ro_nh = NULL; - } - rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, fibnum); - if (rt != NULL) { - ro->ro_nh = rt->rt_nhop; - nhop_ref_object(rt->rt_nhop); - RT_UNLOCK(rt); - } -} - /* * Look up the route that matches the address given * Or, at least try.. Create a cloned route if needed. diff --git a/sys/net/route.h b/sys/net/route.h index e52d50221362..73f091d50f6f 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -503,7 +503,6 @@ int rtinit(struct ifaddr *, int, int); * For now the protocol indepedent versions are the same as the AF_INET ones * but this will change.. */ -void rtalloc_ign_fib(struct route *ro, u_long ignflags, u_int fibnum); 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 *, diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c index 758b9e9f508e..3ad50c37ef17 100644 --- a/sys/netinet/in_rmx.c +++ b/sys/netinet/in_rmx.c @@ -257,14 +257,3 @@ in_ifadown(struct ifaddr *ifa, int delete) ifa->ifa_flags &= ~IFA_ROUTE; /* XXXlocking? */ } -/* - * inet versions of rt functions. These have fib extensions and - * for now will just reference the _fib variants. - * eventually this order will be reversed, - */ -void -in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum) -{ - rtalloc_ign_fib(ro, ignflags, fibnum); -} - diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 02a9df7346bf..eeeba62af361 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -471,9 +471,6 @@ struct mbuf *ip_tryforward(struct mbuf *); void *in_domifattach(struct ifnet *); void in_domifdetach(struct ifnet *, void *); - -/* XXX */ -void in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum); #endif /* _KERNEL */ /* INET6 stuff */ diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index 4621669dab91..45829ec60b5a 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -239,23 +239,3 @@ in6_rtrequest(int req, struct sockaddr *dst, struct sockaddr *gw, return (rtrequest_fib(req, dst, gw, mask, flags, ret_nrt, fibnum)); } -void -in6_rtalloc(struct route_in6 *ro, u_int fibnum) -{ - - rtalloc_ign_fib((struct route *)ro, 0ul, fibnum); -} - -void -in6_rtalloc_ign(struct route_in6 *ro, u_long ignflags, u_int fibnum) -{ - - rtalloc_ign_fib((struct route *)ro, ignflags, fibnum); -} - -struct rtentry * -in6_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum) -{ - - return (rtalloc1_fib(dst, report, ignflags, fibnum)); -} diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 63e1676b694d..1ca181d83c97 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -917,9 +917,6 @@ void in6_newaddrmsg(struct in6_ifaddr *, int); struct mbuf *ip6_tryforward(struct mbuf *); int in6_rtrequest(int, struct sockaddr *, struct sockaddr *, struct sockaddr *, int, struct rtentry **, u_int); -void in6_rtalloc(struct route_in6 *, u_int); -void in6_rtalloc_ign(struct route_in6 *, u_long, u_int); -struct rtentry *in6_rtalloc1(struct sockaddr *, int, u_long, u_int); #endif /* _KERNEL */ #endif /* _NETINET6_IN6_VAR_H_ */