From owner-freebsd-hackers Mon Dec 30 14:21:36 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA24824 for hackers-outgoing; Mon, 30 Dec 1996 14:21:36 -0800 (PST) Received: from ravenock.cybercity.dk (ravenock.cybercity.dk [194.16.57.32]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id OAA24651 for ; Mon, 30 Dec 1996 14:18:56 -0800 (PST) Received: (from sos@localhost) by ravenock.cybercity.dk (8.8.4/8.7.3) id XAA00733; Mon, 30 Dec 1996 23:19:12 +0100 (MET) Message-Id: <199612302219.XAA00733@ravenock.cybercity.dk> Subject: Re: divert code not thread/smp compatible In-Reply-To: <199612301928.GAA29162@profane.iq.org> from Julian Assange at "Dec 31, 96 06:28:55 am" To: proff@iq.org (Julian Assange) Date: Mon, 30 Dec 1996 23:19:12 +0100 (MET) Cc: hackers@FreeBSD.ORG From: sos@FreeBSD.ORG Reply-to: sos@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In reply to Julian Assange who wrote: > > /* > * ip_input() and ip_output() set this secret value before calling us to > * let us know which divert port to divert a packet to; this is done so > * we can use the existing prototype for struct protosw's pr_input(). > * This is stored in host order. > */ > u_short ip_divert_port; > > /* > * We set this value to a non-zero port number when we want the call to > * ip_fw_chk() in ip_input() or ip_output() to ignore ``divert '' > * chain entries. This is stored in host order. > */ > u_short ip_divert_ignore; > > Is this an acceptable trick in the FreeBSD kernel, passing parameters > with global variables? No, its just bad, bad.... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end ..