From owner-freebsd-net Sun Jan 20 17: 0:38 2002 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id D05EA37B41D for ; Sun, 20 Jan 2002 17:00:12 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id QAA83918; Sun, 20 Jan 2002 16:45:33 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g0L0jWL09716; Sun, 20 Jan 2002 16:45:32 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200201210045.g0L0jWL09716@arch20m.dellroad.org> Subject: Re: netgraph: how to setsockopt on ksocket node ? In-Reply-To: <135740000.1011562445@blues.viagenie.qc.ca> "from Florent Parent at Jan 20, 2002 04:34:05 pm" To: Florent Parent Date: Sun, 20 Jan 2002 16:45:32 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG, julian@elischer.org X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Florent Parent writes: > 'struct proc' member in the struct sockopt can be NULL. As per the comment > in that structure, NULL means that the calling entity is the kernel, not a > user process (my interpretation): > > struct sockopt { > enum sopt_dir sopt_dir; /* is this a get or a set? */ > int sopt_level; /* second arg of [gs]etsockopt */ > int sopt_name; /* third arg of [gs]etsockopt */ > void *sopt_val; /* fourth arg of [gs]etsockopt */ > size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */ > struct proc *sopt_p; /* calling process or null if kernel */ > }; Ah.. it's Julian's fault :-) Your fix (setting sopt.sopt_p to NULL) is already implemented in -current by Julian in revision 1.20, but he never MFC'd it. Julian: any reason 1.20 was not MFC'd? Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message