summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/udp6_usrreq.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2002-07-15 19:25:46 +0000
committerume <ume@FreeBSD.org>2002-07-15 19:25:46 +0000
commitfd0b2bb03e67f57c9621e756141f37febfa5e527 (patch)
tree49e8a789ad42c69d1180ce05aabff726584cd706 /sys/netinet6/udp6_usrreq.c
parent6d76018028ca335fdd659dc55664bd839872de1d (diff)
downloadFreeBSD-src-fd0b2bb03e67f57c9621e756141f37febfa5e527.zip
FreeBSD-src-fd0b2bb03e67f57c9621e756141f37febfa5e527.tar.gz
- fixed a bug that we can't send a packet to ipv4mapped ipv6 address
using a udp6 socket without bind(2)ing. - fbsd4/430 reported from the FreeBSD team. - this fix is different from the fix reported in the above PR. i think this better, but we need some test. Obtained from: KAME MFC after: 3 weeks
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r--sys/netinet6/udp6_usrreq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 53439d0..8617d0d 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -538,6 +538,8 @@ udp6_attach(struct socket *so, int proto, struct thread *td)
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 */
/*
OpenPOWER on IntegriCloud