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>.
bde [Mon, 11 Jun 2001 13:57:54 +0000 (13:57 +0000)]
Removed the broken code which claimed to lose the set[ug]id bits in
the !(pflag && setfile()) case for regular files unless the copy is
owned by the same user and group. These bits have already been lost
(or never gained) in the correct way. The code didn't actually lose
the bits; it depended on them being lost already (apparently in all
cases) and attempted to gain them as necessary, but it often gained
them (and sometimes collateral bits) when wrong:
- pflag && setfile() == 0 case (i.e., for a successful cp -p):
setfile() copies all the attributes as correctly as possible (as
specified by POSIX), and we sometimes messed up the up the mode by
setting it again. Also, if the file is immutable, then setting the
mode again gave spurious errors (PR 20646).
- !pflag case. If the target is created, POSIX requires it to not
have the set[ug]id bits, but we sometimes copied them from the source.
If the target already exists, POSIX requires its mode to be unchanged,
but we sometimes copied the whole mode from the source.
ume [Mon, 11 Jun 2001 13:28:05 +0000 (13:28 +0000)]
prefixcmd_enable was obsoleted by syncing recent KAME. New prefix(8)
is just a shell script for backward compatibility. Now, we always use
ifconfig(8) instead of prefix(8).
ume [Mon, 11 Jun 2001 12:39:29 +0000 (12:39 +0000)]
Sync with recent KAME.
This work was based on kame-20010528-freebsd43-snap.tgz and some
critical problem after the snap was out were fixed.
There are many many changes since last KAME merge.
TODO:
- The definitions of SADB_* in sys/net/pfkeyv2.h are still different
from RFC2407/IANA assignment because of binary compatibility
issue. It should be fixed under 5-CURRENT.
- ip6po_m member of struct ip6_pktopts is no longer used. But, it
is still there because of binary compatibility issue. It should
be removed under 5-CURRENT.
joerg [Mon, 11 Jun 2001 10:48:10 +0000 (10:48 +0000)]
Cosmetics:
. remove stale comments and a stale #define (from the old days of ft(4))
. make MAX_SEC_SIZE (used in isa_dmainit()) a #define
. fix a typo in a string
. use 0 as the blocksize in devstat_add_entry(), since the actual blocksize
is unknown (devstat(9) suggests to use 0 in that case)
Once again, as explained in my messages to -audit, the ANSIfication comes
as part of the preparation to add a new -d command-line flag to send
output to stdout/stderr. That commit will come in a week, pending any
further comments/objections. For those who have missed the -audit mails,
it's at http://people.FreeBSD.org/~roam/bsd/rarpd/usr.sbin-rarpd-d.patch
Asbestos suit: on ;)
Reviewed by: dd, silence on -audit
MFC after: 1 month