Commit Graph

241 Commits

Author SHA1 Message Date
christos 225b6588eb CID/979998: missing va_end() 2013-02-09 01:46:30 +00:00
christos 12e03428f2 CVS/979999: missing va_end() 2013-02-09 01:22:28 +00:00
msaitoh af75f30ef5 Fix off-by-one read error. 2013-01-15 03:39:16 +00:00
christos 02e805c272 Back out my last change, which was a partial fix for hash code computation problems.
Apply Darren's more complete reworking of hash code computation.
Ensure that the struct containing the red-black tree head is properly initialized.
From Geoff Adams
2013-01-09 13:23:20 +00:00
christos 79e7092a0d Fix bucket and chain counts on nat lists from Geoff Adams:
The problem was that ipf_nat_delete wasn't swapping inbound and
outbound hash codes for inbound NAT entries, so it was essentially
always looking in the wrong buckets in those cases. But because of
the way the linked list works, I don't think any NAT entries were
actually leaked. But since all the bucket counters and chain count
were getting messed up, things did start to go bad after a while.
(New NAT entries wouldn't be created, for instance.)

The fix is in the ipf_nat_delete function, itself; the other changes
are a slight refactoring of one method and adding some comments
that helped me figure out how the linked list with pointer-back-pointers
worked.

Also note that I haven't looked through the logic in ipf_nat_rehash;
it's likely that that might miss some things for the same reason.

I also haven't yet looked into the ipf_nat_newrdr problem with mappings
already existing. That'll be next.
2013-01-05 16:34:43 +00:00
christos af7611566d - Replace the seemingly broken built-in ipf rbtree implementation with ours.
- Fix typos in comments
- Fix 2 mutex errors
From Geoff Adams
2012-12-20 21:42:27 +00:00
msaitoh 5d8b710d44 Fix off by one read error. 2012-12-11 09:17:31 +00:00
msaitoh 202434cbda Fix wrong reference to dev_priv->saveSWF1. It was clearly wrong. 2012-12-11 07:31:39 +00:00
christos 5c13de37e7 PR/47270: Paul Goyette: ipftest -N aborts
1. check for NULL before de-refencing; in particular sel is assigned to NULL,
   in the default case, and then couple of lines down we do sel->
2. gcc appears to optimize u_32_t hash[4], to u_32_t hash, since we only
   use hash[0], disregarding the fact that we pass it to MD5Final() leading
   to stack corruption. Use an explicit union, so that the compiler stops
   butting its head where it shouldn't.

XXX: pullup to 6
2012-12-03 18:30:25 +00:00
alnsn 49f0e3b897 Apply adapted patch from the author of sljit to fix cdecl functions
generation on i386.
2012-11-18 14:36:37 +00:00
alnsn 929b2d397c Apply adapted patch from joerg@ to fix clang build. 2012-11-09 23:09:31 +00:00
alnsn 8639fea1f4 Compile with WARNS=3. 2012-11-05 00:29:57 +00:00
alnsn 758c93834a Compile with WARNS=3. 2012-11-05 00:18:50 +00:00
alnsn ca0e5ee369 Update sljit revision in README.import. 2012-10-28 09:41:12 +00:00
alnsn 0e2fbf7d6b Resolve conflicts. 2012-10-28 09:38:59 +00:00
alnsn a1fc8f8994 Import of sljit @ r186.
This version adds sparc architecture. Other changes:

r184: NAN to UNORDERED renaming and other fixes.
r180: Common caching in PPC and MIPS.
2012-10-28 09:36:12 +00:00
christos 3a1d62f3bf This move is taking too long :-) make the file re-appear to fix the build. 2012-10-22 21:21:07 +00:00
alnsn faf841b39a Move sljit_mod.c to sys/external/bsd/sljit/sljit and share it between
builtin and standalone module.
2012-10-21 21:23:38 +00:00
alnsn f5217f73dd Update README.import. 2012-10-21 19:15:10 +00:00
alnsn 2b598a624b Import sljit @ r176.
r176: Add void to function definitions. Patch by Alexander Nasonov
2012-10-21 19:07:18 +00:00
alnsn a573b72a32 Fix compilation. 2012-10-13 19:38:24 +00:00
christos bf9565ac33 remove wrong ntohl (from Aran Clauson) 2012-10-09 21:32:54 +00:00
alnsn 1063d31c93 Fix compilation when DIAGNOSTIC is defined. 2012-10-08 22:39:15 +00:00
alnsn 0b0274e287 Adapt code to compile with -D_KERNEL. 2012-10-06 19:23:01 +00:00
alnsn 1f35320d1c Add import notes. 2012-10-06 18:29:44 +00:00
alnsn 77d6837703 Initial import of sljit @ r175.
svn co https://sljit.svn.sourceforge.net/svnroot/sljit@r175 dist
2012-10-06 18:24:18 +00:00
chs 25ae74a8a7 fix the DRM string sysctls to use copyout() instead of strcat()
to deliver the data to the user buffer.
2012-09-29 14:19:43 +00:00
plunky 80f5e4f0af the result of the construct
#define FOO	defined(BAR)

#if FOO
 [conditional code]
#endif

is "undefined", according to C99 6.10.1 note 4. So, change code like
that to use the following paradigm

#if defined(BAR)
#define FOO	1
#else
#define FOO	0
#endif

#if FOO
 [conditional code]
#endif
2012-09-15 16:56:05 +00:00
pgoyette 585fa50279 Make ipf compile even without INET6 support.
Changes have been fed upstream (to darrenr@)
2012-07-30 19:27:46 +00:00
martin 2626ebc27a Fix printf format 2012-07-22 17:48:53 +00:00
darrenr 49ef629822 ansify new function definition 2012-07-22 16:40:40 +00:00
darrenr 8685465b07 ansify new function definition 2012-07-22 16:37:31 +00:00
darrenr 72926482fb ansify new function definition 2012-07-22 16:26:56 +00:00
darrenr 847affb24e h323 proxy removed 2012-07-22 16:19:34 +00:00
darrenr 109f582a52 ansify new functio definitions 2012-07-22 16:13:16 +00:00
darrenr 13885a6659 Merge IPFilter 5.1.2 into HEAD 2012-07-22 14:27:35 +00:00
chs bb833a1164 when freeing the DRM_SHM kernel memory that can be mapped by a user process,
remove any user mappings before freeing the memory, so that a user process
doesn't have still have access to that physical memory after it's reused.
this really shouldn't be using kernel malloc'd memory at all,
but changing that would be much more involved.
2012-06-17 15:15:34 +00:00
tsutsui 0a449abb14 Make i915drm work on Atom N4xx/D410/D510 + GMA3150 integrated graphic devices.
Patch is taken from FreeBSD:
 http://www.freebsd.org/cgi/query-pr.cgi?pr=143427
and tested on MSI U135DX running NetBSD/i386 6.0_BETA2 with this patch.

Should be pulled up to netbsd-6.
2012-06-11 16:51:04 +00:00
dsl e21a34c25e Add some pre-processor magic to verify that the type of the data item
passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
2012-06-02 21:36:41 +00:00
nakayama 155d42ae0b Fix ATHHAL_DEBUG by syncing HALDEBUG() with Atheros HAL code. 2012-04-11 13:48:11 +00:00
christos 0c6adeca02 apply our changes.
- prototypes
- ip_h323_pxy.c is missing from the distribution
- original tar distribution is missing <$>Id values in most files
2012-03-23 20:39:49 +00:00
christos c2aa585c8d import kernel portion of ipfilter 5.1.1 2012-03-23 20:36:52 +00:00
bouyer 867f16169f Revert previous; needs more work 2012-03-15 18:52:02 +00:00
bouyer 5ade347d8f Use the right marcro for loop bound, avoids read past array end. Found by
gcc -03
2012-03-15 18:49:49 +00:00
christos 139782ccab Use the release date as suggested.
XXX: I bet this is going to be broken in the next import because nobody
will remember to fix it.
2012-02-19 16:45:03 +00:00
christos 5fd581afdb Fix for MKREPRO = yes
XXX: pullup to 6
2012-02-19 05:07:10 +00:00
wiz bc52f506fb Consistently use ar5416SetPowerMode. From Henning Petersen in PR 45999. 2012-02-12 13:55:27 +00:00
wiz 87b4d73fea Use correct return value. From clang via Henning Petersen in PR 45995. 2012-02-12 13:48:45 +00:00
wiz 498ae6154b Use correct return value. From clang via Henning Petersen in PR 45996. 2012-02-12 13:47:19 +00:00
drochner 38123a2b84 remove incomplete conversion to kmem_alloc -- inconsistent use
leads at least to diagnostic panics
2012-01-29 11:49:02 +00:00