Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/netinet6 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/d4525e476c5f
branches:  netbsd-8
changeset: 850989:d4525e476c5f
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Aug 31 11:24:03 2017 +0000

description:
Pull up following revision(s) (requested by christos in ticket #243):
        sys/netinet6/in6_src.c: revision 1.80
PR/52382: BERTRAND Joel: Fix mapped IPv4 source selection; this got broken
in the last code refactoring. in6_selectif failing is not fatal.
XXX: pullup-8

diffstat:

 sys/netinet6/in6_src.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 0c9827a8353b -r d4525e476c5f sys/netinet6/in6_src.c
--- a/sys/netinet6/in6_src.c    Thu Aug 31 11:21:43 2017 +0000
+++ b/sys/netinet6/in6_src.c    Thu Aug 31 11:24:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_src.c,v 1.79 2017/02/17 03:57:17 ozaki-r Exp $     */
+/*     $NetBSD: in6_src.c,v 1.79.6.1 2017/08/31 11:24:03 martin Exp $  */
 /*     $KAME: in6_src.c,v 1.159 2005/10/19 01:40:32 t-momose Exp $     */
 
 /*
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.79 2017/02/17 03:57:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.79.6.1 2017/08/31 11:24:03 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -461,7 +461,7 @@
        struct in6_ifaddr *ia = NULL;
        struct in6_pktinfo *pi = NULL;
        u_int32_t odstzone;
-       int error;
+       int error = 0, iferror;
 #if defined(MIP6) && NMIP > 0
        u_int8_t ip6po_usecoa = 0;
 #endif /* MIP6 && NMIP > 0 */
@@ -484,7 +484,7 @@
         * to this function (e.g., for identifying the appropriate scope zone
         * ID).
         */
-       error = in6_selectif(dstsock, opts, mopts, ro, &ifp, PSREF);
+       iferror = in6_selectif(dstsock, opts, mopts, ro, &ifp, PSREF);
        if (ifpp != NULL)
                *ifpp = ifp;
 
@@ -549,8 +549,10 @@
         * The outgoing interface is crucial in the general selection procedure
         * below.  If it is not known at this point, we fail.
         */
-       if (ifp == NULL)
+       if (ifp == NULL) {
+               error = iferror;
                goto exit;
+       }
 
        /*
         * If the address is not yet determined, choose the best one based on



Home | Main Index | Thread Index | Old Index