From fd0b2bb03e67f57c9621e756141f37febfa5e527 Mon Sep 17 00:00:00 2001 From: ume Date: Mon, 15 Jul 2002 19:25:46 +0000 Subject: - 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 --- sys/netinet6/udp6_usrreq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/netinet6/udp6_usrreq.c') 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 */ /* -- cgit v1.1