Module Name:    src
Committed By:   martin
Date:           Sat Dec  3 12:33:12 UTC 2016

Modified Files:
        src/sys/net [netbsd-7-0]: if_vlan.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1279):
        sys/net/if_vlan.c: revision 1.92
Don't check parent capabilities when a parent interface hasn't been
assigned.


To generate a diff of this commit:
cvs rdiff -u -r1.70.2.3 -r1.70.2.3.2.1 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.70.2.3 src/sys/net/if_vlan.c:1.70.2.3.2.1
--- src/sys/net/if_vlan.c:1.70.2.3	Thu Apr 23 19:23:45 2015
+++ src/sys/net/if_vlan.c	Sat Dec  3 12:33:12 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vlan.c,v 1.70.2.3 2015/04/23 19:23:45 snj Exp $	*/
+/*	$NetBSD: if_vlan.c,v 1.70.2.3.2.1 2016/12/03 12:33:12 martin 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.70.2.3 2015/04/23 19:23:45 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.70.2.3.2.1 2016/12/03 12:33:12 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -550,6 +550,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;

Reply via email to