ip6: retire in6_selectroute_fib() as promised 8 years ago
In r231852 I added in6_selectroute_fib() as a compat function with the fibnum as an extra argument compared to in6_selectroute() to keep the KPI stable. Way too late retire this function again and add the fib to in6_selectroute() which also only has a single consumer now and was an orphan function before.
This commit is contained in:
parent
98b486dc7a
commit
8483fce695
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358575
@ -640,10 +640,10 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
if (dstsock->sin6_addr.s6_addr32[0] == 0 &&
|
||||
dstsock->sin6_addr.s6_addr32[1] == 0 &&
|
||||
!IN6_IS_ADDR_LOOPBACK(&dstsock->sin6_addr)) {
|
||||
printf("in6_selectroute: strange destination %s\n",
|
||||
printf("%s: strange destination %s\n", __func__,
|
||||
ip6_sprintf(ip6buf, &dstsock->sin6_addr));
|
||||
} else {
|
||||
printf("in6_selectroute: destination = %s%%%d\n",
|
||||
printf("%s: destination = %s%%%d\n", __func__,
|
||||
ip6_sprintf(ip6buf, &dstsock->sin6_addr),
|
||||
dstsock->sin6_scope_id); /* for debug */
|
||||
}
|
||||
@ -895,25 +895,9 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Public wrapper function to selectroute().
|
||||
*
|
||||
* XXX-BZ in6_selectroute() should and will grow the FIB argument. The
|
||||
* in6_selectroute_fib() function is only there for backward compat on stable.
|
||||
*/
|
||||
/* Public wrapper function to selectroute(). */
|
||||
int
|
||||
in6_selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
struct ip6_moptions *mopts, struct route_in6 *ro,
|
||||
struct ifnet **retifp, struct rtentry **retrt)
|
||||
{
|
||||
|
||||
return (selectroute(dstsock, opts, mopts, ro, retifp,
|
||||
retrt, 0, RT_DEFAULT_FIB));
|
||||
}
|
||||
|
||||
#ifndef BURN_BRIDGES
|
||||
int
|
||||
in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
struct ip6_moptions *mopts, struct route_in6 *ro,
|
||||
struct ifnet **retifp, struct rtentry **retrt, u_int fibnum)
|
||||
{
|
||||
@ -921,7 +905,6 @@ in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
|
||||
return (selectroute(dstsock, opts, mopts, ro, retifp,
|
||||
retrt, 0, fibnum));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Default hop limit selection. The precedence is as follows:
|
||||
|
@ -709,7 +709,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
|
||||
dst_sa.sin6_len = sizeof(dst_sa);
|
||||
dst_sa.sin6_addr = ip6->ip6_dst;
|
||||
}
|
||||
error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp,
|
||||
error = in6_selectroute(&dst_sa, opt, im6o, ro, &ifp,
|
||||
&rt, fibnum);
|
||||
if (error != 0) {
|
||||
IP6STAT_INC(ip6s_noroute);
|
||||
|
@ -416,10 +416,7 @@ int in6_selectsrc_addr(uint32_t, const struct in6_addr *,
|
||||
uint32_t, struct ifnet *, struct in6_addr *, int *);
|
||||
int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *,
|
||||
struct ip6_moptions *, struct route_in6 *, struct ifnet **,
|
||||
struct rtentry **);
|
||||
int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *,
|
||||
struct ip6_moptions *, struct route_in6 *, struct ifnet **,
|
||||
struct rtentry **, u_int);
|
||||
struct rtentry **, u_int);
|
||||
u_int32_t ip6_randomid(void);
|
||||
u_int32_t ip6_randomflowlabel(void);
|
||||
void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset);
|
||||
|
Loading…
Reference in New Issue
Block a user