Module Name: src
Committed By: christos
Date: Sun Jan 6 00:17:14 UTC 2013
Modified Files:
src/sys/netinet6: udp6_output.c
Log Message:
PR/47408: Anthony Mallet: sendto(2) issue with IPv6 UDP datagrams
- don't connect when the local port is 0, just set the local port number.
- remove redundant assignment
XXX: pullup-6
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/netinet6/udp6_output.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/udp6_output.c
diff -u src/sys/netinet6/udp6_output.c:1.43 src/sys/netinet6/udp6_output.c:1.44
--- src/sys/netinet6/udp6_output.c:1.43 Sat Sep 24 13:22:14 2011
+++ src/sys/netinet6/udp6_output.c Sat Jan 5 19:17:13 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udp6_output.c,v 1.43 2011/09/24 17:22:14 christos Exp $ */
+/* $NetBSD: udp6_output.c,v 1.44 2013/01/06 00:17:13 christos Exp $ */
/* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.43 2011/09/24 17:22:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.44 2013/01/06 00:17:13 christos Exp $");
#include "opt_inet.h"
@@ -177,8 +177,6 @@ udp6_output(struct in6pcb * const in6p,
if (sin6) {
- faddr = &sin6->sin6_addr;
-
/*
* IPv4 version of udp_output calls in_pcbconnect in this case,
* which needs splnet and affects performance.
@@ -292,10 +290,12 @@ udp6_output(struct in6pcb * const in6p,
if (error)
goto release;
- error = in6_pcbconnect(in6p, addr6, l);
+ error = in6_pcbsetport(&lsin6, in6p, l);
- if (error)
+ if (error) {
+ in6p->in6p_laddr = in6addr_any;
goto release;
+ }
}
} else {
if (IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {