Module Name: src
Committed By: joerg
Date: Mon Nov 28 00:39:03 UTC 2016
Modified Files:
src/sys/net: if_vlan.c
Log Message:
Don't check parent capabilities when a parent interface hasn't been
assigned.
To generate a diff of this commit:
cvs rdiff -u -r1.91 -r1.92 src/sys/net/if_vlan.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/net/if_vlan.c
diff -u src/sys/net/if_vlan.c:1.91 src/sys/net/if_vlan.c:1.92
--- src/sys/net/if_vlan.c:1.91 Sun Aug 7 17:38:34 2016
+++ src/sys/net/if_vlan.c Mon Nov 28 00:39:03 2016
@@ -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 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
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;