}
int
-udp6_input(mp, offp, proto)
+udp6_input(mp, offp)
struct mbuf **mp;
- int *offp, proto;
+ int *offp;
{
struct mbuf *m = *mp;
register struct ip6_hdr *ip6;
return error;
inp = (struct inpcb *)so->so_pcb;
inp->inp_vflag |= INP_IPV6;
+ if (ip6_mapped_addr_on)
+ inp->inp_vflag |= INP_IPV4;
inp->in6p_hops = -1; /* use kernel default */
inp->in6p_cksum = -1; /* just to be sure */
/*
error = in6_pcbconnect(inp, nam, p);
splx(s);
if (error == 0) {
- if (ip6_mapped_addr_on) { /* should be non mapped addr */
+ if (ip6_mapped_addr_on || (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { /* should be non mapped addr */
inp->inp_vflag &= ~INP_IPV4;
inp->inp_vflag |= INP_IPV6;
}
}
}
- if (ip6_mapped_addr_on) {
+ if (ip6_mapped_addr_on || (inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) {
int hasv4addr;
struct sockaddr_in6 *sin6 = 0;