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/0a86522d496a
branches:  netbsd-8
changeset: 434744:0a86522d496a
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Mar 15 11:27:25 2018 +0000

description:
Pull up following revision(s) (requested by knakahara in ticket #632):
        sys/netinet6/in6_gif.c: revision 1.91
Fix error checking in in6_gif_ctlinput().
if_gif.c:r1.133 introduces gif_update_variant() which ensure ifp->if_flags
is set IFF_RUNNING when gif_softc->gif_var->gv_{psrc,pdst} are not null.
So, in6_gif_ctlinput() is not required IFF_RUNNING checking. In contrast,
it is required gv_{psrc,pdst} NULL checking.

diffstat:

 sys/netinet6/in6_gif.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 17ad0dbc2257 -r 0a86522d496a sys/netinet6/in6_gif.c
--- a/sys/netinet6/in6_gif.c    Thu Mar 15 11:24:46 2018 +0000
+++ b/sys/netinet6/in6_gif.c    Thu Mar 15 11:27:25 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_gif.c,v 1.85.6.4 2018/02/11 21:17:34 snj Exp $     */
+/*     $NetBSD: in6_gif.c,v 1.85.6.5 2018/03/15 11:27:25 bouyer Exp $  */
 /*     $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $        */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.85.6.4 2018/02/11 21:17:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.85.6.5 2018/03/15 11:27:25 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -459,9 +459,11 @@
        if (!ip6)
                return NULL;
 
-       if ((sc->gif_if.if_flags & IFF_RUNNING) == 0)
+       var = gif_getref_variant(sc, &psref);
+       if (var->gv_psrc == NULL || var->gv_pdst == NULL) {
+               gif_putref_variant(var, &psref);
                return NULL;
-       var = gif_getref_variant(sc, &psref);
+       }
        if (var->gv_psrc->sa_family != AF_INET6) {
                gif_putref_variant(var, &psref);
                return NULL;



Home | Main Index | Thread Index | Old Index