diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-11 09:58:34 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-09-11 09:58:34 +0000 |
commit | 5354fe2db5847dfe54c39b7b2cf7398787706f5e (patch) | |
tree | 22eb2cb8847ec48c052707fb2e203c1f064f88c8 /sys/netinet6 | |
parent | d32d6e2b89b6ea656a84f0aca89d88ffd8763683 (diff) |
Kill selectroute().
ok claudio@
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_src.c | 34 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_var.h | 4 |
3 files changed, 7 insertions, 35 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 3b370fddfb6..e3e3b436f41 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_src.c,v 1.57 2015/09/11 07:42:35 claudio Exp $ */ +/* $OpenBSD: in6_src.c,v 1.58 2015/09/11 09:58:33 mpi Exp $ */ /* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */ /* @@ -85,9 +85,6 @@ int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, u_int); -int selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, - struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, int, u_int); /* * Return an IPv6 address, which is the most appropriate for a given @@ -297,7 +294,7 @@ in6_selectsrc(struct in6_addr **in6src, struct sockaddr_in6 *dstsock, } int -selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, +in6_selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, struct ifnet **retifp, struct rtentry **retrt, int norouteok, u_int rtableid) { @@ -310,21 +307,6 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, dst = &dstsock->sin6_addr; -#if 0 - char ip[INET6_ADDRSTRLEN]; - - 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", - inet_ntop(AF_INET6, &dstsock->sin6_addr, ip, sizeof(ip))); - } else { - printf("in6_selectroute: destination = %s%%%d\n", - inet_ntop(AF_INET6, &dstsock->sin6_addr, ip, sizeof(ip)), - dstsock->sin6_scope_id); /* for debug */ - } -#endif - /* If the caller specify the outgoing interface explicitly, use it. */ if (opts && (pi = opts->ip6po_pktinfo) != NULL && pi->ipi6_ifindex) { ifp = if_get(pi->ipi6_ifindex); @@ -504,7 +486,7 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct rtentry *rt = NULL; int error; - if ((error = selectroute(dstsock, opts, mopts, ro, retifp, + if ((error = in6_selectroute(dstsock, opts, mopts, ro, retifp, &rt, 1, rtableid)) != 0) return (error); @@ -541,16 +523,6 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, return (0); } -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, u_int rtableid) -{ - - return (selectroute(dstsock, opts, mopts, ro, retifp, retrt, 0, - rtableid)); -} - /* * Default hop limit selection. The precedence is as follows: * 1. Hoplimit value specified via ioctl. diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index c6d037fc50f..6a6fcaf8e03 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_output.c,v 1.181 2015/09/11 08:17:06 claudio Exp $ */ +/* $OpenBSD: ip6_output.c,v 1.182 2015/09/11 09:58:33 mpi Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* @@ -529,7 +529,7 @@ reroute: dstsock.sin6_len = sizeof(dstsock); ro->ro_tableid = m->m_pkthdr.ph_rtableid; if ((error = in6_selectroute(&dstsock, opt, im6o, ro, &ifp, - &rt, m->m_pkthdr.ph_rtableid)) != 0) { + &rt, 0, m->m_pkthdr.ph_rtableid)) != 0) { switch (error) { case EHOSTUNREACH: ip6stat.ip6s_noroute++; diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 3bfc659d52b..9576a2e6b6e 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.52 2015/09/11 08:17:06 claudio Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.53 2015/09/11 09:58:33 mpi Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -312,7 +312,7 @@ int in6_selectsrc(struct in6_addr **, struct sockaddr_in6 *, struct in6_addr *, u_int); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, u_int rtableid); + struct rtentry **, int, u_int rtableid); u_int32_t ip6_randomflowlabel(void); #endif /* _KERNEL */ |