bde [Tue, 18 Nov 1997 14:08:51 +0000 (14:08 +0000)]
Don't test for conflicting combinations of PPP_FILTER/BPFILTER here.
Testing in if_ppp.c is good enough.
Added comments about bogus #includes and #defines.
Removed unused #includes.
Don't depend on gcc's misfeature of rewriting short args in old-style
function definitions to match wrong prototypes. I just changed the
function definition to match the prototype, since this is easy to
verify automatically (it causes no changes in the object code), but
it breaks K&R1 support and doesn't fix the pessimal type.
bde [Tue, 18 Nov 1997 13:52:41 +0000 (13:52 +0000)]
Cleaned up PPP_FILTER/NBPFILTER ifdefs.
Use gettime() instead of microtime() to set if_lastchange for i/o's.
microtime() is probably too expensive. However, setting if_lastchange
for i/o's may be wrong.
bde [Tue, 18 Nov 1997 13:37:56 +0000 (13:37 +0000)]
Use gettime() instead of assignment from `time'. (`time' is too
volatile to use outside of splclock(). microtime() is probably too
expensive to use for every i/o. However, setting ifi_lastchange for
every i/o is just wrong according to the comment about ifi_lastchange
in <net/if.h>. It is set then for atm, fddi and the latest version
of ppp.)
bde [Tue, 18 Nov 1997 12:59:09 +0000 (12:59 +0000)]
Get tty ioctl numbers by #including <sys/ttycom.h> instead of
<sys/tty.h>. Don't #include <sys/fcntl.h> (the select -> poll
changes removed all dependencies on it).
bde [Tue, 18 Nov 1997 12:52:10 +0000 (12:52 +0000)]
Removed an unused #include. Added an unsed #include of <sys/ucred.h>
to prepare for not including it in <sys/param.h>. Moved conditionally
used #includes inside an ifdef.
bde [Tue, 18 Nov 1997 12:21:32 +0000 (12:21 +0000)]
Get select stuff by including <sys/select.h> instead of <sys/proc.h>,
and don't include <sys/fcntl.h>. (The select -> poll changes replaced
fcntl macros by poll macros.)
Use <machine/*.h> instead of <i386/include/*.h>.
Fail the probe instead of crashing in the unlikely event that malloc()
fails.
bde [Tue, 18 Nov 1997 11:45:26 +0000 (11:45 +0000)]
Removed unused #includes.
Fixed #include order. <i386/isa/isa_device.h> will soon be a prerequisite
for <i386/isa/pnp.h>. Including both in alphebetical order gets this
right naturally.
bde [Tue, 18 Nov 1997 11:02:19 +0000 (11:02 +0000)]
Removed unused #include of <sys/malloc.h>. This file now uses only
zalloc(). Many more cases like this are probably obscured by not
including <vm/zone.h> explicitly (it is spammed into <sys/malloc.h>).
bde [Tue, 18 Nov 1997 10:56:41 +0000 (10:56 +0000)]
Removed code for the !KERNEL case. It hasn't been maintained for 4
years and gives a "laugh"able number of compile-time errors (see the
comment). main() just printed the struct sizes. This can be done
better by compiling with -g and reading off the sizes from the stabs.
bde [Tue, 18 Nov 1997 09:27:23 +0000 (09:27 +0000)]
Don't #include <machine/smp.h> even in the SMP case. Fixed the one
place that depended on it. The "bazillion warnings" mentioned in the
log for rev.1.45 apparently aren't a problem any more. It is hard
to be sure because the SIMPLELOCK_DEBUG option turns off (and breaks)
things in the SMP case.
bde [Tue, 18 Nov 1997 09:26:50 +0000 (09:26 +0000)]
Don't #include <machine/smp.h> even in the SMP case. Fixed the one
place that depended on it. The "bazillion warnings" mentioned in the
log for rev.1.45 apparently aren't a problem any more. It is hard
to be sure because the SIMPLELOCK_DEBUG option turns off (and breaks)
things in the SMP case.
Don't forward declare structs that are already implicitly forward declared.
bde [Tue, 18 Nov 1997 08:07:37 +0000 (08:07 +0000)]
Don't #include <sys/types.h>. I mistakenly #included it unconditionally
to fix some broken application. Application breakage is now hidden by a
recently introduced wrong #include of <sys/types.h> in <sys/time.h>.
<sys/time.h> is a prerequisite for <sys/resource.h>, so the <sys/types.h>
prereqisite is automatically supplied.
bde [Tue, 18 Nov 1997 07:23:40 +0000 (07:23 +0000)]
Fixed pedantic syntax errors caused by trailing semicolon in the
__ELF__ case of the definition of MAKE_SET() and in the PSEUDO_LKM
case of the definition of PSEUDO_SET().
brian [Tue, 18 Nov 1997 00:20:29 +0000 (00:20 +0000)]
Notice that ppp has closed the connection properly.
Remove the timeout hack to notice that ppp has closed the connection.
Remove the ``special case'' hacks for "quit" and "bye", as pppctl
now exits immediately when the connection is closed by ppp.
Suggest a secure "set server" line for connecting ppp & pppctl.
Tidy up and correct a few man page typos.
brian [Mon, 17 Nov 1997 01:13:41 +0000 (01:13 +0000)]
Don't SetLabel() 'till we've done the SelectSystem(). This
avoids the situation where we specify label ``x'' on the command
line, and label ``x'' has a ``load y'' command embedded in it.
When the line comes up, we want to use ``x'' from ppp.linkup,
not ``y''.
brian [Sun, 16 Nov 1997 22:15:11 +0000 (22:15 +0000)]
Abstract data read from and written to the tun device,
allowing for a possible header on the front of all packets.
In OpenBSD, there's a structure containing the address
family here.
If we're building under OpenBSD, set up the ``flags'' part
of struct tuninfo (not there under FreeBSD) so that we config
the interface as POINTOPOINT.
Prefix prototypes with ``extern'' in os.c for consistency.
These changes are cosmetic under FreeBSD, but allow ppp to
build & work under OpenBSD (bar the srandomdev() stuff,
the inclusing of <net/if_var.h> and some Makefile symantecs).
steve [Sun, 16 Nov 1997 12:52:17 +0000 (12:52 +0000)]
Resurrect a modified version of the /tmp clearing code from rev 1.119.
Enable this by setting clear_tmp_enable in rc.conf to YES. Beware
there can be serious side-effects of enabling this, so use at you own
risk.
nate [Sat, 15 Nov 1997 14:20:31 +0000 (14:20 +0000)]
MF22:
(update_intr_masks might not need to be done in 3.X, but the new generic
interrupt code is incomplete w/regard to support for the PCCARD code, so
to avoid any potential problems use it. It can't hurt).
- Correctly register pcic_imask with the system interrupt code.
- Call update_intr_masks() so that pcic_imask modifications that occur
when card interrupts are registered get updated in the system
interrupt code.
brian [Sat, 15 Nov 1997 02:15:56 +0000 (02:15 +0000)]
Interpret AF_LINK sockaddrs correctly in show/delete route.
Print out inteface names rather than numbers, and use the
same "find out the names" code in SetIfAddr(). This means
that the nasty ioctl(,SIOCGIFCONF,)/realloc loop is now
buried :-)
julian [Thu, 13 Nov 1997 22:57:57 +0000 (22:57 +0000)]
Submitted by: Archie cobbs (IPDIVERT author)
close small security hole where an atacker could sendpackets with
IPDIVERT protocol, and select how it would be diverted thus bypassing
the ipfirewall. Discovered by inspection rather than attack.
(you'd have to know how the firewall was configured (EXACTLY) to
make use of this but..)
jkh [Thu, 13 Nov 1997 11:49:23 +0000 (11:49 +0000)]
The prefix override code was bogus. The original idea was sound
enough, but we're not using the pkg_create tool that way anymore
in the ports collection.
PR: 4894
Submitted by: Adrian Colley <aecolley@ois.ie>
julian [Thu, 13 Nov 1997 00:28:51 +0000 (00:28 +0000)]
Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree
Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
brian [Wed, 12 Nov 1997 18:47:30 +0000 (18:47 +0000)]
Return correct value from "set loopback".
Output "set ?filter deny host|port" rules correctly
with show ?filter.
Submitted by: Dave Bodenstab <imdave@mcs.net>