NetBSD Problem Report #27260

Received: (qmail 3146 invoked by uid 605); 14 Oct 2004 13:33:19 -0000
Message-Id: <200410141302.i9ED2sCl001708@mercury.pointless.nl>
Date: Thu, 14 Oct 2004 15:02:54 +0200 (CEST)
From: Peter Postma <peter@pointless.nl>
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: peter@pointless.nl
To: gnats-bugs@gnats.NetBSD.org
Subject: Interface events in kernel shouldn't be implemented in pfil(9)
X-Send-Pr-Version: 3.95

>Number:         27260
>Category:       kern
>Synopsis:       Interface events in kernel shouldn't be implemented in pfil(9)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 14 13:34:01 +0000 2004
>Closed-Date:    
>Last-Modified:  
>Originator:     Peter Postma
>Release:        NetBSD 2.99.9
>Organization:
>Environment:
System: NetBSD mercury.pointless.nl 2.99.9 NetBSD 2.99.9 (mercury) #57: Sun Oct 10 21:06:54 CEST 2004 peter@mercury.pointless.nl:/usr/obj/sys/arch/sparc64/compile/mercury sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Problem described here:
http://marc.theaimsgroup.com/?l=netbsd-tech-net&m=109558992520060&w=2

I'm filing this PR because I don't have time to work on this now.

In short, I've two objections with interface events implemented in pfil(9):

1) pfil(9) is for packet filtering, attachment/detachment of interfaces
   and address changes have nothing to do with it.

2) The pfil(9) API is now very ugly (e.g. extra conditionals in
   pfil_run_hooks).

It works for now, but IMHO in the long term the hacks in pfil(9) should
be removed and a cleaner solution should be implemented, maybe something
like FreeBSD's EVENTHANDLER or the extending the hook_* code in kern_subr.c.

>How-To-Repeat:
Inspect sys/net/pfil.c

>Fix:
See description.
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.