Go to file
thorpej 7845ea0d16 Fix an ... interesting bug that resulted from namespace collision.
Description:

	- A BSD pseudo-device initialization routine is declared as
		void <pseudo-device name>attach __P((int count));
	  in ioconf.c by config(8).  main() calls these functions
	  from a table.

	- IP Filter has functions iplattach() and ipldetach() (or,
	  in the NetBSD case, were erroneously renamed ipfilterattach()
	  and ipfilterdetach()).  These functions are used to establish
	  and disestablish the IP Filter "filter rule check" hook in
	  the IP input/output stream.  They are declared:
		int iplattach __P((void));
		int ipldetach __P((void));
	  ..and are expected to return a value by iplioctl().

	- When main() calls (by sheer coincidence!) iplattach(),
	  the filter hook is established, and the IP Filter machinery
	  labeled as "initialized".  This causes all packets, whether or
	  not the user intents to use filter rules, to be passed to
	  the filter rule checker if "ipfilter" is configured into the
	  kernel.

	- As a result of the above, a kludge existed to default to
	  passing all packets (I can only assume that when this was
	  originally committed, the symptom of the bug was noticed by
	  the integrator, but the bug not actually found/fixed).

	- In iplioctl(), if the SIOCFRENB ioctl is issued with an
	  argument of "enable" (i.e. user executed "ipf -E"), iplattach()
	  will notice that the machinery is already initialized and
	  return EBUSY.

Fix:

	- Rename iplattach()/ipldetach() to ipl_enable() and ipl_disable().

	- Create a pseudo-device entry stub named ipfilterattach()
	  (NetBSD case) or iplattach() (all other).  This is a noop; none
	  of the machinery should be initialized until the caller expicitly
	  enables the filter with ipf -E.  Add a comment to note that.
1997-03-29 01:57:55 +00:00
bin pull in util.h rather than prototypeing logtwmp() locally. 1997-03-26 20:28:11 +00:00
distrib The Ariadne manpage is no longer needed (/usr/share/man/cat4/amiga/ae.0) 1997-03-28 10:53:58 +00:00
etc /etc/netstart doesn't need to be executable. 1997-03-26 07:41:55 +00:00
games Install the help file again. 1997-03-27 10:55:21 +00:00
gnu Nuke an extra ${DESTDIR}. 1997-03-27 09:52:03 +00:00
include Install files via INCS, and GC the bogus permission fixing hack. 1997-03-27 09:29:29 +00:00
lib cleanup xrefs 1997-03-27 08:20:35 +00:00
libexec 4.4lite2 update. (The one minor bugfix between 4.4lite and 4.4lite2 1997-03-28 21:55:41 +00:00
regress fix a slight bogon 1997-03-12 01:47:07 +00:00
sbin Resolve conflicts from import of 3.2alpha2. 1997-03-28 21:54:38 +00:00
share Don't make bogus dependencies with symlinks sources. 1997-03-28 15:07:28 +00:00
sys Fix an ... interesting bug that resulted from namespace collision. 1997-03-29 01:57:55 +00:00
usr.bin Make sure that the children of nodes that are marked .MADE, are marked 1997-03-28 22:31:21 +00:00
usr.sbin Resolve conflicts from import of 3.2alpha2. 1997-03-28 21:54:38 +00:00
Makefile Don't cleandir on make build when UPDATE is set. 1997-03-24 22:22:15 +00:00