summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-22 11:14:42 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-07-22 11:14:42 +0000
commitb2e0866d3715193b0c977023837a02259a3a8086 (patch)
tree8b114e0d56cd57d96e97a4032b734a43f9b5f7e4 /sys/netinet/in_pcb.c
parent29f635e12de98be359f90d690acfc1b708999d72 (diff)
Revert in_selectsrc() refactoring, it breaks IPv6.
Reported by Heiko on bugs@. ok stsp@, claudio@
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index d25c04d2293..ecdd24f21bf 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.211 2016/07/20 18:51:50 vgross Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.212 2016/07/22 11:14:41 mpi Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -525,7 +525,8 @@ in_pcbconnect(struct inpcb *inp, struct mbuf *nam)
if (sin->sin_port == 0)
return (EADDRNOTAVAIL);
- error = in_pcbselsrc(&ina, sin, inp);
+ error = in_selectsrc(&ina, sin, inp->inp_moptions, &inp->inp_route,
+ &inp->inp_laddr, inp->inp_rtableid);
if (error)
return (error);
@@ -875,14 +876,10 @@ in_pcbrtentry(struct inpcb *inp)
* an entry to the caller for later use.
*/
int
-in_pcbselsrc(struct in_addr **insrc, struct sockaddr_in *sin,
- struct inpcb *inp)
+in_selectsrc(struct in_addr **insrc, struct sockaddr_in *sin,
+ struct ip_moptions *mopts, struct route *ro, struct in_addr *laddr,
+ u_int rtableid)
{
- struct ip_moptions *mopts = inp->inp_moptions;
- struct route *ro = &inp->inp_route;
- struct in_addr *laddr = &inp->inp_laddr;
- u_int rtableid = inp->inp_rtableid;
-
struct sockaddr_in *sin2;
struct in_ifaddr *ia = NULL;