Lines 784-790
in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp,
Link Here
|
784 |
} |
784 |
} |
785 |
|
785 |
|
786 |
#ifdef INET |
786 |
#ifdef INET |
787 |
laddr.s_addr = INADDR_ANY; |
787 |
laddr.s_addr = INADDR_ANY; /* used by INET6+INET below too */ |
788 |
if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { |
788 |
if ((inp->inp_vflag & (INP_IPV4|INP_IPV6)) == INP_IPV4) { |
789 |
if (lsa != NULL) |
789 |
if (lsa != NULL) |
790 |
laddr = ((struct sockaddr_in *)lsa)->sin_addr; |
790 |
laddr = ((struct sockaddr_in *)lsa)->sin_addr; |
Lines 835-843
in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp,
Link Here
|
835 |
#endif |
835 |
#endif |
836 |
} else { |
836 |
} else { |
837 |
#ifdef INET6 |
837 |
#ifdef INET6 |
838 |
if ((inp->inp_vflag & INP_IPV6) != 0) |
838 |
if ((inp->inp_vflag & INP_IPV6) != 0) { |
839 |
tmpinp = in6_pcblookup_local(pcbinfo, |
839 |
tmpinp = in6_pcblookup_local(pcbinfo, |
840 |
&inp->in6p_laddr, lport, lookupflags, cred); |
840 |
&inp->in6p_laddr, lport, lookupflags, cred); |
|
|
841 |
#ifdef INET |
842 |
if (tmpinp == NULL && |
843 |
(inp->inp_vflag & INP_IPV4)) |
844 |
tmpinp = in_pcblookup_local(pcbinfo, |
845 |
laddr, lport, lookupflags, cred); |
846 |
} |
847 |
#endif |
841 |
#endif |
848 |
#endif |
842 |
#if defined(INET) && defined(INET6) |
849 |
#if defined(INET) && defined(INET6) |
843 |
else |
850 |
else |