diff options
author | ume <ume@FreeBSD.org> | 2002-07-15 19:25:46 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2002-07-15 19:25:46 +0000 |
commit | fd0b2bb03e67f57c9621e756141f37febfa5e527 (patch) | |
tree | 49e8a789ad42c69d1180ce05aabff726584cd706 /sys | |
parent | 6d76018028ca335fdd659dc55664bd839872de1d (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 2 |
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 */ /* |