From owner-cvs-src@FreeBSD.ORG Tue Nov 30 22:38:38 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D9A216A4CE; Tue, 30 Nov 2004 22:38:38 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4813B43D41; Tue, 30 Nov 2004 22:38:38 +0000 (GMT) (envelope-from mlaier@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iAUMccWv029078; Tue, 30 Nov 2004 22:38:38 GMT (envelope-from mlaier@repoman.freebsd.org) Received: (from mlaier@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iAUMccFU029077; Tue, 30 Nov 2004 22:38:38 GMT (envelope-from mlaier) Message-Id: <200411302238.iAUMccFU029077@repoman.freebsd.org> From: Max Laier Date: Tue, 30 Nov 2004 22:38:38 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern uipc_domain.c src/sys/net if.c src/sys/sys domain.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 22:38:38 -0000 mlaier 2004-11-30 22:38:37 UTC FreeBSD src repository Modified files: sys/kern uipc_domain.c sys/net if.c sys/sys domain.h Log: Implement the check I was talking about in the previous message already. Introduce domain_init_status to keep track of the init status of the domains list (surprise). 0 = uninitialized, 1 = initialized/unpopulated, 2 = initialized/done. Higher values can be used to support late addition of domains which right now "works", but is potential dangerous. I choose to only give a warning when doing so. Use domain_init_status with if_attachdomain[1]() to ensure that we have a complete domains list when we init the if_afdata array. Store the current value of domain_init_status in if_afdata_initialized. This way we can update if_afdata after a new protocol has been added (once that is allowed). Submitted by: se (with changes) Reviewed by: julian, glebius, se PR: kern/73321 (partly) Revision Changes Path 1.41 +37 -0 src/sys/kern/uipc_domain.c 1.213 +4 -4 src/sys/net/if.c 1.20 +1 -0 src/sys/sys/domain.h