mckusick [Wed, 13 Jun 2001 23:13:13 +0000 (23:13 +0000)]
Build on the change in revision 1.98 by Tor.Egge@fast.no.
The symptom being treated in 1.98 was to avoid freeing a
pagedep dependency if there was still a newdirblk dependency
referencing it. That change is correct and no longer prints
a warning message when it occurs. The other part of revision
1.98 was to panic when a newdirblk dependency was encountered
during a file truncation. This fix removes that panic and
replaces it with code to find and delete the newdirblk
dependency so that the truncation can succeed.
gallatin [Wed, 13 Jun 2001 20:40:24 +0000 (20:40 +0000)]
initialize mp_ncpus in cpu_mp_probe() so that if the probe fails and
cpu_mp_start() is never called, mp_ncpus will have a non-zero value.
This prevents systat from dying with an arithmatic exception caused
by a divide-by-zero error on UP alphas running a GENERIC kernel.
ume [Wed, 13 Jun 2001 19:53:04 +0000 (19:53 +0000)]
This is force commit intend to correct previous log.
`(possible) remote kernel panic fix' was already fixed in 1.132.
I had some confusion during gathering log.
schweikh [Wed, 13 Jun 2001 18:43:28 +0000 (18:43 +0000)]
Avoid the avm field joining the w field when avm is > 9.999.999 pages
which is slightly less than 4GB. To use a quote from someone who shall
remain nameless "No one will ever need more than 4 GB" :-) But FreeBSD
is prepared if we one day will.
ru [Wed, 13 Jun 2001 15:16:30 +0000 (15:16 +0000)]
Added skeleton <complex.h> (aligned with the POSIX.1-200x), mostly
to fix the "-nostdinc WARNS=X" breakage caused by broken prototypes
for cabs() and cabsl() in <math.h>.
Reimplemented cabs() and cabsl() using new complex numbers types and
moved prototypes from <math.h> to <complex.h>.
ru [Wed, 13 Jun 2001 13:25:10 +0000 (13:25 +0000)]
Forced commit.
Revision 1.50 stated that it fixed the -iface breakage introduced with
the latest KAME merge in revision 1.48. Actually, revision 1.48 fixed
the bug in revision 1.12 which incorrectly tested the ifr_flags member
of the ifreq structure filled by ioctl(SIOCGIFCONF); ifr_flags is only
valid in the SIOCGIFFLAGS case.
But yes, we still want to be able to specify the interface name as the
gateway for non-P2P interfaces.
bde [Wed, 13 Jun 2001 11:56:00 +0000 (11:56 +0000)]
Fixed world breakage on systems where ntohl() doesn't return u_long
(e.g., on alphas, or even on i386's with a POSIX-200x-conformant
ntohl() (ntohl() returns uint32_t which is u_int on i386's)).
Fixed related bugs and bogons while I'm here:
- ntohl() was "fixed" for printing in 1 place by casting to
"(unsigned int )". This breaks the value on systems where u_int
is smaller than uint32_t, and has 2 style bugs.
- spell u_int consistently (never use "unsigned").
- break K&R support some more (don't cast malloc()'s arg to a wrong
type...).
peter [Wed, 13 Jun 2001 10:58:39 +0000 (10:58 +0000)]
With this commit, I hereby pronounce gensetdefs past its use-by date.
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.
The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).
The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.
For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.
For a.out, we use the old linker_set struct.
NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.
The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.
linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.
olgeni [Wed, 13 Jun 2001 10:25:09 +0000 (10:25 +0000)]
Add terminal type configuration to the Options screen. It allows selecting
a monochrome display after booting into sysinstall, if you have any trouble
with the default color scheme.
gad [Tue, 12 Jun 2001 16:38:20 +0000 (16:38 +0000)]
Fix about 90-100 warnings one gets when trying to compile lpr&friends
with BDECFLAGS on, mainly by adding 'const' to parameters in a number
of routine declarations. While I'm at it, ANSI-fy all of the routine
declarations. The resulting object code is exactly the same after
this update as before it, with the exception of one unavoidable
change to lpd.o on freebsd/alpha.
Also added $FreeBSD$ line to lpc/extern.h lpc/lpc.h lptest/lptest.c
Reviewed by: /sbin/md5, and no feedback from freebsd-audit
ru [Tue, 12 Jun 2001 13:23:43 +0000 (13:23 +0000)]
Fixed the -iface breakage introduced with the latest KAME merge
in revision 1.48. It is pretty valid and often feasible to use
a non-point-to-point interface as the gateway. One might, for
example, use this to route some hosts through an ARP on a local
interface, without having to assign an additional IP address:
peter [Tue, 12 Jun 2001 09:40:04 +0000 (09:40 +0000)]
Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
inconvenient temporary ioconf table from config(). We already had a
fallback to using strings before malloc/vm was running anyway.
peter [Tue, 12 Jun 2001 06:06:18 +0000 (06:06 +0000)]
Move the -I../../../include or -I/usr/include to the last entry on the
cc arguments. Otherwise ipfilter's bogus #include lines will compile
reference /usr/include/netinet/ip_frag.h etc.
peter [Tue, 12 Jun 2001 01:14:02 +0000 (01:14 +0000)]
Turn on the extra 'const' settings for various curses functions. While
this is not strictly compliant with XSI curses, it enables us to pass
const strings to many more functions that are actually const safe than
before. This should be harmless.
iedowse [Mon, 11 Jun 2001 23:18:22 +0000 (23:18 +0000)]
Make the non-threaded stub for pthread_sigmask() a no-op instead
of calling sigprocmask(). This matches the behaviour of thr_sigsetmask()
on Solaris; _pthread_sigmask_stub was added purely for compatibility
with Solaris (for TI-RPC), so it might as well do the same thing.
This fixes the problem where client RPC calls ignored all signals
for the complete duration of the RPC. This behaviour is currently
necessary in the threaded case due to locking issues, but was never
intended to occur in non-threaded programs.
tobez [Mon, 11 Jun 2001 21:31:04 +0000 (21:31 +0000)]
Check for the existence of the Makefile in the port skeleton directory
before running make. If the package origin points to a non-existent or
stale port, report this package as orphaned, instead of producing more
general `unknown in index' message.
ume [Mon, 11 Jun 2001 21:17:59 +0000 (21:17 +0000)]
This is force commit to mention about previous commit.
- add a pointer to struct mauxtag. two integer was too restrictive
- have m_aux_{add,find}2.
- make sure to return non-cluster on m_pulldown(). this is safer
(but of course less performant) when we have non-loopback L2 code
which throws the mbuf back to input path, like L2 bridging or some
multicast handling code.
ume [Mon, 11 Jun 2001 19:27:05 +0000 (19:27 +0000)]
This is force commit to mention about previous commit.
- do not assume that the ro_dst member of route_in6{} is sockaddr_in6.
- repair IPsec header size prediction.
- validate mbuf chain better in {tcp,udp}6_ctlinput.
- loosened validation inner packets of icmp6 errors as much as possible.
- scope-awareness.
- be friendly with pfctlinput2.
- simplified address scope handling in the ctlinput function.
- type change of in6_pcbnotify.
- pass error from ipsec_setsocket() all the way up.
ume [Mon, 11 Jun 2001 19:03:42 +0000 (19:03 +0000)]
This is force commit to mention about previous commit.
- added comments about why in6p_inputopts should not be copied in
tcp6_input().
- call ip6_copypktopts() in order to copy in6p_outputopts
from a listening PCB to a corresponding accepting one.
- be proactive about unspecified IPv6 source address. pcb layer
uses unspecified address (::) to mean "unbounded" or
"unconnected", and can be confused by packets from outside.
- made consist between tcp and udp in using mappedaddr
- setsockopt(BIND_IPV6ONLY) now works
- deprecated address consideration on TCP SYN.
- get rid of M_ANYCAST6
ume [Mon, 11 Jun 2001 18:38:11 +0000 (18:38 +0000)]
This is force commit to mention about previous commit.
- use 0/8 to specify interface index on multicast get/setsockopt
- make sure to nuke m->m_aux pointer for ipsec, on if_output.
- pass error from ipsec_setsocket() all the way up.
- move ipsec output processing before filtering section.
ume [Mon, 11 Jun 2001 18:21:31 +0000 (18:21 +0000)]
This is force commit to mention about previous commit.
- (possible) remote kernel panic fix - out of bounds access on
ill-formed ipopt.
- strict boundary check on ipopt.
- make sure to enforce inbound IPsec policy on all final header.
- add missing ipcomp entry from ipprotosw.
- 127/8 must not appear on wire - RFC1122.
this is rather important as we use weak host model, so outsider
can abuse 127.0.0.1 from outside.
- introduce ipstat.ips_badaddr
- use ipsec_gethist() to prevent packet filters from looking at
decapulated packets.
- remove duplicate 127.0.0.0/8 checking.
ru [Mon, 11 Jun 2001 18:09:08 +0000 (18:09 +0000)]
- Restore -nostdinc that got lost in rev.1.105; we don't
want host headers during `buildworld'.
- During `buildworld', install headers in a "copy" mode
until we decide what to do with the (currently broken)
SHARED=symlinks.
- Temporarily run `buildworld' with -DNO_WERROR, which
effectively disabled the -Werror bit of recently added
WARNS=X feature. This is required because adding the
-nostdinc bit back revealed bugs in some header files
that were hiding after not using -nostdinc.
It is unclear currently how exactly (and why) -nostdinc
affects gcc(1) warnings.
ru [Mon, 11 Jun 2001 17:41:58 +0000 (17:41 +0000)]
Backout previous change (removal of -I${.CURDIR}/../../sys/netinet).
This is needed to pick up the right headers. Wrong headers from
src/contrib/ipfilter are used otherwise.
The right fix would be to fix contrib/ipfilter C sources to pick up
headers from <sys/netinet>.