The NetBSD Project

CVS log for src/sys/net/npf/npf_nat.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / net / npf

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.53 / (download) - annotate - [select for diffs], Fri Feb 24 11:03:01 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.52: +1 -5 lines
Diff to previous 1.52 (colored) to selected 1.1 (colored)

npf: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

Requested by rmind@:
https://github.com/rmind/npf/pull/127#issuecomment-1399573125

Revision 1.52 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored) to selected 1.1 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.50: +7 -1 lines
Diff to previous 1.50 (colored) to selected 1.1 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

Revision 1.46.2.4 / (download) - annotate - [select for diffs], Sat Jun 20 15:46:47 2020 UTC (3 years, 10 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.46.2.3: +185 -64 lines
Diff to previous 1.46.2.3 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #956):

	usr.sbin/npf/npf-params.7: revision 1.4
	sys/net/npf/npf_worker.c: revision 1.9
	usr.sbin/npf/npftest/npftest.h: revision 1.17
	usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.16
	usr.sbin/npf/npf-params.7: revision 1.5
	sys/net/npf/npf_state_tcp.c: revision 1.21
	usr.sbin/npf/npfctl/npf_build.c: revision 1.55
	usr.sbin/npf/npf-params.7: revision 1.6
	sys/net/npf/npfkern.h: revision 1.5
	lib/libnpf/npf.c: revision 1.49
	usr.sbin/npf/npf-params.7: revision 1.7
	sys/net/npf/npf_impl.h: revision 1.81
	sys/net/npf/npf_ext_log.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.h: revision 1.53
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.11
	sys/net/npf/npf_nat.c: revision 1.50
	sys/net/npf/npf_mbuf.c: revision 1.24
	sys/net/npf/npf_alg.c: revision 1.22
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.14
	usr.sbin/npf/npftest/libnpftest/npf_conn_test.c: file removal
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.10
	sys/net/npf/npf.h: revision 1.63
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.21
	usr.sbin/npf/npfctl/npf_var.c: revision 1.13
	sys/net/npf/files.npf: revision 1.23
	usr.sbin/npf/npfctl/npf_show.c: revision 1.32
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.91
	sys/net/npf/npf_os.c: revision 1.18
	sys/net/npf/npf_connkey.c: revision 1.2
	sys/net/npf/npf_conf.c: revision 1.17
	lib/libnpf/libnpf.3: revision 1.12
	usr.sbin/npf/npftest/npftest.c: revision 1.25
	usr.sbin/npf/npftest/libnpftest/npf_gc_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.51
	sys/net/npf/npf_tableset.c: revision 1.35
	usr.sbin/npf/npftest/npftest.conf: revision 1.9
	sys/net/npf/npf_sendpkt.c: revision 1.22
	usr.sbin/npf/npfctl/npf_var.h: revision 1.10
	sys/net/npf/npf_state.c: revision 1.23
	sys/net/npf/npf_conn.h: revision 1.20
	usr.sbin/npf/npfctl/npfctl.c: revision 1.64
	usr.sbin/npf/npfctl/npf_cmd.c: revision 1.1
	sys/net/npf/npf_portmap.c: revision 1.5
	sys/net/npf/npf_params.c: revision 1.3
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.32
	tests/net/npf/t_npf.sh: revision 1.4
	sys/net/npf/npf_ext_rndblock.c: revision 1.9
	lib/libnpf/npf.h: revision 1.39
	sys/net/npf/npf_ruleset.c: revision 1.51
	sys/net/npf/npf_alg_icmp.c: revision 1.33
	sys/net/npf/npf.c: revision 1.43
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.8: revision 1.25
	sys/net/npf/npf_ctl.c: revision 1.60
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.18
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.11
	sys/net/npf/npf_handler.c: revision 1.49
	sys/net/npf/npf_inet.c: revision 1.57
	sys/net/npf/npf_ifaddr.c: revision 1.7
	sys/net/npf/npf_conndb.c: revision 1.9
	sys/net/npf/npf_if.c: revision 1.13
	usr.sbin/npf/npfctl/Makefile: revision 1.15
	sys/net/npf/npf_conn.c: revision 1.32
	sys/net/npf/npf_ext_normalize.c: revision 1.10
	sys/net/npf/npf_rproc.c: revision 1.20
	sys/net/npf/npf_worker.c: revision 1.8

Major NPF improvements (merge from upstream):
- Switch to the C11-style atomic primitives using atomic_loadstore(9).
- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.
- npfkern: rewrite the G/C worker logic and make it self-tuning.
- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.
- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.
- Amend and improve the manual pages.

npf_worker_sys{init,fini}: initialize/destroy the exit_cv condvar.

npftest -- npf_test_init(): add a workaround for NetBSD.

npf-params(7): fix the state.key defaults.

npf-params.7: s/filer/filter/

Adjust to "npfctl debug" command line changes, from rmind@.

Use more markup.

Revision 1.50 / (download) - annotate - [select for diffs], Sat May 30 14:16:56 2020 UTC (3 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.49: +185 -64 lines
Diff to previous 1.49 (colored) to selected 1.1 (colored)

Major NPF improvements (merge from upstream):

- Switch to the C11-style atomic primitives using atomic_loadstore(9).

- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.

- npfkern: rewrite the G/C worker logic and make it self-tuning.

- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.

- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.

- Amend and improve the manual pages.

Revision 1.46.2.3 / (download) - annotate - [select for diffs], Mon May 25 17:25:28 2020 UTC (3 years, 10 months ago) by martin
Branch: netbsd-9
Changes since 1.46.2.2: +63 -26 lines
Diff to previous 1.46.2.2 (colored) to branchpoint 1.46 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #930):

	usr.sbin/npf/npfctl/npf_build.c: revision 1.54
	sys/net/npf/npf_conn.h: revision 1.19
	usr.sbin/npf/npfctl/npfctl.h: revision 1.52
	usr.sbin/npf/npfctl/npf_show.c: revision 1.31
	sys/net/npf/npf_conf.c: revision 1.16
	sys/net/npf/npf_nat.c: revision 1.49
	sys/net/npf/npf_inet.c: revision 1.56
	sys/net/npf/npf_conndb.c: revision 1.8
	sys/net/npf/npf_conn.c: revision 1.31

Backport selected NPF fixes from the upstream (to be pulled up):

- npf_conndb_lookup: protect the connection lookup with pserialize(9),
  instead of incorrectly assuming that the handler always runs at IPL_SOFNET.
  Should fix crashes reported on high load (PR/55182).

- npf_config_destroy: handle partially initialized config; fixes crashes
  with some invalid configurations.

- NAT policy creation / destruction: set the initial reference and do not
  wait for reference draining on destruction; destroy the policy on the
  last reference drop instead.  Fixes a lockup with the dynamic NAT rules.

- npf_nat_{export,import}: fix a regression since dynamic NAT rules.

- npfctl: fix a regression and restore the default group behaviour.

- Add npf_cache_tcp() and validate the TCP data offset (from maxv@).

Revision 1.49 / (download) - annotate - [select for diffs], Sat May 23 19:56:00 2020 UTC (3 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.48: +63 -26 lines
Diff to previous 1.48 (colored) to selected 1.1 (colored)

Backport selected NPF fixes from the upstream (to be pulled up):

- npf_conndb_lookup: protect the connection lookup with pserialize(9),
  instead of incorrectly assuming that the handler always runs at IPL_SOFNET.
  Should fix crashes reported on high load (PR/55182).

- npf_config_destroy: handle partially initialized config; fixes crashes
  with some invalid configurations.

- NAT policy creation / destruction: set the initial reference and do not
  wait for reference draining on destruction; destroy the policy on the
  last reference drop instead.  Fixes a lockup with the dynamic NAT rules.

- npf_nat_{export,import}: fix a regression since dynamic NAT rules.

- npfctl: fix a regression and restore the default group behaviour.

- Add npf_cache_tcp() and validate the TCP data offset (from maxv@).

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:15 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.43.2.1: +114 -261 lines
Diff to previous 1.43.2.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored) to selected 1.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.46.2.2 / (download) - annotate - [select for diffs], Sun Sep 1 13:21:39 2019 UTC (4 years, 7 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.46.2.1: +12 -6 lines
Diff to previous 1.46.2.1 (colored) to branchpoint 1.46 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #141):

	usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.15
	sys/net/npf/npf_alg.c: revision 1.21
	sys/net/npf/npf.h: revision 1.62
	sys/net/npf/npf_ctl.c: revision 1.57
	sys/net/npf/npf_ctl.c: revision 1.58
	sys/net/npf/npf_os.c: revision 1.16
	sys/net/npf/npf_os.c: revision 1.17
	sys/net/npf/npf_conf.c: revision 1.15
	sys/net/npf/npf_impl.h: revision 1.78
	sys/sys/mbuf.h: revision 1.220
	sys/net/npf/npf_impl.h: revision 1.79
	sys/net/npf/npf.c: revision 1.41
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.19
	sys/net/npf/npf_nat.c: revision 1.48
	sys/net/npf/npf_handler.c: revision 1.48
	sys/net/npf/npf_ifaddr.c: revision 1.6

- npfctl_load_nvlist: simplify the config loading logic.
- Fix a small race condition in npf_nat_getaddr().
- Rework pserialize/EBR wrappers, make it easier to maintain.
Move PACKET_TAG_NPF where it belongs to.
Make npfctl_switch() and pfil private to OS-specific module.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 25 13:21:03 2019 UTC (4 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.47: +12 -6 lines
Diff to previous 1.47 (colored) to selected 1.1 (colored)

- npfctl_load_nvlist: simplify the config loading logic.
- Fix a small race condition in npf_nat_getaddr().
- Rework pserialize/EBR wrappers, make it easier to maintain.

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Tue Aug 13 14:35:55 2019 UTC (4 years, 8 months ago) by martin
Branch: netbsd-9
Changes since 1.46: +13 -7 lines
Diff to previous 1.46 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #49):

	usr.sbin/npf/npf.7: revision 1.7
	sys/net/npf/npfkern.h: revision 1.4
	sys/net/npf/npf_conn.h: revision 1.18
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.13
	sys/net/npf/npf_ctl.c: revision 1.55
	sys/net/npf/npf_os.c: revision 1.14
	sys/net/npf/npf_conf.c: revision 1.14
	usr.sbin/npf/npftest/libnpftest/npf_conn_test.c: revision 1.3
	usr.sbin/npf/npftest/libnpftest/npf_perf_test.c: revision 1.9
	sys/net/npf/npf_impl.h: revision 1.76
	sys/net/npf/npf_portmap.c: revision 1.4
	sys/net/npf/npf_params.c: revision 1.2
	sys/net/npf/npf.c: revision 1.40
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.16
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.18
	sys/net/npf/npf_nat.c: revision 1.47
	sys/net/npf/npf_handler.c: revision 1.47
	sys/net/npf/npf_inet.c: revision 1.55
	sys/net/npf/npf_if.c: revision 1.10
	sys/net/npf/npf_worker.c: revision 1.7
	usr.sbin/npf/npf-params.7: revision 1.3

npf-params(7): add more bpf.jit details.
From David H. Gutteridge.

Adjust some internal NPF APIs:
* npfkern: use the npfk_ prefix.
* NPF portmap: amend the API so it could be used elsewhere.
* Make npf_connkey_t public.

npf.7: add xref to npf-params.7
(Adding directly here since this particular file isn't included in
rmind@'s upstream GitHub repo at present.)

Revision 1.47 / (download) - annotate - [select for diffs], Sun Aug 11 20:26:34 2019 UTC (4 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.46: +13 -7 lines
Diff to previous 1.46 (colored) to selected 1.1 (colored)

Adjust some internal NPF APIs:
* npfkern: use the npfk_ prefix.
* NPF portmap: amend the API so it could be used elsewhere.
* Make npf_connkey_t public.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jul 23 00:52:01 2019 UTC (4 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.45: +94 -253 lines
Diff to previous 1.45 (colored) to selected 1.1 (colored)

NPF improvements:
- Add support for dynamic NETMAP algorithm (stateful net-to-net).
- Add most of the support for the dynamic NAT rules; a little bit more
  userland work is needed to finish this up and enable.
- Replace 'stateful-ends' with more permissive 'stateful-all'.
- Add various tunable parameters and document them, see npf-params(7).
- Reduce the memory usage of the connection state table (conndb).
- Portmap rewrite: use memory more efficiently, handle addresses dynamically.
- Bug fix: add splsoftnet()/splx() around the thmap writers and comment.
- npftest: clean up and simplify; fix some memleaks to make ASAN happy.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:46 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.43: +167 -94 lines
Diff to previous 1.43 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.41.14.4 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:37 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.41.14.3: +136 -56 lines
Diff to previous 1.41.14.3 (colored) to branchpoint 1.41 (colored) next main 1.42 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Sat Jan 19 21:19:32 2019 UTC (5 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, isaki-audio2-base, isaki-audio2
Changes since 1.44: +136 -56 lines
Diff to previous 1.44 (colored) to selected 1.1 (colored)

Major NPF improvements:
- Convert NPF connection table to thmap.  State lookup is now lock-free.
- Improve connection state G/C: it is now incremental and tunable.
- Add support for dynamic NAT address.  Translation addresses can now be
  selected from a pool of addresses.  There are two selection algorithms,
  "ip-hash" and "round-robin" (see the man page).
- Translation address can be specified as e.g. ifaddrs(wm0) in npf.conf
  to dynamically choose an IP from the interface address(es).
- Add support for the NETMAP algorithm with static NAT for net-to-net
  translation (it is equivalent to iptables NETMAP logic).
- Convert 'ipset' tables to use thmap; the table lookup is now lock-free.
- Misc improvements, bug fixes and more unit tests.
- Bump NPF_VERSION (will also bump libnpf).

Revision 1.41.14.3 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:56 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.41.14.2: +42 -49 lines
Diff to previous 1.41.14.2 (colored) to branchpoint 1.41 (colored) to selected 1.1 (colored)

Ssync with HEAD

Revision 1.44 / (download) - annotate - [select for diffs], Sat Sep 29 14:41:36 2018 UTC (5 years, 6 months ago) by rmind
Branch: MAIN
CVS Tags: pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.43: +42 -49 lines
Diff to previous 1.43 (colored) to selected 1.1 (colored)

NPF: Major rework -- migrate NPF to the libnv library.
- This conversion significantly simplifies the code and moves NPF to
  a binary serialisation format (replacing the XML-like format).
- Fix some memory/reference leaks and possibly use-after-free bugs.
- Bump NPF_VERSION as this change makes libnpf incompatible with the
  previous versions.  Also, different serialisation format means NPF
  connection/config saving and loading is not compatible with the
  previous versions either.

Thanks to christos@ for extra testing.

Revision 1.41.14.2 / (download) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.41.14.1: +3 -3 lines
Diff to previous 1.41.14.1 (colored) to branchpoint 1.41 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.43 / (download) - annotate - [select for diffs], Fri May 11 13:52:48 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored) to selected 1.1 (colored)

Improve comment, it's not just IPv4.

Revision 1.41.8.1 / (download) - annotate - [select for diffs], Sat May 5 19:15:55 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) next main 1.42 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by prlw1 in ticket #795):

	sys/net/npf/npf_nat.c: revision 1.42

PR/53207: David Binderman: Use logical and

Revision 1.41.14.1 / (download) - annotate - [select for diffs], Wed May 2 07:20:23 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) to selected 1.1 (colored)

Synch with HEAD

Revision 1.42 / (download) - annotate - [select for diffs], Mon Apr 23 15:36:30 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-0502
Changes since 1.41: +3 -3 lines
Diff to previous 1.41 (colored) to selected 1.1 (colored)

PR/53207: David Binderman: Use logical and

Revision 1.17.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:03 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.17.2.3: +51 -21 lines
Diff to previous 1.17.2.3 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored) to selected 1.1 (colored)

update from HEAD

Revision 1.32.2.6 / (download) - annotate - [select for diffs], Fri May 12 05:32:12 2017 UTC (6 years, 11 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.32.2.5: +4 -2 lines
Diff to previous 1.32.2.5 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by jnemeth in ticket #1394):
	sys/net/npf/npf_inet.c: revisions 1.34, 1.35 via patch
	sys/net/npf/npf_mbuf.c: revision 1.16
	sys/net/npf/npf_nat.c: revision 1.40
minimal changes necessary to link into an INET6-less kernel.
--
fixup misplaced #endif

Revision 1.35.2.3 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:58 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.35.2.2: +14 -13 lines
Diff to previous 1.35.2.2 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.40.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:50 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.40: +14 -13 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.1 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.41 / (download) - annotate - [select for diffs], Mon Dec 26 23:05:06 2016 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-compat-base, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, netbsd-8-base, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: pgoyette-compat, netbsd-8
Changes since 1.40: +14 -13 lines
Diff to previous 1.40 (colored) to selected 1.1 (colored)

Sync NPF with the version on github: backport standalone NPF changes,
which allow us to create and run separate NPF instances. Minor fixes.
(from rmind@)

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:32 2016 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.35.2.1: +4 -2 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 18 10:09:46 2016 UTC (8 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.39: +4 -2 lines
Diff to previous 1.39 (colored) to selected 1.1 (colored)

minimal changes necessary to link into an INET6-less kernel.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:22 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.35: +21 -6 lines
Diff to previous 1.35 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.32.2.5 / (download) - annotate - [select for diffs], Sun Jan 4 11:37:38 2015 UTC (9 years, 3 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.32.2.4: +3 -2 lines
Diff to previous 1.32.2.4 (colored) to branchpoint 1.32 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #374):
	sys/net/npf/npf_nat.c: revision 1.39
Don't forget to destroy the mutex before freeing the nat struct on a failed
load.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Dec 30 19:11:44 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.38: +3 -2 lines
Diff to previous 1.38 (colored) to selected 1.1 (colored)

Don't forget to destroy the mutex before freeing the nat struct on a failed
load.
XXX: pullup -7

Revision 1.32.2.4 / (download) - annotate - [select for diffs], Mon Dec 22 02:10:30 2014 UTC (9 years, 4 months ago) by msaitoh
Branch: netbsd-7
Changes since 1.32.2.3: +4 -4 lines
Diff to previous 1.32.2.3 (colored) to branchpoint 1.32 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #347):
	sys/net/npf/npf_nat.c: revision 1.38
	sys/net/npf/npf_conn.h: revision 1.8
	sys/net/npf/npf_conn.c: revision 1.14
NPF: set the connection flags atomically in the post-creation logic and
fix a tiny race condition window.  Might fix PR/49488.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Dec 20 16:19:43 2014 UTC (9 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored) to selected 1.1 (colored)

NPF: set the connection flags atomically in the post-creation logic and
fix a tiny race condition window.  Might fix PR/49488.

Revision 1.32.2.3 / (download) - annotate - [select for diffs], Mon Dec 1 13:05:26 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.32.2.2: +18 -4 lines
Diff to previous 1.32.2.2 (colored) to branchpoint 1.32 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #280):
	sys/net/npf/npf_ruleset.c: revision 1.40
	sys/net/npf/npf_nat.c: revision 1.36
	sys/net/npf/npf_nat.c: revision 1.37
	sys/net/npf/npf_conn.h: revision 1.7
	sys/net/npf/npf_conf.c: revision 1.9
	sys/net/npf/npf_ruleset.c: revision 1.39
	sys/net/npf/npf_conn.c: revision 1.13
	sys/net/npf/npf_impl.h: revision 1.60
NPF:
- npf_nat_import: take the port only if using the portmap.
- Sprinkle some comments and asserts.
- npf_config_load: if loading the connections, do not perform any actice
  NAT policy take over or or portmap sharing - just replace them all.
- npf_config_fini: flush with the empty connection database.
- npf_nat_import: fix the stat counter.

Revision 1.32.2.2 / (download) - annotate - [select for diffs], Mon Dec 1 09:02:26 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.32.2.1: +14 -9 lines
Diff to previous 1.32.2.1 (colored) to branchpoint 1.32 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #274):
	sys/net/npf/npf_nat.c: revision 1.35
	sys/net/npf/npf_ruleset.c: revision 1.38
NPF: fix the reference counting and share the active NAT portmap correctly
when performing the reload.  Should fixes PR/49412, reported by kardel@.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 30 01:37:53 2014 UTC (9 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.36: +5 -2 lines
Diff to previous 1.36 (colored) to selected 1.1 (colored)

- npf_config_load: if loading the connections, do not perform any actice
  NAT policy take over or or portmap sharing - just replace them all.
- npf_config_fini: flush with the empty connection database.
- npf_nat_import: fix the stat counter.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Nov 30 00:40:55 2014 UTC (9 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.35: +15 -4 lines
Diff to previous 1.35 (colored) to selected 1.1 (colored)

NPF:
- npf_nat_import: take the port only if using the portmap.
- Sprinkle some comments and asserts.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 26 21:25:35 2014 UTC (9 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.34: +14 -9 lines
Diff to previous 1.34 (colored) to selected 1.1 (colored)

NPF: fix the reference counting and share the active NAT portmap correctly
when performing the reload.  Should fixes PR/49412, reported by kardel@.

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Fri Aug 29 11:14:14 2014 UTC (9 years, 7 months ago) by martin
Branch: netbsd-7
Changes since 1.32: +11 -4 lines
Diff to previous 1.32 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #56):
	sys/net/npf/npf_ctl.c: revision 1.39
	usr.sbin/npf/npfctl/npfctl.c: revision 1.43
	lib/libnpf/npf.c: revision 1.33
	lib/libnpf/npf.c: revision 1.34
	sys/net/npf/npf_impl.h: revision 1.59
	sys/net/npf/npf_ctl.c: revision 1.40
	sys/net/npf/npf_conn.c: revision 1.11
	sys/net/npf/npf_alg.c: revision 1.15
	sys/net/npf/npf_conn.c: revision 1.12
	sys/net/npf/npf_nat.c: revision 1.33
	sys/net/npf/npf_nat.c: revision 1.34
Add and use npf_alg_export().
npf_conn_import: handle NAT metadata correctly.
npf_nat_newpolicy: restore the policy ID.
npfctl_load: fix error code handling for the limit cases.
npf_config_import: fix the inverted logic.
npfctl_load: improve error handling.
npf_conn_import: add a missing stat counter increment.
npf_nat_import: add a missing reference and make a comment.
npf_config_submit: finally, include the saved connections.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Aug 24 20:36:30 2014 UTC (9 years, 7 months ago) by rmind
Branch: MAIN
Changes since 1.33: +9 -3 lines
Diff to previous 1.33 (colored) to selected 1.1 (colored)

- npf_conn_import: add a missing stat counter increment.
- npf_nat_import: add a missing reference and make a comment.

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:35 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.17.2.2: +277 -255 lines
Diff to previous 1.17.2.2 (colored) to branchpoint 1.17 (colored) to selected 1.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Aug 11 23:48:01 2014 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.32: +4 -3 lines
Diff to previous 1.32 (colored) to selected 1.1 (colored)

- Add and use npf_alg_export().
- npf_conn_import: handle NAT metadata correctly.
- npf_nat_newpolicy: restore the policy ID.
- npfctl_load: fix error code handling for the limit cases.
- npf_config_import: fix the inverted logic.
- npfctl_load: improve error handling.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Aug 10 19:09:43 2014 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.31: +31 -7 lines
Diff to previous 1.31 (colored) to selected 1.1 (colored)

- Add npf_ruleset_export(), npf_rule_export() and npf_nat_policyexport().
- Split off npf_conn_export().  Add npf_ifmap_getname() and use it to save
  the interface name; pick it up on npf_conn_import().
- Misc fixes.  Bump NPF_VERSION.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:16 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.27: +141 -166 lines
Diff to previous 1.27 (colored) next main 1.28 (colored) to selected 1.1 (colored)

Rebase.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jul 23 01:25:34 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.30: +72 -94 lines
Diff to previous 1.30 (colored) to selected 1.1 (colored)

NPF: rework of the connection saving and restoring:
- Add support for saving a snapshot of the current connections together
  with a full configuration.  Support a reverse load operation.  Eliminate
  the old 'sess-save' and 'sess-load' in favour of the new mechanism.
- Share code between load and reload operations: the latter performs
  load from npf.conf without affecting the connections.
- Simplify and fix races with connection loading.
- Bump NPF_VERSION.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jul 20 00:37:41 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.29: +16 -15 lines
Diff to previous 1.29 (colored) to selected 1.1 (colored)

NPF: add nbuf_t * into npf_cache_t and remove unnecessary carrying by argument.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jul 19 18:24:16 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.28: +49 -48 lines
Diff to previous 1.28 (colored) to selected 1.1 (colored)

NPF: partially rewrite the connection tracking mechanism:
- Separate the tracking interface from the storage (state table)
  and thus prepare to use a new data structure for the storage.
- Fix some race conditions in NAT association logic.

Revision 1.28 / (download) - annotate - [select for diffs], Fri May 30 23:26:06 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.27: +22 -27 lines
Diff to previous 1.27 (colored) to selected 1.1 (colored)

- npf_nat_freepolicy: handle a race condition when a new connection might
  be associated with a NAT policy which is going away and npfctl reload
  would wait for its natural expiration (potentially long time).
- Remove npf_ruleset_natreload() by merging into npf_ruleset_reload().
- npf_ruleset_reload: eliminate a small time period when a valid NAT
  policy might be inactive during the reload operation.

Revision 1.6.6.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:09 2014 UTC (9 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.6.6.4: +174 -141 lines
Diff to previous 1.6.6.4 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.1 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.20.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.20: +145 -122 lines
Diff to previous 1.20 (colored) next main 1.21 (colored) to selected 1.1 (colored)

sync with head

Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 14 11:29:44 2014 UTC (10 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored) to selected 1.1 (colored)

NPF: add support for "stateful-ends".

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 19 03:51:31 2014 UTC (10 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.25: +10 -53 lines
Diff to previous 1.25 (colored) to selected 1.1 (colored)

NPF: fix the recent breakage of the traceroute ALG.  Also, simplify and
refactor a little bit.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 13 03:34:40 2014 UTC (10 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.24: +54 -10 lines
Diff to previous 1.24 (colored) to selected 1.1 (colored)

NPF: add support for IPv6-to-IPv6 Network Prefix Translation (NPTv6),
as per RFC 6296.  Add a unit test.  Also, bump NPF_VERSION.

Thanks to S.P.Zeidler for the help with NPTv6 work!

Revision 1.24 / (download) - annotate - [select for diffs], Fri Feb 7 23:45:22 2014 UTC (10 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.23: +60 -39 lines
Diff to previous 1.23 (colored) to selected 1.1 (colored)

NPF: add support for static (stateless) NAT.

Revision 1.23 / (download) - annotate - [select for diffs], Fri Dec 6 01:33:37 2013 UTC (10 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.22: +49 -39 lines
Diff to previous 1.22 (colored) to selected 1.1 (colored)

NPF:
- Adjust NAT to not assume flow direction in some cases and thus support
  less usual setups which are possible when using 'map' with a custom
  filter criteria.
- Introduce NPF_SRC/NPF_DST and replace npc_src/npc_dst with npc_ips[2]
  for more convenient handling.
- ICMP ALG: restrict matching only to the outgoing traffic, but be more
  direction-agnostic elsewhere.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Dec 4 01:38:49 2013 UTC (10 years, 4 months ago) by rmind
Branch: MAIN
Changes since 1.21: +48 -57 lines
Diff to previous 1.21 (colored) to selected 1.1 (colored)

- npf_do_nat: fix a race condition and simplify the logic.
- npf_session_setnat: clear the NAT association on failure.

Revision 1.10.2.8.2.1 / (download) - annotate - [select for diffs], Sun Nov 17 19:17:04 2013 UTC (10 years, 5 months ago) by bouyer
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE
Changes since 1.10.2.8: +3 -3 lines
Diff to previous 1.10.2.8 (colored) next main 1.10.2.9 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #985):
	sys/net/npf/npf_impl.h: revision 1.35
	sys/net/npf/npf_nat.c: revision 1.21
	sys/net/npf/npf_session.c: revision 1.26
npf_session_setnat: fix the race condition when the old connection is still
being expired while a new/duplicate is being created.

Revision 1.10.2.9 / (download) - annotate - [select for diffs], Sun Nov 17 19:16:57 2013 UTC (10 years, 5 months ago) by bouyer
Branch: netbsd-6
Changes since 1.10.2.8: +3 -3 lines
Diff to previous 1.10.2.8 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #985):
	sys/net/npf/npf_impl.h: revision 1.35
	sys/net/npf/npf_nat.c: revision 1.21
	sys/net/npf/npf_session.c: revision 1.26
npf_session_setnat: fix the race condition when the old connection is still
being expired while a new/duplicate is being created.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 29 16:39:10 2013 UTC (10 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored) to selected 1.1 (colored)

npf_session_setnat: fix the race condition when the old connection is still
being expired while a new/duplicate is being created.

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:25 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.17.2.1: +9 -4 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored) to selected 1.1 (colored)

resync from head

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jun 2 02:20:04 2013 UTC (10 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.19: +9 -4 lines
Diff to previous 1.19 (colored) to selected 1.1 (colored)

- NPF connection tracking: rework synchronisation on tracking disable/enable
  points and document it.  Split the worker thread into a separate module
  with an interface, so it could be re-used for other tasks.
- Replace ALG list with arrays and thus hit fewer cache lines.
- Misc bug fixes.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:03 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.17: +55 -41 lines
Diff to previous 1.17 (colored) to selected 1.1 (colored)

resync with head

Revision 1.10.2.8 / (download) - annotate - [select for diffs], Mon Feb 11 21:49:49 2013 UTC (11 years, 2 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Branch point for: netbsd-6-1
Changes since 1.10.2.7: +28 -23 lines
Diff to previous 1.10.2.7 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #817):
	usr.sbin/npf/npfctl/npfctl.8: revision 1.12
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.27
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.18
	usr.sbin/npf/npfctl/npf_build.c: revision 1.20
	usr.sbin/npf/npfctl/npfctl.c: revision 1.28
	lib/libnpf/npf.c: revision 1.16
	usr.sbin/npf/npfctl/npfctl.c: revision 1.29
	lib/libnpf/npf.c: revision 1.17
	sys/modules/npf/Makefile: revision 1.12
	sys/net/npf/npf_rproc.c: revision 1.6
	usr.sbin/npf/npftest/README: revision 1.4
	sys/net/npf/npf_tableset.c: revision 1.17
	sys/net/npf/npf_ctl.c: revision 1.21
	sys/net/npf/npf_ctl.c: revision 1.22
	usr.sbin/npf/npfctl/npfctl.h: revision 1.25
	lib/libnpf/npf.h: revision 1.13
	usr.sbin/npf/npftest/npftest.conf: revision 1.2
	usr.sbin/npf/npfctl/npfctl.h: revision 1.26
	sys/net/npf/npf_ruleset.c: revision 1.17
	lib/libnpf/npf.h: revision 1.14
	sys/net/npf/npf_ruleset.c: revision 1.18
	sys/net/npf/npf_conf.c: revision 1.1
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.10
	sys/net/npf/npf_conf.c: revision 1.2
	sys/net/npf/npf_instr.c: revision 1.16
	sys/net/npf/npf_handler.c: revision 1.26
	sys/net/npf/npf_impl.h: revision 1.26
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.14
	sys/net/npf/npf_processor.c: revision 1.15
	sys/net/npf/npf_impl.h: revision 1.27
	sys/net/npf/npf_alg_icmp.c: revision 1.15
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.15
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.16
	sys/net/npf/npf_ncode.h: revision 1.11
	sys/net/npf/files.npf: revision 1.10
	usr.sbin/npf/npftest/Makefile: revision 1.4
	usr.sbin/npf/npfctl/npfctl.c: revision 1.30
	lib/libnpf/npf.3: revision 1.8
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.4
	sys/net/npf/npf_session.c: revision 1.21
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.5
	usr.sbin/npf/npfctl/npf_build.c: revision 1.18
	usr.sbin/npf/npfctl/npf_build.c: revision 1.19
	sys/net/npf/npf_alg.c: revision 1.7
	usr.sbin/npf/npfctl/Makefile: revision 1.10
	sys/net/npf/npf_inet.c: revision 1.21
	sys/net/npf/npf.h: revision 1.26
	sys/net/npf/npf.h: revision 1.27
	usr.sbin/pf/ftp-proxy/Makefile: revision 1.8
	sys/net/npf/npf_nat.c: revision 1.19
	sys/net/npf/npf.c: revision 1.15
	sys/net/npf/npf_state.c: revision 1.14
	sys/net/npf/npf_sendpkt.c: revision 1.14
	sys/rump/net/lib/libnpf/Makefile: revision 1.4
IPv6 linklocal address printing cosmetics
NPF:
- Implement dynamic NPF rules.  Controlled through npf(3) library of via
  npfctl rule command.  A rule can be removed using a unique identifier,
  returned on addition, or using a key which is SHA1 hash of the rule.
  Adjust npftest and add a regression test.
- Improvements to rule inspection mechanism.
- Initial BPF support as an alternative to n-code.
- Minor fixes; bump the version.
Disable -DWITH_NPF for now; will be converted to BPF mechanism.
- Fix NPF config reload with dynamic rules present.
- Implement list and flush commands on a dynamic ruleset.
Allow filtering on IP addresses even if the L4 protocol is unknown.
Patch from spz@.
npftest: adjust for recent change.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 9 03:35:32 2013 UTC (11 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: khorben-n900, agc-symver-base, agc-symver
Changes since 1.18: +28 -23 lines
Diff to previous 1.18 (colored) to selected 1.1 (colored)

NPF:
- Implement dynamic NPF rules.  Controlled through npf(3) library of via
  npfctl rule command.  A rule can be removed using a unique identifier,
  returned on addition, or using a key which is SHA1 hash of the rule.
  Adjust npftest and add a regression test.
- Improvements to rule inspection mechanism.
- Initial BPF support as an alternative to n-code.
- Minor fixes; bump the version.

Revision 1.10.2.7 / (download) - annotate - [select for diffs], Fri Feb 8 19:18:11 2013 UTC (11 years, 2 months ago) by riz
Branch: netbsd-6
Changes since 1.10.2.6: +30 -21 lines
Diff to previous 1.10.2.6 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #777):
	usr.sbin/npf/npfctl/npfctl.c: revision 1.27
	sys/net/npf/npf_session.c: revision 1.19
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.4
	sys/net/npf/npf_rproc.c: revision 1.5
	usr.sbin/npf/npftest/README: revision 1.3
	sys/sys/mbuf.h: revision 1.151
	sys/net/npf/npf_ruleset.c: revision 1.15
	usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.3
	sys/net/npf/npf_ruleset.c: revision 1.16
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.4
	usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.4
	sys/net/npf/npf_inet.c: revision 1.19
	sys/net/npf/npf_instr.c: revision 1.15
	sys/net/npf/npf_handler.c: revision 1.24
	sys/net/npf/npf_handler.c: revision 1.25
	sys/net/npf/npf_state_tcp.c: revision 1.12
	sys/net/npf/npf_processor.c: revision 1.13
	sys/net/npf/npf_impl.h: revision 1.25
	sys/net/npf/npf_processor.c: revision 1.14
	sys/net/npf/npf_mbuf.c: revision 1.10
	sys/net/npf/npf_alg_icmp.c: revision 1.14
	sys/net/npf/npf_mbuf.c: revision 1.9
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.2
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.3
	sys/net/npf/npf_session.c: revision 1.20
	sys/net/npf/npf_alg.c: revision 1.6
	sys/kern/uipc_mbuf.c: revision 1.148
	sys/net/npf/npf_inet.c: revision 1.20
	sys/net/npf/npf.h: revision 1.25
	sys/net/npf/npf_nat.c: revision 1.18
	sys/net/npf/npf_state.c: revision 1.13
	sys/net/npf/npf_sendpkt.c: revision 1.13
	sys/net/npf/npf_ext_log.c: revision 1.2
	usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.4
	sys/net/npf/npf_ext_normalise.c: revision 1.2
- Rework NPF's nbuf interface: use advancing and ensuring as a main method.
  Eliminate unnecessary copy and simplify.  Adapt regression tests.
- Simplify ICMP ALG a little.  While here, handle ICMP ECHO for traceroute.
- Minor fixes, misc cleanup.
Silence gcc in npf_recache().
Add m_ensure_contig() routine, which is equivalent to m_pullup, but does not
destroy the mbuf chain on failure (it is kept valid).
- nbuf_ensure_contig: rework to use m_ensure_contig(9), which will not free
  the mbuf chain on failure.  Fixes some corner cases.  Improve regression
  test and sprinkle some asserts.
- npf_reassembly: clear nbuf on IPv6 reassembly failure path (partial fix).
  The problem was found and fix provided by Anthony Mallet.

Revision 1.6.6.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:25 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.6.6.3: +30 -21 lines
Diff to previous 1.6.6.3 (colored) to branchpoint 1.6 (colored) to selected 1.1 (colored)

sync with head

Revision 1.18 / (download) - annotate - [select for diffs], Mon Dec 24 19:05:44 2012 UTC (11 years, 3 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.17: +30 -21 lines
Diff to previous 1.17 (colored) to selected 1.1 (colored)

- Rework NPF's nbuf interface: use advancing and ensuring as a main method.
  Eliminate unnecessary copy and simplify.  Adapt regression tests.
- Simplify ICMP ALG a little.  While here, handle ICMP ECHO for traceroute.
- Minor fixes, misc cleanup.

Revision 1.6.6.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:44 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.6.6.2: +32 -23 lines
Diff to previous 1.6.6.2 (colored) to branchpoint 1.6 (colored) to selected 1.1 (colored)

sync with head

Revision 1.10.2.6 / (download) - annotate - [select for diffs], Sun Aug 19 17:40:31 2012 UTC (11 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.10.2.5: +5 -5 lines
Diff to previous 1.10.2.5 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #511):
	lib/libnpf/npf.c: revision 1.12
	sys/net/npf/npf_ctl.c: revision 1.17
	sys/net/npf/npf_nat.c: revision 1.17
- {npf_mk_rproc,npf_nat_save}: fix the fetching of {rproc-ptr,id_ptr}.
- npf_rproc_setlog: initialise variables to 0, as keys may not exist.
Bugs found by mlelstv@ while testing on Amiga.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 15 18:44:56 2012 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored) to selected 1.1 (colored)

- {npf_mk_rproc,npf_nat_save}: fix the fetching of {rproc-ptr,id_ptr}.
- npf_rproc_setlog: initialise variables to 0, as keys may not exist.

Bugs found by mlelstv@ while testing on Amiga.

Revision 1.10.2.5 / (download) - annotate - [select for diffs], Mon Aug 13 17:49:52 2012 UTC (11 years, 8 months ago) by riz
Branch: netbsd-6
Changes since 1.10.2.4: +6 -5 lines
Diff to previous 1.10.2.4 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #485):
	lib/libnpf/npf.c: revision 1.11
	sys/net/npf/npf_session.c: revision 1.17
	sys/modules/npf/Makefile: revision 1.10
	usr.sbin/npf/npftest/npftest.c: revision 1.4
	usr.sbin/npf/npftest/README: revision 1.1
	sys/net/npf/npf_tableset.c: revision 1.14
	usr.sbin/npf/npftest/npftest.h: revision 1.4
	lib/libnpf/npf.h: revision 1.10
	sys/net/npf/npf_ruleset.c: revision 1.14
	usr.sbin/npf/npfctl/npf_data.c: revision 1.18
	usr.sbin/npf/npftest/npftest.conf: revision 1.1
	sys/net/npf/npf_handler.c: revision 1.21
	sys/net/npf/npf_impl.h: revision 1.21
	usr.sbin/npf/npfctl/npfctl.c: revision 1.18
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_build.c: revision 1.13
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.1
	usr.sbin/npf/npftest/npfstream.c: revision 1.3
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.4
	usr.sbin/npf/npfctl/npfctl.h: revision 1.19
	sys/net/npf/npf_nat.c: revision 1.16
	sys/net/npf/npf_state.c: revision 1.11
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.3
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.5
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.12
- Extend npftest: add ruleset inspection testing from the config generated
  by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Aug 12 03:35:14 2012 UTC (11 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.15: +6 -5 lines
Diff to previous 1.15 (colored) to selected 1.1 (colored)

- Extend npftest: add ruleset inspection testing from the config generated
  by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.

Revision 1.10.2.4 / (download) - annotate - [select for diffs], Mon Jul 16 22:13:27 2012 UTC (11 years, 9 months ago) by riz
Branch: netbsd-6
Changes since 1.10.2.3: +16 -6 lines
Diff to previous 1.10.2.3 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #421):
	lib/libnpf/npf.c: revision 1.10
	sys/net/npf/npf_session.c: revision 1.15
	sys/net/npf/npf_tableset.c: revision 1.13
	sys/net/npf/npf_state_tcp.c: revision 1.9
	usr.sbin/npf/npfctl/npf_data.c: revision 1.15
	sys/net/npf/npf_inet.c: revision 1.14
	sys/net/npf/npf_ruleset.c: revision 1.13
	sys/net/npf/npf.h: revision 1.19
	usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.12
	sys/net/npf/npf_instr.c: revision 1.13
	sys/net/npf/npf_handler.c: revision 1.20
	usr.sbin/npf/npftest/libnpftest/npf_table_test.c: revision 1.4
	sys/net/npf/npf_alg_icmp.c: revision 1.10
	usr.sbin/npf/npfctl/npfctl.c: revision 1.15
	usr.sbin/npf/npfctl/npf_build.c: revision 1.11
	lib/libnpf/npf.h: revision 1.9
	sys/net/npf/npf_alg.c: revision 1.5
	sys/rump/dev/lib/libnpf/Makefile: revision 1.4
	usr.sbin/npf/npfctl/npfctl.h: revision 1.17
	sys/net/npf/npf_ctl.c: revision 1.16
	sys/net/npf/npf_nat.c: revision 1.15
	sys/net/npf/npf_tableset_ptree.c: revision 1.1
	sys/net/npf/npf.c: revision 1.12
	sys/net/npf/npf_sendpkt.c: revision 1.12
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.7
	sys/net/npf/npf_impl.h: revision 1.18
	sys/net/npf/files.npf: revision 1.7
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.10
- Rework NPF tables and fix support for IPv6.  Implement tree table type
  using radix / Patricia tree.  Universal IPv4/IPv6 comparator for ptree(3)
  was contributed by Matt Thomas.
- NPF tables: update regression tests, improve npfctl(8) error messages.
- Fix few bugs when using kernel modules and handle module autounloader.
- Few other fixes and misc cleanups.
- Bump the version.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jul 15 00:23:00 2012 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.14: +16 -6 lines
Diff to previous 1.14 (colored) to selected 1.1 (colored)

- Rework NPF tables and fix support for IPv6.  Implement tree table type
  using radix / Patricia tree.  Universal IPv4/IPv6 comparator for ptree(3)
  was contributed by Matt Thomas.
- NPF tables: update regression tests, improve npfctl(8) error messages.
- Fix few bugs when using kernel modules and handle module autounloader.
- Few other fixes and misc cleanups.
- Bump the version.

Revision 1.10.2.3 / (download) - annotate - [select for diffs], Thu Jul 5 17:48:42 2012 UTC (11 years, 9 months ago) by riz
Branch: netbsd-6
Changes since 1.10.2.2: +7 -15 lines
Diff to previous 1.10.2.2 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #399):
	sys/net/npf/npf_session.c: revision 1.14
	sys/net/npf/npf_tableset.c: revision 1.12
	sys/net/npf/npf_state_tcp.c: revision 1.8
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.3
	usr.sbin/npf/npfctl/npf_data.c: revision 1.14
	sys/net/npf/npf_inet.c: revision 1.13
	sys/net/npf/npf_ruleset.c: revision 1.12
	sys/net/npf/npf.h: revision 1.18
	usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.11
	usr.sbin/npf/npfctl/npfctl.8: revision 1.7
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.9
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.2
	usr.sbin/npf/npfctl/npfctl.8: revision 1.8
	sys/net/npf/npf_instr.c: revision 1.12
	usr.sbin/npf/npftest/libnpftest/npf_table_test.c: revision 1.3
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.13
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.14
	sys/net/npf/npf_state.c: revision 1.9
	sys/net/npf/npf_processor.c: revision 1.11
	usr.sbin/npf/npfctl/npfctl.c: revision 1.13
	usr.sbin/npf/npfctl/npfctl.c: revision 1.14
	usr.sbin/npf/npfctl/npf_build.c: revision 1.10
	lib/libnpf/npf.3: revision 1.5
	lib/libnpf/npf.h: revision 1.8
	share/man/man9/npf_ncode.9: revision 1.9
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.4
	lib/libnpf/npf.c: revision 1.9
	usr.sbin/npf/npfctl/npfctl.h: revision 1.16
	sys/net/npf/npf_nat.c: revision 1.14
	usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.2
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.6
	sys/net/npf/npf_impl.h: revision 1.17
	sys/net/npf/npf_handler.c: revision 1.18
	sys/net/npf/npf_handler.c: revision 1.19
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.4
	sys/net/npf/npf_ncode.h: revision 1.9
Fix and update npf.conf(5), npfctl(8) and its usage message.
npf_state_tcp: fix for FIN retransmission and out-of-order ACK case.
NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary "pass proto <name/number>".
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.
npf_packet_handler: fix gcc unused warning.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 1 23:21:06 2012 UTC (11 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.13: +7 -15 lines
Diff to previous 1.13 (colored) to selected 1.1 (colored)

NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary "pass proto <name/number>".
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.

Revision 1.10.2.2 / (download) - annotate - [select for diffs], Tue Jun 26 14:49:10 2012 UTC (11 years, 9 months ago) by riz
Branch: netbsd-6
Changes since 1.10.2.1: +8 -2 lines
Diff to previous 1.10.2.1 (colored) to branchpoint 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #365):
	sys/rump/librump/rumpkern/rumpcpu_generic.c: revision 1.4
	sys/net/npf/npf_session.c: revision 1.13
	sys/net/npf/npf_tableset.c: revision 1.11
	sys/net/npf/npf_state_tcp.c: revision 1.7
	sys/net/npf/npf_inet.c: revision 1.12
	sys/net/npf/npf.h: revision 1.17
	sys/net/npf/npf_instr.c: revision 1.11
	usr.sbin/npf/npftest/libnpftest/npf_table_test.c: revision 1.2
	sys/net/npf/npf_state.c: revision 1.8
	sys/net/npf/npf_log.c: revision 1.4
	sys/net/npf/npf_alg.c: revision 1.4
	sys/rump/librump/rumpkern/Makefile.rumpkern: revision 1.118
	sys/net/npf/npf_nat.c: revision 1.13
	sys/net/npf/npf.c: revision 1.11
	sys/net/npf/npf_sendpkt.c: revision 1.11
	sys/net/npf/npf_impl.h: revision 1.16
	sys/rump/librump/rumpkern/scheduler.c: revision 1.28
rumpkern:
- Add subr_kcpuset.c and subr_pserialize.c modules.
- Add kcpuset_{running,attached} for RUMP env.
NPF:
- Rename some functions for consistency and de-inline them.
- Fix few invalid asserts (add regressoin test).
- Use pserialize(9) for ALG interface.
- Minor fixes, sprinkle many comments.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 22 13:43:17 2012 UTC (11 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.12: +8 -2 lines
Diff to previous 1.12 (colored) to selected 1.1 (colored)

NPF:
- Rename some functions for consistency and de-inline them.
- Fix few invalid asserts (add regressoin test).
- Use pserialize(9) for ALG interface.
- Minor fixes, sprinkle many comments.

Revision 1.6.6.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:39 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.6.6.1: +31 -16 lines
Diff to previous 1.6.6.1 (colored) to branchpoint 1.6 (colored) to selected 1.1 (colored)

sync with head

Revision 1.8.2.3 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:43 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.8.2.2: +15 -8 lines
Diff to previous 1.8.2.2 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored) to selected 1.1 (colored)

sync to latest -current.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Tue Apr 3 17:22:53 2012 UTC (12 years ago) by riz
Branch: netbsd-6
Changes since 1.10: +18 -11 lines
Diff to previous 1.10 (colored) to selected 1.1 (colored)

Pull up following revision(s) (requested by rmind in ticket #158):
	sys/net/npf/npf_session.c: revision 1.12
	sys/net/npf/npf_tableset.c: revision 1.10
	sys/net/npf/npf_rproc.c: revision 1.2
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.4
	sys/net/npf/npf_inet.c: revision 1.11
	sys/net/npf/npf.h: revision 1.15
	usr.sbin/npf/npfctl/npf_build.c: revision 1.5
	sys/net/npf/npf_ruleset.c: revision 1.11
	sys/net/npf/npf_instr.c: revision 1.10
	usr.sbin/npf/npfctl/Makefile: revision 1.6
	sys/net/npf/npf_processor.c: revision 1.10
	sys/net/npf/npf_log.c: revision 1.3
	lib/libnpf/npf.h: revision 1.7
	sys/net/npf/npf_alg.c: revision 1.3
	sys/net/npf/npf_sendpkt.c: revision 1.9
	lib/libnpf/npf.c: revision 1.8
	usr.sbin/npf/npfctl/npfctl.h: revision 1.13
	sys/net/npf/npf_ctl.c: revision 1.13
	usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.8
	sys/net/npf/npf_ctl.c: revision 1.14
	sys/net/npf/npf_nat.c: revision 1.11
	sys/net/npf/npf_nat.c: revision 1.12
	sys/net/npf/npf_impl.h: revision 1.11
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.1
	sys/net/npf/npf_impl.h: revision 1.12
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.2
	sys/net/npf/npf_handler.c: revision 1.14
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.3
	sys/net/npf/npf_handler.c: revision 1.15
	sys/net/npf/npf_ncode.h: revision 1.6
	sys/net/npf/npf.c: revision 1.8
	sys/net/npf/npf.c: revision 1.9
	sys/net/npf/npf_alg_icmp.c: revision 1.9
	sys/net/npf/npf_session.c: revision 1.11
- Add NPF_DECISION_BLOCK and NPF_DECISION_PASS.  Be more defensive in the
  packet handler.  Change the default policy to block when the config is
  loaded and set it to pass when flush operation is performed.
- Use kmem_zalloc(9) instead of kmem_alloc(9) in few places.
- npf_rproc_{create,release}: use kmem_intr_{alloc,free} as the destruction
  of rule procedure might happen in the interrupt handler (under a very rare
  condition, if config reload races with the handler).
- npf_session_establish: check whether layer 3 and 4 are cached.
- npfctl_build_group: do not make groups as passing rules.
- Remove some unecessary header inclusion.
Simplify slightly: merge iface into addr_or_iface, use it in filt_addr.
Add a small disassembler.
definitions used by the disassembler.
- better printing of type/code flags/mask
- pass the instruction start pointer, instead of subtracting 1 to account for it
- Save active config in proplib dictionary; add GETCONF ioctl to retrieve.
- Few fixes.  Improve some comments.
don't leak the branch target array.
Add NPF config retrieval routines.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Mar 11 18:27:59 2012 UTC (12 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.11: +17 -10 lines
Diff to previous 1.11 (colored) to selected 1.1 (colored)

- Save active config in proplib dictionary; add GETCONF ioctl to retrieve.
- Few fixes.  Improve some comments.

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Fri Feb 24 09:11:49 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.8.2.1: +3 -3 lines
Diff to previous 1.8.2.1 (colored) to branchpoint 1.8 (colored) to selected 1.1 (colored)

sync to -current.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 20 00:18:20 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored) to selected 1.1 (colored)

- Add NPF_DECISION_BLOCK and NPF_DECISION_PASS.  Be more defensive in the
  packet handler.  Change the default policy to block when the config is
  loaded and set it to pass when flush operation is performed.
- Use kmem_zalloc(9) instead of kmem_alloc(9) in few places.
- npf_rproc_{create,release}: use kmem_intr_{alloc,free} as the destruction
  of rule procedure might happen in the interrupt handler (under a very rare
  condition, if config reload races with the handler).
- npf_session_establish: check whether layer 3 and 4 are cached.
- npfctl_build_group: do not make groups as passing rules.
- Remove some unecessary header inclusion.

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:38 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.8: +12 -6 lines
Diff to previous 1.8 (colored) to selected 1.1 (colored)

merge to -current.

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 5 00:37:13 2012 UTC (12 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.9: +11 -6 lines
Diff to previous 1.9 (colored) to selected 1.1 (colored)

Multiple NPF fixes, add better error reporting from kernel side, add some
asserts, bump the version.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 15 00:49:48 2012 UTC (12 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored) to selected 1.1 (colored)

- Expire all sessions on flush.
- Enable checking for zero mask in IP{4,6}MATCH after npfctl changes.
- Make locking symmetric for npf_ruleset_inspect().
- Sync function prototypes in npf(3) man page with reality.
- Rename NPF_TABLE_RBTREE to NPF_TABLE_TREE.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:25 2011 UTC (12 years, 5 months ago) by tls
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.7: +5 -3 lines
Diff to previous 1.7 (colored) to selected 1.1 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:50 2011 UTC (12 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.6: +5 -4 lines
Diff to previous 1.6 (colored) to selected 1.1 (colored)

sync with head

Revision 1.7 / (download) - annotate - [select for diffs], Fri Nov 4 01:00:27 2011 UTC (12 years, 5 months ago) by zoltan
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, jmcneill-audiomp3-base, jmcneill-audiomp3
Changes since 1.6: +5 -4 lines
Diff to previous 1.6 (colored) to selected 1.1 (colored)

Add IPv6 support for NPF.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:53 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.4: +98 -63 lines
Diff to previous 1.4 (colored) next main 1.5 (colored) to selected 1.1 (colored)

Sync with HEAD.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:55 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.6.2.1: +836 -0 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored) to selected 1.1 (colored)

sync with head

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:01 2011 UTC (13 years, 2 months ago) by bouyer
Branch: bouyer-quota2
Changes since 1.5: +33 -30 lines
Diff to previous 1.5 (colored) next main 1.6 (colored) to selected 1.1 (colored)

Sync with HEAD

Revision 1.6.2.1, Wed Feb 2 02:20:25 2011 UTC (13 years, 2 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.6: +0 -836 lines
FILE REMOVED

file npf_nat.c was added on branch rmind-uvmplock on 2011-03-05 20:55:55 +0000

Revision 1.6 / (download) - annotate - [select for diffs], Wed Feb 2 02:20:25 2011 UTC (13 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Branch point for: yamt-pagecache, rmind-uvmplock
Changes since 1.5: +33 -30 lines
Diff to previous 1.5 (colored) to selected 1.1 (colored)

NPF checkpoint:
- Add libnpf(3) - a library to control NPF (configuration, ruleset, etc).
- Add NPF support for ftp-proxy(8).
- Add rc.d script for NPF.
- Convert npfctl(8) to use libnpf(3) and thus make it less depressive.
  Note: next clean-up step should be a parser, once dholland@ will finish it.
- Add more documentation.
- Various fixes.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jan 18 20:33:46 2011 UTC (13 years, 3 months ago) by rmind
Branch: MAIN
Branch point for: bouyer-quota2
Changes since 1.4: +67 -35 lines
Diff to previous 1.4 (colored) to selected 1.1 (colored)

NPF checkpoint:
- Add the concept of rule procedure: separate normalization, logging and
  potentially other functions from the rule structure.  Rule procedure can be
  shared amongst the rules.  Separation is both at kernel level (npf_rproc_t)
  and configuration ("procedure" + "apply").
- Fix portmap sharing for NAT policy.
- Update TCP state tracking logic.  Use TCP FSM definitions.
- Add if_byindex(), OK by matt@.  Use in logging for the lookup.
- Fix traceroute ALG and many other bugs; misc clean-up.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Dec 18 01:07:25 2010 UTC (13 years, 4 months ago) by rmind
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.3: +288 -120 lines
Diff to previous 1.3 (colored) to selected 1.1 (colored)

NPF checkpoint:
- Add support for session saving/restoring.
- Add packet logging support (can tcpdump a pseudo-interface).
- Support reload without flushing of sessions; rework some locking.
- Revisit session mangement, replace linking with npf_sentry_t entries.
- Add some counters for statistics, using percpu(9).
- Add IP_DF flag cleansing.
- Fix various bugs; misc clean-up.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Nov 11 06:30:39 2010 UTC (13 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.2: +65 -58 lines
Diff to previous 1.2 (colored) to selected 1.1 (colored)

NPF checkpoint:
- Add proper TCP state tracking as described in Guido van Rooij paper,
  plus handle TCP Window Scaling option.
- Completely rework npf_cache_t, reduce granularity, simplify code.
- Add npf_addr_t as an abstraction, amend session handling code, as well
  as NAT code et al, to use it.  Now design is prepared for IPv6 support.
- Handle IPv4 fragments i.e. perform packet reassembly.
- Add support for IPv4 ID randomization and minimum TTL enforcement.
- Add support for TCP MSS "clamping".
- Random bits for IPv6.  Various fixes and clean-up.

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Fri Oct 22 09:23:15 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.2.4.1: +626 -0 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.1 (colored)

Sync with HEAD (-D20101022).

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:37 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.2.2.1: +626 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored) to selected 1.1 (colored)

sync with head

Revision 1.2.4.1, Thu Sep 16 04:53:27 2010 UTC (13 years, 7 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.2: +0 -626 lines
FILE REMOVED

file npf_nat.c was added on branch uebayasi-xip on 2010-10-22 09:23:15 +0000

Revision 1.2.2.1, Thu Sep 16 04:53:27 2010 UTC (13 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.2: +0 -626 lines
FILE REMOVED

file npf_nat.c was added on branch yamt-nfs-mp on 2010-10-09 03:32:37 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 16 04:53:27 2010 UTC (13 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3
Branch point for: yamt-nfs-mp, uebayasi-xip
Changes since 1.1: +242 -166 lines
Diff to previous 1.1 (colored)

NPF checkpoint:
- Add support for bi-directional NAT and redirection / port forwarding.
- Finish filtering on ICMP type/code and add filtering on TCP flags.
- Add support for TCP reset (RST) or ICMP destination unreachable on block.
- Fix a bunch of bugs; misc cleanup.

Revision 1.1 / (download) - annotate - [selected], Sun Aug 22 18:56:22 2010 UTC (13 years, 8 months ago) by rmind
Branch: MAIN

Import NPF - a packet filter.  Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
  Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
  supporting generic RISC-like and specific CISC-like instructions for
  common patterns (e.g. IPv4 address matching).  See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>