Only compare the interesting part of the bootblock with its backup.
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.
luigi [Tue, 20 Apr 2004 07:04:47 +0000 (07:04 +0000)]
Fix the initial check for NULL arguments in rtfree (previously
it checked for rt == NULL after dereferencing the pointer).
We never check for those events elsewhere, so probably these checks
might go away here as well.
Slightly simplify (and document) the logic for memory allocation
in rt_setgate().
The rest is mostly style changes -- replace 0 with NULL where appropriate,
remove the macro SA() that was only used once, remove some useless
debugging code in rt_fixchange, explain some odd-looking casts.
Switch from using sequential to random ephemeral port allocation,
implementation taken directly from OpenBSD.
I've resisted committing this for quite some time because of concern over
TIME_WAIT recycling breakage (sequential allocation ensures that there is a
long time before ports are recycled), but recent testing has shown me that
my fears were unwarranted.
Enhance our RFC1948 implementation to perform better in some pathlogical
TIME_WAIT recycling cases I was able to generate with http testing tools.
In short, as the old algorithm relied on ticks to create the time offset
component of an ISN, two connections with the exact same host, port pair
that were generated between timer ticks would have the exact same sequence
number. As a result, the second connection would fail to pass the TIME_WAIT
check on the server side, and the SYN would never be acknowledged.
I've "fixed" this by adding random positive increments to the time component
between clock ticks so that ISNs will *always* be increasing, no matter how
quickly the port is recycled.
Except in such contrived benchmarking situations, this problem should never
come up in normal usage... until networks get faster.
No MFC planned, 4.x is missing other optimizations that are needed to even
create the situation in which such quick port recycling will occur.
Rev 1.2 changes include:
- Merge support for numeric keys 1-5 from boot0.s
- Fix _PRTEND for the case of more than 2 sectors.
- Move the code to set the drive number up before we try to load in the rest
of boot0 off of the disk.
- Expand the OS name table to recognize more windows partitions and rename
the NT entry to 'Windows NT/XP'.
Add a temporary workaround for acpi_AppendBufferResource() returning with
a NULL crsbuf pointer. This shouldn't happen if it returns AE_OK. We'll
figure out why this is happening later.
luigi [Mon, 19 Apr 2004 17:28:39 +0000 (17:28 +0000)]
Add some comments, move a static array of constants in the only place
where it is used, and replace R_Malloc with R_Zalloc in a couple
of places removing the corresponding bzero()'s
luigi [Mon, 19 Apr 2004 17:28:15 +0000 (17:28 +0000)]
Fix a recently introduced panic in if_detach() by delaying
the invalidation of ifindex_table[] entry. Probably this
code should be moved even further down, but for the time being
let's do it this way.
Remove opt_da.h from the Makefile as well. Duplication of the option in
both the Makefile and sys/conf/options is what led to this oversight.
Apologies for breaking the build.
There's no need to call ciss_report_request in the passthru ioctl
routine since the error will be reported back to the user buffer.
This will quiet down the bootverbose case when using an ACU which
does brute force discovery of the physical and logical devices.
If you're trying to find out if a thread is valid and in
the same process as the current thread it makes absolutely
no sense to lock the parent process through the pointer in
said thread.
Submitted by: pho (with minor correction)
Pointy Hat To: mtm
luigi [Mon, 19 Apr 2004 07:48:48 +0000 (07:48 +0000)]
Remove a tail-recursive call in nd6_output.
This change is functionally identical to the original code, though
I have no idea if that was correct in the first place (see comment
in the commit).
As promised a while ago, remove DA_OLD_QUIRKS and all quirks it was enabling.
These are no longer needed now that we don't send 6-byte commands to RBC
devices.
First pass at softc list locking for if_ppp.c. Many parts of
this patch were submitted by Maurycy Pawlowski-Wieronski. In addition
to Maurycy's change, break out softc tear down from ppp_clone_destroy()
into ppp_destroy() rather than performing a convoluted series of
extraction casts and indirections during tear down at mod unload.
Revert rev 1.21 which configured with --enable-64-bit-bfd.
GDB 5.2 can't handle a 64-bit BFD on a 32-bit host.
We can revisit configuring with --enable-64-bit-bfd when we get a modern GDB.
Moved the function pointer in struct puc_device_description to the end
of the struct, so that a placeholder for it (or unportable C99
initializers) are not needed for entries that don't use it. Use a C99
initializer for the 1 entry that uses it. Removed 91 placeholders.
This also restores API compatibility with NetBSD and RELENG_4 for most
entries.
luigi [Sun, 18 Apr 2004 11:48:35 +0000 (11:48 +0000)]
+ move MKGet()/MKFree() into the only file that can use them.
+ remove useless wrappers around bcmp(), bcopy(), bzero().
The code assumes that bcmp() returns 0 if the size is 0, but
this is true for both the libc and the libkern versions.
+ nuke Bcmp, Bzero, Bcopy from radix.h now that nobody uses them anymore.
Removed the requirement for a particular subvendor/subproduct in
rev.1.26 (VScom PCI-800L card). While the BARs, etc., may depend on
the sub-ids, this is not known to be so, and I think it is better to
guess that they don't. The decision to check sub-id checks in this
file is apparently random; for VScom cards they were checked in 3 of
8 cases.
Reviewed by: timeout by committer (joerg) after 6 months
Fixed a style bug (insertion sort error) in rev.1.29. This file should
be sorted in the same order as misc/pci_vendors (on vendor/device id),
and already partly is.
luigi [Sun, 18 Apr 2004 01:15:32 +0000 (01:15 +0000)]
+ rename and document an unused field in struct arpcom (field is still
there so there are no ABI changes);
+ replace 5 redefinitions of the IPF2AC macro with one in if_arp.h
Eventually (but before freezing the ABI) we need to get rid of
struct arpcom (initially with the help of some smart #defines
to avoid having to touch each and every driver, see below).
Apart from the struct ifnet, struct arpcom now only stores a copy
of the MAC address (ac_enaddr, but we already have another copy in
the struct ifnet -- if_addrhead), and a netgraph-specific field
which is _always_ accessed through the ifp, so it might well go
into the struct ifnet too (where, besides, there is already an entry
for AF_NETGRAPH data...)
Too bad ac_enaddr is widely referenced by all drivers. But
this can be fixed as follows:
luigi [Sun, 18 Apr 2004 00:56:44 +0000 (00:56 +0000)]
Minor changes to improve code readability (no actual code changes):
+ replace 0 with NULL where appropriate (not complete)
+ remove register declaration while there
+ add argument names to function prototypes to have a better idea of
what they are used for
+ add 'const' qualifiers in 3 places
Add a Davies-Meyer style hash to the output. This is still pure
Nehemiah chip, but the work is all done in hardware.
There are three opportunities to add other entropy; the Data
Buffer, the Cipher's IV and the Cipher's key. A future commit
will exploit these opportunities.