summaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
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;