summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/udp6_usrreq.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-04-09 02:22:49 +0000
committerbz <bz@FreeBSD.org>2011-04-09 02:22:49 +0000
commit6eed38b749e4cfed384b77916273d9e115b4071f (patch)
tree59d47afcc00ebfcbe5c6ccb86f475c98ceea3de7 /sys/netinet6/udp6_usrreq.c
parent1710f285d41e00787d848603ddb97004fb6483dd (diff)
downloadFreeBSD-src-6eed38b749e4cfed384b77916273d9e115b4071f.zip
FreeBSD-src-6eed38b749e4cfed384b77916273d9e115b4071f.tar.gz
Remove a check in udp6_send() that prevented v4-mapped v6 addresses from
working. We store v4 and v6 addresses as a union but for v4-mapped addresses only store the 32bits w/o the ::ffff: word. That failed the check as for example 127.0.0.1 would be ::7f00:1 rather than ::ffff:7f00:1 and the IN6_IS_ADDR_V4MAPPED() never worked here. Given we can hardly get here with an unbound local address or invalid inp_vflags remove the check. Reported by: tuexen Reviewed by: tuexen MFC after: 3 days
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r--sys/netinet6/udp6_usrreq.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index b048665..04ba3c5 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -1045,18 +1045,6 @@ udp6_send(struct socket *so, int flags, struct mbuf *m,
if (hasv4addr) {
struct pr_usrreqs *pru;
- if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) &&
- !IN6_IS_ADDR_V4MAPPED(&inp->in6p_laddr)) {
- /*
- * When remote addr is IPv4-mapped address,
- * local addr should not be an IPv6 address;
- * since you cannot determine how to map IPv6
- * source address to IPv4.
- */
- error = EINVAL;
- goto out;
- }
-
/*
* XXXRW: We release UDP-layer locks before calling
* udp_send() in order to avoid recursion. However,
@@ -1081,7 +1069,6 @@ udp6_send(struct socket *so, int flags, struct mbuf *m,
#endif
error = udp6_output(inp, m, addr, control, td);
#ifdef INET
-out:
#endif
INP_WUNLOCK(inp);
INP_INFO_WUNLOCK(&V_udbinfo);
OpenPOWER on IntegriCloud