Source-Changes-HG archive

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

[src/trunk]: src/sys/net Don't check parent capabilities when a parent interf...



details:   https://anonhg.NetBSD.org/src/rev/26604b5a250a
branches:  trunk
changeset: 349184:26604b5a250a
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Nov 28 00:39:03 2016 +0000

description:
Don't check parent capabilities when a parent interface hasn't been
assigned.

diffstat:

 sys/net/if_vlan.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 28dc8735127b -r 26604b5a250a sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Sun Nov 27 19:04:40 2016 +0000
+++ b/sys/net/if_vlan.c Mon Nov 28 00:39:03 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.91 2016/08/07 17:38:34 christos Exp $    */
+/*     $NetBSD: if_vlan.c,v 1.92 2016/11/28 00:39:03 joerg Exp $       */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.91 2016/08/07 17:38:34 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.92 2016/11/28 00:39:03 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -571,6 +571,10 @@
        case SIOCSIFCAP:
                ifcr = data;
                /* make sure caps are enabled on parent */
+               if (ifv->ifv_p == NULL) {
+                       error = EINVAL;
+                       break;
+               }
                if ((ifv->ifv_p->if_capenable & ifcr->ifcr_capenable) !=
                    ifcr->ifcr_capenable) {
                        error = EINVAL;



Home | Main Index | Thread Index | Old Index