From owner-cvs-all@FreeBSD.ORG Thu Aug 3 09:59:09 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFEEC16A4E6; Thu, 3 Aug 2006 09:59:09 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8137C43D46; Thu, 3 Aug 2006 09:59:09 +0000 (GMT) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k739x9rT007208; Thu, 3 Aug 2006 09:59:09 GMT (envelope-from yar@repoman.freebsd.org) Received: (from yar@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k739x9N6007207; Thu, 3 Aug 2006 09:59:09 GMT (envelope-from yar) Message-Id: <200608030959.k739x9N6007207@repoman.freebsd.org> From: Yar Tikhiy Date: Thu, 3 Aug 2006 09:59:09 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/net if_vlan.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 09:59:10 -0000 yar 2006-08-03 09:59:09 UTC FreeBSD src repository Modified files: sys/net if_vlan.c Log: Should vlan_input() ever be called with ifp pointing to a non-Ethernet interface, do not just assign -1 to tag because it breaks the logic of the code to follow. The better way is to handle this case as an unsupported protocol and return unless INVARIANTS is in effect and we can panic. Panic is good there because the scenario can happen only because of a coding error elsewhere. We also should show the interface name in the panic message for easier debugging of the problem, should it ever emerge. Submitted by: qingli (initially) Revision Changes Path 1.109 +5 -4 src/sys/net/if_vlan.c