Commit Graph

277 Commits

Author SHA1 Message Date
plunky
08432b7b14 handle STDC and GNUC inline semantic differences by providing and
using an EXTERN_INLINE definition for functions that are defined as
inline but provide an externally callable reference.

(these are externally called in ipftest)
2010-06-01 08:53:20 +00:00
mbalmer
f782664b92 Language fix: upto date -> up to date. 2010-05-11 18:27:04 +00:00
darrenr
91cf3dd7bf ip_fil_compat.c is another file that needs to be both in src/dist/ipf and
also in src/sys/dist/ipf/netinet
2010-04-17 22:05:53 +00:00
darrenr
46fa5e0711 Commit IPFilter 4.1.34 to HEAD 2010-04-17 21:00:08 +00:00
darrenr
abd0900a99 Import IPFilter 4.1.34 into NetBSD
4.1.34 - Release 11 March 2010
2964907 uninitialised use compile error
2959506 ipfstat does not display rules with compat
2949139 FR_T_BUILTIN masked out incorrectly
2937422 packets filtered with pools should not be cached
2935529 use of rules with tags leads to deadlock
2917501 whitespace cleanup required
2881514 in/out object functions not wired for compatibility
2841771 ipf/ippool rule maintenace bugs: memory leak, ref-counter bug
2839698 H.323 proxy does not clear fin_state/fin_nat
2010-04-17 20:44:16 +00:00
joerg
18654546a6 Fix markup. 2009-10-15 00:16:28 +00:00
joerg
af33c2556a Duplicate .TP. 2009-08-22 00:20:50 +00:00
he
b65d082e72 The type of iplf_count is u_int, not size_t, so print with %u, not %zu. 2009-08-20 08:12:05 +00:00
darrenr
df16b421e0 When preparing ipfilter to import, remove files that are not related to
NetBSD in any way (such as those for Linux, Solaris, etc.)
2009-08-19 18:51:24 +00:00
martti
28de1fee02 IPF 4.1.33 2009-08-19 09:35:01 +00:00
darrenr
aa4e57639b Update head to version 4.1.33 from vendor branch 2009-08-19 08:35:30 +00:00
darrenr
1098c7bfb7 Import IPFilter 4.1.33
4.1.33 - Release 16 August 2009

2837931 wrong mode selected in ipf program for hash-entries
2826168 load_http can make ippool core dump
2825150 IPL_LOGMAX used to index some arrays
2825084 ipv6 fragments should not be allowed past 64k
2824713 ipfstat top output alternates between entries and nothing
2824712 ipfstat top output is shows negative ttl
2820965 a single bad ipv6 extension header should not impact others
2818197 ignored fragment bits defined as being reserved
2817667 IPv6 fragment header verification needs attention
2817098 fr_getrulen() finds the wrong rule
2817096 fr_rulen is unused
2741019 Lingering states (Established/Listen - 5/0) in state table
2702887 use of PBR/fastroute causes panic with ipv6
2671913 regression test in7 fails to execute
2598625 parsing empty config file results in an error
2698656 test parsing empty config files
2597956 not all pointers in a clone are reset
2543934 nat_t gets assigned ifp too early
2535795 No need to always bump fr_ref
2535778 Bad IPv6 packets droped by default
2031730 4.1.31 Nat drops fragmented packets after the first
2214661 ipf does not handle IPv6 fragments
2473273 NAT removed before RST/ICMP sent
2216500 fin_state serves no purpose
2424604 adding random MD5 data causes panic
2304435 Ineffecient lock usage in logging
2216491 fin_nat serves little purpose
2055619 duplicating a free-d packet will fail
2042949 Excessive locking when creating nat_t
2035610 nat_update does not need to get locks
2214658 ipf mostly ignores locking in NetBSD
1979427 Memory leak in user utilities - token never freed (rel br)
* SunOS4 does not have a curproc, but it does have u.
* The fix for 2020447 generated random port numbers but not within the
  range specified in the map rule.  Add in a regression test to verify
  that the "random" part works.
2020447 NAT can undo name server random port selection
1988795 NetBSD does not build with kernel malloc stats
1988782 fr_movequeue can take a short cut
1988669 first nat creation failure prevents further success
1988668 hostmap searching does not work properly
* on some 64bit architectures (such as alpha), the addrfamily_t is packed
  differently, throwing off the calculations for adf_len
* one too many READ_ENTERs in ip_sync code.
* clean up fr_fastroute a little by removing some #ifdefs and pushing the
  code around a bit to use the same variables (NetBSD)
* more recent NetBSDs use VOP related macros differently
2009-08-19 08:28:39 +00:00
snj
55f8c3946f Fix two problems in a conditional:
- __NetBSD__Version__ -> __NetBSD_Version__
- ">= 599001200" -> "< 599001200"

This worked on current because of the __ typo.

Spotted by Geoff Wing.
2009-07-02 01:43:15 +00:00
ad
d991fcb3b6 More changes to improve kern_descrip.c.
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
christos
9371e91bff reorder code to avoid uninitalized variable. 2009-05-08 12:06:11 +00:00
christos
3fde99f00c - prevent buffer overflow from Maksymilian Arciemowicz (worst case was 1041
characters and we allocated only 1024.
While here:
- use snprintf to prevent this from happening in the future.
- don't close fd twice on error.
- pass unsigned char to ctype.h functions.
2009-05-07 21:07:34 +00:00
tsutsui
ce059cd609 Fix bad TCP checksum in packets with IP option header. 2009-03-17 10:10:20 +00:00
christos
29e4b0fb40 eliminate hacky memory allocation that loses on 64 bit archs with alignment
issues.
2009-03-06 21:36:25 +00:00
christos
ec24b06a1f fix suseconds_t format 2008-12-29 04:08:56 +00:00
martti
2ea5185606 IPF 4.1.31 is out 2008-10-20 12:09:15 +00:00
martti
b2f85650f0 Not needed in NetBSD 2008-08-12 10:28:51 +00:00
darrenr
9f0bfbf3da 2020447 IPFilter's NAT can undo name server random port selection 2008-07-24 09:37:57 +00:00
darrenr
2f5a5e95ad Pullup IPFilter 4.1.29 from the vendor branch to HEAD.
See src/dist/ipf/HISTORY for a list of bug fixes since 4.1.23 (although
a few are already in NetBSD)
2008-05-20 07:08:06 +00:00
darrenr
675eb13106 Import IPFilter 4.1.29 to the vendor branch 2008-05-20 06:43:46 +00:00
martti
3a717a15fc Added instructions how I've updated IPF. This should make it easier for anyone
to upgrade our in-tree IPF to the latest version...
2008-05-18 18:19:05 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
lukem
49c8589969 Also escape $Header tags. 2007-12-11 03:34:59 +00:00
mrg
862626dd09 two new hacks:
- include <stdbool.h> so bool is available _KERNEL for sys/condvar.h
- include <sys/mutex.h> before defining _KERNEL so it won't try to
  include <machine/intr.h> which isn't available to userland.

fixes builds on sparc64.
2007-10-09 01:23:20 +00:00
martti
abde7e33e0 Fixed IPF bug #1767831
ipflog() & ipmon ignore IPv6 extension headers
2007-09-17 18:02:21 +00:00
martti
61078fef5f Revert to previous, it was not working for me correctly... 2007-09-10 06:28:38 +00:00
martti
fcbc8c046f Fixed IPF bug #1767831
ipflog() & ipmon ignore IPv6 extension headers

Patch fetched from the SourceForge bug report.
2007-09-10 06:12:02 +00:00
martin
c77a3f5aad Upgraded IPFilter to v4.1.23 2007-06-16 10:52:24 +00:00
martin
03f2531d69 Import IPFilter 4.1.23 2007-06-16 10:33:08 +00:00
martti
fff7fd04df s/iplattach/ipfattach/ and s/ipldetach/ipfdetach/ 2007-06-04 12:38:58 +00:00
martti
657382d62b Added missing .TP 2007-05-23 05:18:45 +00:00
martin
6718c86598 Merge IP-Filter 4.1.22 2007-05-15 22:52:20 +00:00
martin
29fd0d9db1 Import IPFilter 4.1.22 2007-05-15 22:26:02 +00:00
martti
872147fef7 Upgraded IPFilter to 4.1.20 2007-05-01 19:08:03 +00:00
martti
68eb121d73 Import IPFilter 4.1.20 2007-05-01 19:00:58 +00:00
dsl
8767590c76 On amd64 U_QUAD_T is (probably) 'unsigned long', but "%qd" expects to see
a "long long" - giving a compilation warning.
Check for the presence of PRIu64 and use that in preference.
Adjust code to avoid multiple printf() calls.
Use unsigned format specifiers in all cases.
2007-04-21 11:16:53 +00:00
dogcow
65febf04fc fix build on arches with chars that're by default unsigned.
(patch supplied by martin.)
2007-04-16 02:36:24 +00:00
martin
8ebafcc992 Update IPFilter to version 4.1.19 2007-04-14 20:34:18 +00:00
martin
993d757ec6 Import IPFilter 4.1.19 2007-04-14 20:17:19 +00:00
jnemeth
9f5aa7f07f fallout from caddr_t -> void * change 2007-03-04 20:04:14 +00:00
matt
75a9720952 #include <machine/lock.h> before _KERNEL is defined to bypass
lossage when including it when _KERNEL is defined in userland.
2007-02-20 15:40:08 +00:00
dyoung
2d212326ef Use the new ifnet->if_output signature, the one with a const
argument, when __NetBSD__Version >= 499001100.
2007-02-18 04:01:27 +00:00
dogcow
51701d90f7 constify struct sockaddr for no_output and write_output, due to if.h 1.122 2007-02-18 03:22:03 +00:00
alc
980fc49cd5 CID-3325: don't leak `fd'
Also, check for the return value of malloc(3)

ok christos@
2006-12-27 18:13:53 +00:00
alc
0fd99769e3 CID-3224: check the return value of strtok() before use
ok christos@
2006-12-25 23:55:47 +00:00
christos
1bb7c537ad Coverity CID 3013: Don't check for NULL after deref! (from Arnaud Lacombe) 2006-10-03 18:18:18 +00:00