Module Name: src
Committed By: riz
Date: Sun Mar 31 20:20:08 UTC 2013
Modified Files:
src/sys/netinet6 [netbsd-6]: udp6_output.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #853):
sys/netinet6/udp6_output.c: revision 1.44
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.43.8.1 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.43.8.1
--- src/sys/netinet6/udp6_output.c:1.43 Sat Sep 24 17:22:14 2011
+++ src/sys/netinet6/udp6_output.c Sun Mar 31 20:20:07 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.43.8.1 2013/03/31 20:20:07 riz 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.43.8.1 2013/03/31 20:20:07 riz 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)) {