Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Consider a mapped IPv4 address of 0.0.0.0 as un...
details: https://anonhg.NetBSD.org/src/rev/f085cc4b3b74
branches: trunk
changeset: 757225:f085cc4b3b74
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Aug 20 15:01:11 2010 +0000
description:
Consider a mapped IPv4 address of 0.0.0.0 as unspecified. This allows
using mapped IPv4 address with connect without preceding bind.
diffstat:
sys/netinet6/in6_pcb.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 5e46cb183e73 -r f085cc4b3b74 sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c Fri Aug 20 14:59:53 2010 +0000
+++ b/sys/netinet6/in6_pcb.c Fri Aug 20 15:01:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_pcb.c,v 1.110 2009/05/26 00:17:56 pooka Exp $ */
+/* $NetBSD: in6_pcb.c,v 1.111 2010/08/20 15:01:11 joerg Exp $ */
/* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.110 2009/05/26 00:17:56 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.111 2010/08/20 15:01:11 joerg Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -367,7 +367,9 @@
* If we already have a local port or a local address it means we're
* bounded.
*/
- if (in6p->in6p_lport || !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr))
+ if (in6p->in6p_lport || !(IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) ||
+ (IN6_IS_ADDR_V4MAPPED(&in6p->in6p_laddr) &&
+ in6p->in6p_laddr.s6_addr32[3] == 0))) {
return (EINVAL);
if (nam != NULL) {
Home |
Main Index |
Thread Index |
Old Index