The NetBSD Project

CVS log for src/sys/netinet6/nd6_rtr.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.149 / (download) - annotate - [select for diffs], Fri Jun 12 11:04:45 2020 UTC (3 years, 10 months ago) by roy
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, 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, thorpej-altq-separation-base, thorpej-altq-separation, 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, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.148: +52 -2169 lines
Diff to previous 1.148 (colored)

Remove in-kernel handling of Router Advertisements

This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html

Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.

Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.

Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).

Revision 1.143.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:44 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.143.2.3: +21 -11 lines
Diff to previous 1.143.2.3 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored)

Sync with HEAD

Revision 1.147.6.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:12 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.147: +23 -13 lines
Diff to previous 1.147 (colored) next main 1.148 (colored)

Sync with HEAD

Revision 1.93.2.3.2.1 / (download) - annotate - [select for diffs], Wed Apr 15 14:59:33 2020 UTC (3 years, 11 months ago) by martin
Branch: netbsd-7-0
Changes since 1.93.2.3: +23 -13 lines
Diff to previous 1.93.2.3 (colored) next main 1.93.2.4 (colored)

Pull up following revision(s) (requested by kim in ticket #1727):

	sys/netinet6/nd6_rtr.c: revision 1.148 (via patch)

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.93.2.3.6.1 / (download) - annotate - [select for diffs], Wed Apr 15 14:58:41 2020 UTC (3 years, 11 months ago) by martin
Branch: netbsd-7-1
Changes since 1.93.2.3: +23 -13 lines
Diff to previous 1.93.2.3 (colored) next main 1.93.2.4 (colored)

Pull up following revision(s) (requested by kim in ticket #1727):

	sys/netinet6/nd6_rtr.c: revision 1.148 (via patch)

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.93.2.4 / (download) - annotate - [select for diffs], Wed Apr 15 14:52:28 2020 UTC (3 years, 11 months ago) by martin
Branch: netbsd-7
Changes since 1.93.2.3: +23 -13 lines
Diff to previous 1.93.2.3 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

Pull up following revision(s) (requested by kim in ticket #1727):

	sys/netinet6/nd6_rtr.c: revision 1.148 (via patch)

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.135.6.5 / (download) - annotate - [select for diffs], Wed Apr 15 14:27:54 2020 UTC (3 years, 11 months ago) by martin
Branch: netbsd-8
Changes since 1.135.6.4: +23 -13 lines
Diff to previous 1.135.6.4 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

Pull up following revision(s) (requested by kim in ticket #1531):

	sys/netinet6/nd6_rtr.c: revision 1.148

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Tue Apr 14 17:26:22 2020 UTC (4 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.145: +23 -13 lines
Diff to previous 1.145 (colored) next main 1.146 (colored)

Pull up following revision(s) (requested by kim in ticket #834):

	sys/netinet6/nd6_rtr.c: revision 1.148

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.148 / (download) - annotate - [select for diffs], Mon Apr 13 14:04:27 2020 UTC (4 years ago) by kim
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.147: +23 -13 lines
Diff to previous 1.147 (colored)

Fix default route selection

The primary issue was that in revision 1.79 a check was added in the
nd6_defrouter_select() search loop to ignore the entry if RA processing
is enabled on its interface.  In practice this results in all entries
being ignored.

This fix reverses the condition, so that an entry is ignored when RA
processing is NOT enabled on its interface.  Further, the entry is
only ignored for being selected as the default router.  The currently
installed router must be identified regardless of the (current) status
of its interface, so that we can delete the route before installing a
new one.

I also added error logging when adding or deleting a route fails. This
should help the administrator (or kernel developer) in noticing possible
problems.

Finally, if deleting a route fails, the corresponding default route
entry no longer has its "installed" flag cleared, so that deletion will
be retried.  At a minimum, this will cause repeated messages about the
failed deletion as opposed to only getting repeated messages about the
installation of a new default route failing.

Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour
observed with ndp(8).

Revision 1.143.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:17 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.143.2.2: +3 -2 lines
Diff to previous 1.143.2.2 (colored) to branchpoint 1.143 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.143.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:58 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.143.2.1: +3 -3 lines
Diff to previous 1.143.2.1 (colored) to branchpoint 1.143 (colored)

Merge changes from current as of 20200406

Revision 1.147 / (download) - annotate - [select for diffs], Fri Dec 27 10:17:56 2019 UTC (4 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: bouyer-xenpvh
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored)

s/referece/reference/ in comment.

Revision 1.146 / (download) - annotate - [select for diffs], Wed Sep 25 09:53:38 2019 UTC (4 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.145: +5 -4 lines
Diff to previous 1.145 (colored)

Make panic messages more informative

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:48 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.143: +17 -11 lines
Diff to previous 1.143 (colored)

Sync with HEAD

Revision 1.145 / (download) - annotate - [select for diffs], Mon Apr 29 11:57:22 2019 UTC (4 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Changes since 1.144: +3 -4 lines
Diff to previous 1.144 (colored)

rtsock: Route address message simplification

Rename rt_newaddrmsg to rt_addrmsg_rt.
Add rt_addrmsg which drops the error and route arguments which are only
needed by one caller.

Revision 1.138.2.3 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:45 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.138.2.2: +16 -9 lines
Diff to previous 1.138.2.2 (colored) to branchpoint 1.138 (colored) next main 1.139 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.135.6.4 / (download) - annotate - [select for diffs], Wed Aug 15 12:09:58 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.135.6.3: +16 -9 lines
Diff to previous 1.135.6.3 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #975):

	sys/netinet6/nd6_rtr.c: revision 1.144

Don't call find_pfxlist_reachable_router, which may sleep, in a
pserialize read section

Found by knakahara@

Revision 1.144 / (download) - annotate - [select for diffs], Tue Aug 14 01:10:58 2018 UTC (5 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, isaki-audio2-base, isaki-audio2
Changes since 1.143: +16 -9 lines
Diff to previous 1.143 (colored)

Don't call find_pfxlist_reachable_router, which may sleep, in a pserialize read section

Found by knakahara@

Revision 1.135.6.3 / (download) - annotate - [select for diffs], Tue May 22 17:41:12 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.135.6.2: +3 -2 lines
Diff to previous 1.135.6.2 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by maxv in ticket #830):

	sys/netinet6/nd6_rtr.c: revision 1.142

Add missing m_put_rcvif_psref.

Revision 1.138.2.2 / (download) - annotate - [select for diffs], Mon May 21 04:36:16 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.138.2.1: +11 -16 lines
Diff to previous 1.138.2.1 (colored) to branchpoint 1.138 (colored)

Sync with HEAD

Revision 1.143 / (download) - annotate - [select for diffs], Sat May 19 08:22:58 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.142: +10 -16 lines
Diff to previous 1.142 (colored)

Style.

Revision 1.142 / (download) - annotate - [select for diffs], Fri May 18 21:03:33 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.141: +3 -2 lines
Diff to previous 1.141 (colored)

Add missing m_put_rcvif_psref.

Revision 1.138.2.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.138: +4 -15 lines
Diff to previous 1.138 (colored)

Synch with HEAD

Revision 1.141 / (download) - annotate - [select for diffs], Tue May 1 07:21:39 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0502
Changes since 1.140: +2 -4 lines
Diff to previous 1.140 (colored)

Remove now unused net_osdep.h includes, the other BSDs did the same.

Revision 1.140 / (download) - annotate - [select for diffs], Tue Apr 24 08:22:16 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.139: +4 -6 lines
Diff to previous 1.139 (colored)

Remove nullcheck, m is not allowed to be null.

Revision 1.139 / (download) - annotate - [select for diffs], Tue Apr 24 08:07:05 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.138: +3 -10 lines
Diff to previous 1.138 (colored)

Remove the M_AUTHIPDGM flag. It is equivalent to M_AUTHIPHDR, both
are set in IPsec-AH, and they are always handled together.

Revision 1.135.6.2 / (download) - annotate - [select for diffs], Mon Feb 5 14:55:15 2018 UTC (6 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.135.6.1: +17 -6 lines
Diff to previous 1.135.6.1 (colored) to branchpoint 1.135 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #528):
	sys/net/agr/if_agr.c: revision 1.42
	sys/netinet6/nd6_rtr.c: revision 1.137
	sys/netinet6/nd6_rtr.c: revision 1.138
	sys/net/agr/if_agr.c: revision 1.46
	sys/net/route.c: revision 1.206
	sys/net/if.c: revision 1.419
	sys/net/agr/if_agrether.c: revision 1.10
	sys/netinet6/nd6.c: revision 1.241
	sys/netinet6/nd6.c: revision 1.242
	sys/netinet6/nd6.c: revision 1.243
	sys/netinet6/nd6.c: revision 1.244
	sys/netinet6/nd6.c: revision 1.245
	sys/netipsec/ipsec_input.c: revision 1.52
	sys/netipsec/ipsec_input.c: revision 1.53
	sys/net/agr/if_agrsubr.h: revision 1.5
	sys/kern/subr_workqueue.c: revision 1.35
	sys/netipsec/ipsec.c: revision 1.124
	sys/net/agr/if_agrsubr.c: revision 1.11
	sys/net/agr/if_agrsubr.c: revision 1.12
Simplify; share agr_vlan_add and agr_vlan_del (NFCI)
Fix late NULL-checking (CID 1427782: Null pointer dereferences (REVERSE_INULL))
KNF: replace soft tabs with hard tabs
Add missing NULL-checking for m_pullup (CID 1427770: Null pointer dereferences (NULL_RETURNS))
Add locking.
Revert "Get rid of unnecessary splsoftnet" (v1.133)
It's not always true that softnet_lock is held these places.
See PR kern/52947.
Get rid of unnecessary splsoftnet (redo)
Unless NET_MPSAFE, splsoftnet is still needed for rt_* functions.
Use existing fill_[pd]rlist() functions to calculate size of buffer to
allocate, rather than relying on an arbitrary length passed in from
userland.
Allow copyout() of partial results if the user buffer is too small, to
be consistent with the way sysctl(3) is documented.
Garbage-collect now-unused third parrameter in the fill_[pd]rlist()
functions.
As discussed on IRC.
OK kamil@ and christos@
XXX Needs pull-up to netbsd-8 branch.
Simplify, from christos@
More simplification, this time from ozaki-r@
No need to break after return.
One more from christos@
No need to initialize fill_func
more cleanup (don't allow oldlenp == NULL)
Destroy ifq_lock at the end of if_detach
It still can be used in if_detach.
Prevent rt_free_global.wk from being enqueued to workqueue doubly
Check if a queued work is tried to be enqueued again, which is not allowed

Revision 1.138 / (download) - annotate - [select for diffs], Fri Jan 26 06:49:02 2018 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.137: +18 -12 lines
Diff to previous 1.137 (colored)

Get rid of unnecessary splsoftnet (redo)

Unless NET_MPSAFE, splsoftnet is still needed for rt_* functions.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Jan 26 06:37:21 2018 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.136: +16 -11 lines
Diff to previous 1.136 (colored)

Revert "Get rid of unnecessary splsoftnet" (v1.133)

It's not always true that softnet_lock is held these places.
See PR kern/52947.

Revision 1.135.6.1 / (download) - annotate - [select for diffs], Tue Jan 2 10:20:34 2018 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.135: +4 -2 lines
Diff to previous 1.135 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Dec 15 04:03:46 2017 UTC (6 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.135: +4 -2 lines
Diff to previous 1.135 (colored)

Ensure to call if_mcast_op with holding IFNET_LOCK

Note that CARP doesn't deal with IFNET_LOCK yet.

Revision 1.84.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.84.2.3: +578 -503 lines
Diff to previous 1.84.2.3 (colored) to branchpoint 1.84 (colored) next main 1.85 (colored)

update from HEAD

Revision 1.94.2.11 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:13 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.10: +29 -25 lines
Diff to previous 1.94.2.10 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

Sync with HEAD

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:06 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.129: +75 -52 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Sync with HEAD

Revision 1.115.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:51 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.115.2.3: +75 -52 lines
Diff to previous 1.115.2.3 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored)

Sync with HEAD

Revision 1.135 / (download) - annotate - [select for diffs], Tue Mar 14 04:21:38 2017 UTC (7 years, 1 month ago) by ozaki-r
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, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.134: +2 -7 lines
Diff to previous 1.134 (colored)

Remove unnecessary NULL check

Revision 1.134 / (download) - annotate - [select for diffs], Fri Mar 3 06:27:20 2017 UTC (7 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.133: +6 -2 lines
Diff to previous 1.133 (colored)

Add missing opt_net_mpsafe.h.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Feb 22 07:05:47 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.132: +11 -16 lines
Diff to previous 1.132 (colored)

Get rid of unnecessary splsoftnet

Revision 1.132 / (download) - annotate - [select for diffs], Wed Feb 22 03:02:55 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.131: +17 -7 lines
Diff to previous 1.131 (colored)

Fix prefix invalidation via nd6_timer

We cannot remove a prefix there. Instead just invalidate it; the prefix
will be removed when purging an associated address. This is the same as
the original behavior.

Revision 1.94.2.10 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:59 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.9: +192 -163 lines
Diff to previous 1.94.2.9 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.131 / (download) - annotate - [select for diffs], Mon Jan 16 15:44:47 2017 UTC (7 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.130: +29 -29 lines
Diff to previous 1.130 (colored)

ip6_sprintf -> IN6_PRINT so that we pass the size.

Revision 1.130 / (download) - annotate - [select for diffs], Mon Jan 16 07:33:36 2017 UTC (7 years, 2 months ago) by ryo
Branch: MAIN
Changes since 1.129: +48 -29 lines
Diff to previous 1.129 (colored)

Make ip6_sprintf(), in_fmtaddr(), lla_snprintf() and icmp6_redirect_diag() mpsafe.

Reviewed by ozaki-r@

Revision 1.115.2.3 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.115.2.2: +147 -138 lines
Diff to previous 1.115.2.2 (colored) to branchpoint 1.115 (colored)

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

Revision 1.129 / (download) - annotate - [select for diffs], Wed Jan 4 19:37:14 2017 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.128: +4 -4 lines
Diff to previous 1.128 (colored)

- kill NULL argument from in6_update_ifa
- amend in6_update_ifa1 to return the ia, so that we can use it in pfil hooks
  to avoid NULL pointer crash.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Dec 19 07:51:34 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.127: +61 -18 lines
Diff to previous 1.127 (colored)

Protect IPv6 default router and prefix lists with coarse-grained rwlock

in6_purgeaddr (in6_unlink_ifa) itself unrefernces a prefix entry and calls
nd6_prelist_remove if the counter becomes 0, so callers doesn't need to
handle the reference counting.

Performance-sensitive paths (sending/forwarding packets) call just one
reader lock. This is a trade-off between performance impact vs. the amount
of efforts; if we want to remove the reader lock, we need huge amount of
works including destroying objects with psz/psref in softint, for example.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Dec 14 06:33:01 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.126: +17 -24 lines
Diff to previous 1.126 (colored)

Reduce return points

No functional change intended.

Revision 1.126 / (download) - annotate - [select for diffs], Wed Dec 14 04:13:50 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.125: +3 -4 lines
Diff to previous 1.125 (colored)

Use macro to iterate on the nd_prefix list

Revision 1.125 / (download) - annotate - [select for diffs], Mon Dec 12 03:14:01 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.124: +13 -13 lines
Diff to previous 1.124 (colored)

Introduce macros for the prefix list

No functional change.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Dec 12 03:13:14 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.123: +17 -19 lines
Diff to previous 1.123 (colored)

Introduce macros for the default router list

No functional change.

Revision 1.123 / (download) - annotate - [select for diffs], Sun Dec 11 07:38:50 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.122: +28 -28 lines
Diff to previous 1.122 (colored)

Add nd6_ prefix to exported functions

Revision 1.122 / (download) - annotate - [select for diffs], Sun Dec 11 07:37:53 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.121: +2 -34 lines
Diff to previous 1.121 (colored)

Move default interface things from nd6_rtr.c to nd6.c

Revision 1.121 / (download) - annotate - [select for diffs], Sun Dec 11 07:36:55 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.120: +16 -7 lines
Diff to previous 1.120 (colored)

Make some functions static

Revision 1.94.2.9 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:28 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.8: +6 -7 lines
Diff to previous 1.94.2.8 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.120 / (download) - annotate - [select for diffs], Tue Nov 15 01:50:06 2016 UTC (7 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.119: +6 -7 lines
Diff to previous 1.119 (colored)

Don't use rt_walktree to delete routes

Some functions use rt_walktree to scan the routing table and delete
matched routes. However, we shouldn't use rt_walktree to delete
routes because rt_walktree is recursive to the routing table (radix
tree) and isn't friendly to MP-ification. rt_walktree allows a caller
to pass a callback function to delete an matched entry. The callback
function is called from an API of the radix tree (rn_walktree) but
also calls an API of the radix tree to delete an entry.

This change adds a new API of the radix tree, rn_search_matched,
which returns a matched entry that is selected by a callback
function passed by a caller and the caller itself deletes the
entry. By using the API, we can avoid the recursive form.

Revision 1.94.2.8 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:09 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.7: +92 -17 lines
Diff to previous 1.94.2.7 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.119 / (download) - annotate - [select for diffs], Tue Aug 16 10:31:57 2016 UTC (7 years, 7 months ago) by roy
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161004, localcount-20160914
Changes since 1.118: +7 -2 lines
Diff to previous 1.118 (colored)

Separate ioctl address prefix management from RA prefix management
as we have no API for controlling the latter.

This fixes a long standing problem where addresses added with non /128
prefixes and non infinte address lifetimes would register a prefix route
which would expire. Subsequent calls set new lifetimes for the same address
would not affect the prefix route management, so once expired, the
prefix route would be impossible to add back as the kernel would remove it.

Revision 1.115.2.2 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:10 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.115.2.1: +79 -13 lines
Diff to previous 1.115.2.1 (colored) to branchpoint 1.115 (colored)

Sync with HEAD

Revision 1.118 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:31 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.117: +79 -13 lines
Diff to previous 1.117 (colored)

Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Tue Jul 26 03:24:23 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.115: +10 -6 lines
Diff to previous 1.115 (colored)

Sync with HEAD

Revision 1.117 / (download) - annotate - [select for diffs], Wed Jul 20 07:37:51 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.116: +6 -2 lines
Diff to previous 1.116 (colored)

Apply pserialize to some iterations of IP address lists

Revision 1.116 / (download) - annotate - [select for diffs], Fri Jul 15 07:40:09 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored)

Use sin6tosa and sin6tocsa macros

No functional change.

Revision 1.94.2.7 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:22 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.6: +78 -52 lines
Diff to previous 1.94.2.6 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.115 / (download) - annotate - [select for diffs], Thu Jul 7 09:32:03 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.114: +6 -5 lines
Diff to previous 1.114 (colored)

Switch the address list of intefaces to pslist(9)

As usual, we leave the old list to avoid breaking kvm(3) users.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Jul 5 03:40:52 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.113: +44 -42 lines
Diff to previous 1.113 (colored)

Use ia6 or ia instead of ifa as a variable name of struct in6_ifaddr

We conventionally use ifa for struct ifaddr and use ia6 or ia for
struct in6_ifaddr.

No functional change.

Revision 1.113 / (download) - annotate - [select for diffs], Mon Jul 4 06:48:14 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.112: +6 -6 lines
Diff to previous 1.112 (colored)

Use pslist(9) for the global in6_ifaddr list

psz and psref will be applied in another commit.

No functional change intended.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jun 15 06:01:21 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.111: +8 -3 lines
Diff to previous 1.111 (colored)

Protect if_byindex by pserialize

Revision 1.111 / (download) - annotate - [select for diffs], Fri Jun 10 13:31:44 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.110: +25 -7 lines
Diff to previous 1.110 (colored)

Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

Revision 1.94.2.6 / (download) - annotate - [select for diffs], Sun May 29 08:44:39 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.5: +2 -3 lines
Diff to previous 1.94.2.5 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.110 / (download) - annotate - [select for diffs], Tue Apr 26 08:44:45 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.109: +2 -3 lines
Diff to previous 1.109 (colored)

Sweep unnecessary route.h inclusions

Revision 1.94.2.5 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:18 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.4: +83 -106 lines
Diff to previous 1.94.2.4 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.109 / (download) - annotate - [select for diffs], Mon Apr 11 08:56:16 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.108: +2 -3 lines
Diff to previous 1.108 (colored)

Sweep unncessary radix.h inclusions

Revision 1.108 / (download) - annotate - [select for diffs], Mon Apr 4 07:37:07 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
Changes since 1.107: +11 -10 lines
Diff to previous 1.107 (colored)

Separate nexthop caches from the routing table

By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html

Revision 1.107 / (download) - annotate - [select for diffs], Fri Apr 1 08:12:00 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
Changes since 1.106: +76 -98 lines
Diff to previous 1.106 (colored)

Refine nd6log

Add __func__ to nd6log itself instead of adding it to callers.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Apr 1 06:33:19 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
Changes since 1.105: +14 -15 lines
Diff to previous 1.105 (colored)

Use __func__ in log messages

Revision 1.94.2.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:07 2015 UTC (8 years, 3 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.3: +5 -7 lines
Diff to previous 1.94.2.3 (colored) to branchpoint 1.94 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.105 / (download) - annotate - [select for diffs], Wed Nov 25 06:21:26 2015 UTC (8 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Use lltable/llentry for NDP

lltable and llentry were introduced to replace ARP cache data structure
for further restructuring of the routing table: L2 nexthop cache
separation. This change replaces the NDP cache data structure
(llinfo_nd6) with them as well as ARP.

One noticeable change is for neighbor cache GC mechanism that was
introduced to prevent IPv6 DoS attacks. net.inet6.ip6.neighborgcthresh
was the max number of caches that we store in the system. After
introducing lltable/llentry, the value is changed to be per-interface
basis because lltable/llentry stores neighbor caches in each interface
separately. And the change brings one degradation; the old GC mechanism
dropped exceeded packets based on LRU while the new implementation drops
packets in order from the beginning of lltable (a hash table + linked
lists). It would be improved in the future.

Added functions in in6.c come from FreeBSD (as of r286629) and are
tweaked for NetBSD.

Proposed on tech-kern and tech-net.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Oct 5 04:15:42 2015 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.103: +3 -5 lines
Diff to previous 1.103 (colored)

Use satosin6 instead of its own macro

Revision 1.94.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.2: +55 -84 lines
Diff to previous 1.94.2.2 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.103 / (download) - annotate - [select for diffs], Mon Aug 24 09:45:29 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.102: +3 -3 lines
Diff to previous 1.102 (colored)

Change 0 to NULL for rtrequest's last argument (struct rtentry **ret_nrt)

Revision 1.102 / (download) - annotate - [select for diffs], Fri Aug 7 08:11:33 2015 UTC (8 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.101: +18 -18 lines
Diff to previous 1.101 (colored)

Use time_uptime instead of time_second to avoid time leaps

Some codes in sys/net* use time_second to manage time periods such as
cache expirations. However, time_second doesn't increase monotonically
and can leap by say settimeofday(2) according to time_second(9). We
should use time_uptime instead of it to avoid such time leaps.

This change replaces time_second with time_uptime. Additionally it
converts a time based on time_uptime to a time based on time_second
when the kernel passes the time to userland programs that expect
the latter, and vice versa.

Note that we shouldn't leak time_uptime to other hosts over the
netowrk. My investigation shows there is no such leak:
http://mail-index.netbsd.org/tech-net/2015/08/06/msg005332.html

Discussed on tech-kern and tech-net.

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jul 17 02:21:08 2015 UTC (8 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.100: +37 -66 lines
Diff to previous 1.100 (colored)

Reform use of rt_refcnt

rt_refcnt of rtentry was used in bad manners, for example, direct rt_refcnt++
and rt_refcnt-- outside route.c, "rt->rt_refcnt++; rtfree(rt);" idiom, and
touching rt after rt->rt_refcnt--.

These abuses seem to be needed because rt_refcnt manages only references
between rtentry and doesn't take care of references during packet processing
(IOW references from local variables). In order to reduce the above abuses,
the latter cases should be counted by rt_refcnt as well as the former cases.

This change improves consistency of use of rt_refcnt:
- rtentry is always accessed with rt_refcnt incremented
- rtentry's rt_refcnt is decremented after use (rtfree is always used instead
  of rt_refcnt--)
- functions returning rtentry increment its rt_refcnt (and caller rtfree it)

Note that rt_refcnt prevents rtentry from being freed but doesn't prevent
rtentry from being updated. Toward MP-safe, we need to provide another
protection for rtentry, e.g., locks. (Or introduce a better data structure
allowing concurrent readers during updates.)

Revision 1.100 / (download) - annotate - [select for diffs], Tue Jun 30 06:42:06 2015 UTC (8 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Fix nd6_numroutes counting

nd6_numroutes is intended to be incremented when a route is added via RA
and decremented when a RA route is deleted. However, a decrement of a RA
route was skipped when there remained references to the RA route.

Revision 1.94.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:26 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.94.2.1: +16 -9 lines
Diff to previous 1.94.2.1 (colored) to branchpoint 1.94 (colored)

Sync with HEAD

Revision 1.93.2.3 / (download) - annotate - [select for diffs], Sat May 2 18:23:25 2015 UTC (8 years, 11 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, 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
Branch point for: netbsd-7-1, netbsd-7-0
Changes since 1.93.2.2: +11 -4 lines
Diff to previous 1.93.2.2 (colored) to branchpoint 1.93 (colored)

Pull up following revision(s) (requested by roy in ticket #731):
	sys/netinet6/nd6_rtr.c: revision 1.99
Mitigate Local Denial of Service with IPv6 Router Advertisements and
log attack attempts.
Fixes CVE-2015-2923, taken from FreeBSD.

Revision 1.99 / (download) - annotate - [select for diffs], Sat May 2 14:28:30 2015 UTC (8 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.98: +11 -4 lines
Diff to previous 1.98 (colored)

Mitigate Local Denial of Service with IPv6 Router Advertisements and
log attack attempts.

Fixes CVE-2015-2923, taken from FreeBSD.

Revision 1.94.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:23 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.94: +20 -31 lines
Diff to previous 1.94 (colored)

Sync with HEAD

Revision 1.93.2.2 / (download) - annotate - [select for diffs], Mon Apr 6 01:32:33 2015 UTC (9 years ago) by snj
Branch: netbsd-7
Changes since 1.93.2.1: +14 -6 lines
Diff to previous 1.93.2.1 (colored) to branchpoint 1.93 (colored)

Pull up following revision(s) (requested by martin in ticket #655):
	sys/netinet6/in6.c: revision 1.182 via patch
	sys/netinet6/in6_ifattach.c: revision 1.95 via patch
	sys/netinet6/nd6.c: revision 1.158 via patch
	sys/netinet6/nd6.h: revision 1.62 via patch
	sys/netinet6/nd6_nbr.c: revision 1.104 via patch
	sys/netinet6/nd6_rtr.c: revision 1.96 via patch
Rearange interface detachement slightly: before we free the INET6 specific
per-interface data, make sure to call nd6_purge() with it to remove
routing entries pointing to the going interface.
When we should happen to call this function again later, with the data
already gone, just return.
Fixes PR kern/49682, ok: christos.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Feb 25 12:45:34 2015 UTC (9 years, 1 month ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.97: +6 -25 lines
Diff to previous 1.97 (colored)

Rename nd6_rtmsg() to rt_newmsg() and move into the generic routing code
as it's not IPv6 specific and will be used elsewhere.

Revision 1.97 / (download) - annotate - [select for diffs], Wed Feb 25 00:26:58 2015 UTC (9 years, 1 month ago) by roy
Branch: MAIN
Changes since 1.96: +4 -3 lines
Diff to previous 1.96 (colored)

Retire nd6_newaddrmsg and use rt_newaddrmsg directly instead so that
we don't spam route changes when the route hasn't changed.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Feb 23 19:15:59 2015 UTC (9 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.95: +14 -6 lines
Diff to previous 1.95 (colored)

Rearange interface detachement slightly: before we free the INET6 specific
per-interface data, make sure to call nd6_purge() with it to remove
routing entries pointing to the going interface.
When we should happen to call this function again later, with the data
already gone, just return.
Fixes PR kern/49682, ok: christos.

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Wed Dec 17 18:43:47 2014 UTC (9 years, 3 months ago) by martin
Branch: netbsd-7
Changes since 1.93: +3 -4 lines
Diff to previous 1.93 (colored)

Pull up following revision(s) (requested by roy in ticket #332):
	sys/netinet6/nd6_nbr.c: revision 1.103
	sys/netinet6/nd6_rtr.c: revision 1.95
	sys/netinet6/nd6.h: revision 1.61
	sys/netinet6/nd6.c: revision 1.156
Report route additions/changes/deletions for cached neighbours to userland.

Revision 1.95 / (download) - annotate - [select for diffs], Tue Dec 16 11:42:27 2014 UTC (9 years, 4 months ago) by roy
Branch: MAIN
Changes since 1.94: +3 -4 lines
Diff to previous 1.94 (colored)

Report route additions/changes/deletions for cached neighbours to userland.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Sep 5 06:08:15 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.93: +95 -94 lines
Diff to previous 1.93 (colored)

Don't use C++ keyword as variable.
Use different prefix for nd6_prefixctl members than for nd6_prefix members.

Revision 1.84.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:36 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.84.2.2: +6 -14 lines
Diff to previous 1.84.2.2 (colored) to branchpoint 1.84 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:30 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.90: +8 -13 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

Rebase.

Revision 1.93 / (download) - annotate - [select for diffs], Thu Jul 31 06:35:47 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored)

Define IFADDR_FOREACH_SAFE for on-the-fly element removal in a loop

We have to use it when we purge an address element in an ifaddr loop.

This change restores the original behavior that was accidentally degraded.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jul 25 07:12:55 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.91: +4 -5 lines
Diff to previous 1.91 (colored)

Use IFADDR_FOREACH for iterating if_addrlist of ifnet

Revision 1.81.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:10 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.81.4.2: +16 -10 lines
Diff to previous 1.81.4.2 (colored) to branchpoint 1.81 (colored) next main 1.82 (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.89.2.2 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.89.2.1: +2 -5 lines
Diff to previous 1.89.2.1 (colored) to branchpoint 1.89 (colored) next main 1.90 (colored)

sync with head

Revision 1.91 / (download) - annotate - [select for diffs], Sat May 17 21:26:20 2014 UTC (9 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.90: +7 -11 lines
Diff to previous 1.90 (colored)

Replace open-coded access (and boundary checking) of ifindex2ifnet with
if_byindex() function.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Sep 14 21:08:35 2013 UTC (10 years, 7 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.89: +2 -5 lines
Diff to previous 1.89 (colored)

Remove unused variable

Revision 1.82.4.3 / (download) - annotate - [select for diffs], Thu Aug 8 21:58:55 2013 UTC (10 years, 8 months ago) by snj
Branch: netbsd-6
Changes since 1.82.4.2: +8 -6 lines
Diff to previous 1.82.4.2 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #926):
	sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.

Revision 1.82.10.3 / (download) - annotate - [select for diffs], Thu Aug 8 21:57:40 2013 UTC (10 years, 8 months ago) by snj
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Changes since 1.82.10.2: +8 -6 lines
Diff to previous 1.82.10.2 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #926):
	sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.

Revision 1.82.8.3 / (download) - annotate - [select for diffs], Thu Aug 8 21:55:19 2013 UTC (10 years, 8 months ago) by snj
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE
Changes since 1.82.8.2: +8 -6 lines
Diff to previous 1.82.8.2 (colored) to branchpoint 1.82 (colored) next main 1.83 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #926):
	sys/netinet6/nd6_rtr.c: revision 1.86
PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.89: +7 -11 lines
Diff to previous 1.89 (colored)

Checkpoint work in progress:
- Move PCB structures under __INPCB_PRIVATE, adjust most of the callers
  and thus make IPv4 PCB structures mostly opaque.  Any volunteers for
  merging in6pcb with inpcb (see rpaulo-netinet-merge-pcb branch)?
- Move various global vars to the modules where they belong, make them static.
- Some preliminary work for IPv4 PCB locking scheme.
- Make raw IP code mostly MP-safe.  Simplify some of it.
- Rework "fast" IP forwarding (ipflow) code to be mostly MP-safe.  It should
  run from a software interrupt, rather than hard.
- Rework tun(4) pseudo interface to be MP-safe.
- Work towards making some other interfaces more strict.

Revision 1.82.10.2 / (download) - annotate - [select for diffs], Fri Jul 12 11:18:57 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6-1
Changes since 1.82.10.1: +3 -3 lines
Diff to previous 1.82.10.1 (colored) to branchpoint 1.82 (colored)

Pull up revision 1.84 via patch to fix gcc 4.1 compilation error
(uninitialised variable):

Some fun in trying to work out what was broken with gcc-4.1 to
trigger the following warning when gcc-4.5 was silent:
  nd6_rtr.c: In function 'nd6_ra_input':
  nd6_rtr.c:788: warning: 'ext' may be used uninitialized in this function
Eventually determined that it was not unreasonable for gcc-4.1 to
bleat in this case as there is a nasty 'goto insert' which could
indeed have resulted in an uninitialised variable use. Yay gcc 4.1.

Revision 1.82.8.2 / (download) - annotate - [select for diffs], Fri Jul 12 11:18:32 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6-0
Changes since 1.82.8.1: +3 -3 lines
Diff to previous 1.82.8.1 (colored) to branchpoint 1.82 (colored)

Pull up revision 1.84 via patch to fix gcc 4.1 compilation error
(uninitialised variable):

Some fun in trying to work out what was broken with gcc-4.1 to
trigger the following warning when gcc-4.5 was silent:
  nd6_rtr.c: In function 'nd6_ra_input':
  nd6_rtr.c:788: warning: 'ext' may be used uninitialized in this function
Eventually determined that it was not unreasonable for gcc-4.1 to
bleat in this case as there is a nasty 'goto insert' which could
indeed have resulted in an uninitialised variable use. Yay gcc 4.1.

Revision 1.82.4.2 / (download) - annotate - [select for diffs], Fri Jul 12 11:18:15 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6
Changes since 1.82.4.1: +3 -3 lines
Diff to previous 1.82.4.1 (colored) to branchpoint 1.82 (colored)

Pull up revision 1.84 via patch to fix gcc 4.1 compilation error
(uninitialised variable):

Some fun in trying to work out what was broken with gcc-4.1 to
trigger the following warning when gcc-4.5 was silent:
  nd6_rtr.c: In function 'nd6_ra_input':
  nd6_rtr.c:788: warning: 'ext' may be used uninitialized in this function
Eventually determined that it was not unreasonable for gcc-4.1 to
bleat in this case as there is a nasty 'goto insert' which could
indeed have resulted in an uninitialised variable use. Yay gcc 4.1.

Revision 1.82.10.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:56 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6-1
Changes since 1.82: +75 -4 lines
Diff to previous 1.82 (colored)

Pull up revisions:
  src/share/man/man7/sysctl.7 revision 1.73 via patch
  src/sys/netinet6/icmp6.c revision 1.161 via patch
  src/sys/netinet6/in6.c revision 1.161 via patch
  src/sys/netinet6/in6_proto.c revision 1.97 via patch
  src/sys/netinet6/in6_var.h revision 1.65 via patch
  src/sys/netinet6/ip6_input.c revision 1.139 via patch
  src/sys/netinet6/ip6_var.h revision 1.59 via patch
  src/sys/netinet6/nd6.c revision 1.143 via patch
  src/sys/netinet6/nd6.h revision 1.57 via patch
  src/sys/netinet6/nd6_rtr.c revision 1.83 via patch
(requested by christos in ticket #905).
Patch by Loganaden Velvindron.

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.82.8.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:34 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6-0
Changes since 1.82: +75 -4 lines
Diff to previous 1.82 (colored)

Pull up revisions:
  src/share/man/man7/sysctl.7 revision 1.73 via patch
  src/sys/netinet6/icmp6.c revision 1.161 via patch
  src/sys/netinet6/in6.c revision 1.161 via patch
  src/sys/netinet6/in6_proto.c revision 1.97 via patch
  src/sys/netinet6/in6_var.h revision 1.65 via patch
  src/sys/netinet6/ip6_input.c revision 1.139 via patch
  src/sys/netinet6/ip6_var.h revision 1.59 via patch
  src/sys/netinet6/nd6.c revision 1.143 via patch
  src/sys/netinet6/nd6.h revision 1.57 via patch
  src/sys/netinet6/nd6_rtr.c revision 1.83 via patch
(requested by christos in ticket #905).
Patch by Loganaden Velvindron.

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.82.4.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:07 2013 UTC (10 years, 9 months ago) by jdc
Branch: netbsd-6
Changes since 1.82: +75 -4 lines
Diff to previous 1.82 (colored)

Pull up revisions:
  src/share/man/man7/sysctl.7 revision 1.73 via patch
  src/sys/netinet6/icmp6.c revision 1.161 via patch
  src/sys/netinet6/in6.c revision 1.161 via patch
  src/sys/netinet6/in6_proto.c revision 1.97 via patch
  src/sys/netinet6/in6_var.h revision 1.65 via patch
  src/sys/netinet6/ip6_input.c revision 1.139 via patch
  src/sys/netinet6/ip6_var.h revision 1.59 via patch
  src/sys/netinet6/nd6.c revision 1.143 via patch
  src/sys/netinet6/nd6.h revision 1.57 via patch
  src/sys/netinet6/nd6_rtr.c revision 1.83 via patch
(requested by christos in ticket #905).
Patch by Loganaden Velvindron.

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:26 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.84.2.1: +9 -3 lines
Diff to previous 1.84.2.1 (colored) to branchpoint 1.84 (colored)

resync from head

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jun 20 13:56:29 2013 UTC (10 years, 9 months ago) by roy
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.88: +6 -5 lines
Diff to previous 1.88 (colored)

Move the detaching and making tentative addresses out if in6_if_up
and into in6_if_link_up.

This fixes a possible panic where link is up but not the interface.
Note that a better solution would be to listen to the routing socket
in the kernel, but I don't know how to do that.

Reachable Router tests for IFF_UP as well.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jun 11 12:08:29 2013 UTC (10 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.87: +4 -3 lines
Diff to previous 1.87 (colored)

When an interface link state changes to down, mark all attached IPv6
addresses as detached.
Likewise, when the link state changes to up, mark all detached IPv6
as tentative and start DAD on them.

Advertised router reachability now checks that link state is not down.
This means that when an interface link state changes, the default IPv6
router may change as well.

Revision 1.87 / (download) - annotate - [select for diffs], Tue May 21 08:37:27 2013 UTC (10 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.86: +6 -2 lines
Diff to previous 1.86 (colored)

For IPv6, emit RTM_NEWADDR once DAD completes and also when address flag
changes. Tentative addresses are not emitted.

Version bumped so userland can detect this behaviour change.

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:06 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.84: +9 -6 lines
Diff to previous 1.84 (colored)

resync with head

Revision 1.86 / (download) - annotate - [select for diffs], Mon Feb 18 16:45:50 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: khorben-n900, agc-symver-base, agc-symver
Changes since 1.85: +8 -6 lines
Diff to previous 1.85 (colored)

PR/47576: Takahiro HAYASHI: Avoid crash destroying tap0 after deleting
it's link-local address.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Jan 28 17:57:34 2013 UTC (11 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.84: +3 -2 lines
Diff to previous 1.84 (colored)

Set the socket family for the network mask.

Revision 1.81.4.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:49 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.81.4.1: +75 -4 lines
Diff to previous 1.81.4.1 (colored) to branchpoint 1.81 (colored)

sync with head

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jun 25 17:25:29 2012 UTC (11 years, 9 months ago) by abs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Some fun in trying to work out what was broken with gcc-4.1 to
trigger the following warning when gcc-4.5 was silent:
  nd6_rtr.c: In function 'nd6_ra_input':
  nd6_rtr.c:788: warning: 'ext' may be used uninitialized in this function
Eventually determined that it was not unreasonable for gcc-4.1 to
bleat in this case as there is a nasty 'goto insert' which could
indeed have resulted in an uninitialised variable use. Yay gcc 4.1.

Revision 1.83 / (download) - annotate - [select for diffs], Sat Jun 23 03:14:04 2012 UTC (11 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.82: +75 -4 lines
Diff to previous 1.82 (colored)

4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.81.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:45 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (colored)

sync with head

Revision 1.82 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:29 2011 UTC (12 years, 4 months ago) by tls
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.81: +3 -2 lines
Diff to previous 1.81 (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.80.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:00 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.80: +26 -7 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

Sync with HEAD.

Revision 1.80.4.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:09 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.80: +26 -7 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

sync with head

Revision 1.81 / (download) - annotate - [select for diffs], Tue May 24 18:07:11 2011 UTC (12 years, 10 months ago) by spz
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.80: +26 -7 lines
Diff to previous 1.80 (colored)

RA flood mitigation via a limit on accepted routes:
- introduce a limit for the routes accepted via IPv6 Router Advertisement:
  a common 2 interface client will have 6, the default limit is 100 and
  can be adjusted via sysctl
- report the current number of routes installed via RA via sysctl
- count discarded route additions. Note that one RA message is two routes.
  This is at present only across all interfaces even though per-interface
  would be more useful, since the per-interface structure complies to RFC2466
- bump kernel version due to the previous change
- adjust netstat to use the new value (with netstat -p icmp6)

Revision 1.75.4.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:30 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.75.4.2: +6 -6 lines
Diff to previous 1.75.4.2 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored)

sync with head

Revision 1.80 / (download) - annotate - [select for diffs], Fri Nov 6 20:41:22 2009 UTC (14 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.79: +6 -6 lines
Diff to previous 1.79 (colored)

Fix net.inet6.ip6.accept_rtadv and 'ndp -i <interface> accept_rtadv':

Add a flag ND6_IFF_OVERRIDE_RTADV that tells the kernel to override
ip6_accept_rtadv (net.inet6.ip6.accept_rtadv) on an interface.

Add a routine nd6_accepts_rtadv(ndi) that evaluates both the flags
on the interface represented by ndi and ip6_accept_rtadv, and
returns 'true' if the given interface should accept Router
Advertisements, and 'false' if not.

Now, ND6_IFF_ACCEPT_RTADV works as it was historically documented:
if it is set, then accept router advertisements iff ip6_accept_rtadv
!= 0.  Otherwise, do not accept router advertisements.

If ND6_IFF_OVERRIDE_RTADV is set, then the flag ND6_IFF_ACCEPT_RTADV
overrides ip6_accept_rtadv: if ND6_IFF_ACCEPT_RTADV is set, accept;
otherwise reject.  Ignore ip6_accept_rtadv.

If neither ND6_IFF_ACCEPT_RTADV nor ND6_IFF_OVERRIDE_RTADV is set,
reject Router Advertisements.

Revision 1.75.4.2 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:25 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.75.4.1: +13 -7 lines
Diff to previous 1.75.4.1 (colored) to branchpoint 1.75 (colored)

sync with head.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Jul 25 23:12:09 2009 UTC (14 years, 8 months ago) by tonnerre
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, jym-xensuspend-nbase
Changes since 1.78: +13 -7 lines
Diff to previous 1.78 (colored)

Instead of using the net.inet6.ip6.accept_rtadv sysctl for all devices,
make net.inet6.ip6.accept_rtadv the default for individual per-device
settings so people can use the ndp(8) utility to set per-device whether
or not to accept route advertisements.

rtadvd changes to follow.

(Debated on tech-net@ before but almost two weeks passed by without any
comment on the patch.)

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:29 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored) next main 1.78 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.75.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:19 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.75: +29 -28 lines
Diff to previous 1.75 (colored)

sync with head.

Revision 1.76.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:24 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.76.2.1: +6 -6 lines
Diff to previous 1.76.2.1 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored)

Sync with HEAD.

Revision 1.78 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:23 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.77: +6 -6 lines
Diff to previous 1.77 (colored)

bzero -> memset

Revision 1.76.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:14 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.76: +4 -6 lines
Diff to previous 1.76 (colored)

Sync with HEAD.

Revision 1.72.6.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:33 2009 UTC (15 years, 2 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.72.6.2: +23 -22 lines
Diff to previous 1.72.6.2 (colored) to branchpoint 1.72 (colored) next main 1.73 (colored)

Sync with HEAD.

Revision 1.77 / (download) - annotate - [select for diffs], Fri Dec 19 18:49:39 2008 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.76: +4 -6 lines
Diff to previous 1.76 (colored)

use M_ZERO on malloc() and remove subsequent bzero().

Revision 1.75.10.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:27 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.75: +23 -20 lines
Diff to previous 1.75 (colored) next main 1.76 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Oct 24 21:30:34 2008 UTC (15 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap
Changes since 1.75: +23 -20 lines
Diff to previous 1.75 (colored)

bzero -> memset.  Avoid some messy casts to sockaddr by using a
union of sockaddr_in6 and sockaddr.  No functional change intended.

Revision 1.72.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:27 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.72.6.1: +5 -4 lines
Diff to previous 1.72.6.1 (colored) to branchpoint 1.72 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Apr 15 03:57:04 2008 UTC (16 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: yamt-nfs-mp, haad-dm
Changes since 1.74: +7 -6 lines
Diff to previous 1.74 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Apr 8 15:04:35 2008 UTC (16 years ago) by thorpej
Branch: MAIN
Changes since 1.73: +6 -6 lines
Diff to previous 1.73 (colored)

Change ICMP6 stats from a structure to an array of uint64_t's.

Note: This is ABI-compatible with the old icmp6stat structure; old netstat
binaries will continue to work properly.

Revision 1.72.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:09 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.72: +5 -5 lines
Diff to previous 1.72 (colored)

Sync with HEAD.

Revision 1.72.2.2 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:24 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.72.2.1: +5 -5 lines
Diff to previous 1.72.2.1 (colored) to branchpoint 1.72 (colored) next main 1.73 (colored)

sync with head.

Revision 1.67.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:07 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.67.2.2: +5 -5 lines
Diff to previous 1.67.2.2 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

sync with HEAD

Revision 1.52.2.7 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:42 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.6: +5 -5 lines
Diff to previous 1.52.2.6 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored)

sync with head.

Revision 1.73 / (download) - annotate - [select for diffs], Wed Feb 27 19:40:56 2008 UTC (16 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.72: +5 -5 lines
Diff to previous 1.72 (colored)

Convert to ansi definitions from old-style definitons.
Remember that func() is not ansi, func(void) is.

Revision 1.72.2.1 / (download) - annotate - [select for diffs], Fri Feb 22 02:53:34 2008 UTC (16 years, 1 month ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.72: +89 -7 lines
Diff to previous 1.72 (colored)

imported Mobile IPv6 code developed by the SHISA project
(http://www.mobileip.jp/).

Revision 1.52.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:24 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.5: +3 -4 lines
Diff to previous 1.52.2.5 (colored) to branchpoint 1.52 (colored)

sync with head

Revision 1.67.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:39 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.67.2.1: +11 -25 lines
Diff to previous 1.67.2.1 (colored) to branchpoint 1.67 (colored)

sync with HEAD

Revision 1.71.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:57:32 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.71: +3 -4 lines
Diff to previous 1.71 (colored) next main 1.72 (colored)

Sync with HEAD

Revision 1.68.2.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:34 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.68.2.2: +3 -4 lines
Diff to previous 1.68.2.2 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored)

Sync with HEAD.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:52 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.69.2.1: +3 -4 lines
Diff to previous 1.69.2.1 (colored) to branchpoint 1.69 (colored) next main 1.70 (colored)

Sync with head.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Dec 20 19:53:34 2007 UTC (16 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.71: +3 -4 lines
Diff to previous 1.71 (colored)

Poison struct route->ro_rt uses in the kernel by changing the name
to _ro_rt.  Use rtcache_getrt() to access a route cache's struct
rtentry *.

Introduce struct ifnet->if_dl that always points at the interface
identifier/link-layer address.  Make code that treated the first
ifaddr on struct ifnet->if_addrlist as the interface address use
if_dl, instead.

Remove stale debugging code from net/route.c.  Move the rtflush()
code into rtcache_clear() and delete rtflush().  Delete rtalloc(),
because nothing uses it any more.

Make ND6_HINT an inline, lowercase subroutine, nd6_hint.

I've done my best to convert IP Filter, the ISO stack, and the
AppleTalk stack to rtcache_getrt().  They compile, but I have not
tested them.  I have given the changes to PF, GRE, IPv4 and IPv6
stacks a lot of exercise.

Revision 1.66.4.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:39 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.66.4.3: +5 -5 lines
Diff to previous 1.66.4.3 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

Sync with HEAD.

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:18 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.68.2.1: +5 -5 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored)

Sync with HEAD.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:59 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking2
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)

Sync with head.

Revision 1.52.2.5 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:38 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.4: +5 -5 lines
Diff to previous 1.52.2.4 (colored) to branchpoint 1.52 (colored)

sync with head

Revision 1.71 / (download) - annotate - [select for diffs], Wed Dec 5 23:00:58 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

Use IFADDR_FIRST(), IFADDR_NEXT().

Revision 1.70 / (download) - annotate - [select for diffs], Tue Dec 4 10:27:34 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

Use IFNET_FOREACH() and IFADDR_FOREACH().

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:15 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.68: +8 -21 lines
Diff to previous 1.68 (colored)

Sync with HEAD.

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:15 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.3: +24 -37 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored)

sync with head.

Revision 1.67.6.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:03:01 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.67: +24 -37 lines
Diff to previous 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.66.4.3 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:36 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.66.4.2: +8 -21 lines
Diff to previous 1.66.4.2 (colored) to branchpoint 1.66 (colored)

Sync with HEAD.

Revision 1.69 / (download) - annotate - [select for diffs], Sat Nov 10 00:14:32 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2
Changes since 1.68: +8 -21 lines
Diff to previous 1.68 (colored)

Use sockaddr_in6_init().

Revision 1.67.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:34:09 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.67: +18 -18 lines
Diff to previous 1.67 (colored)

sync with HEAD

Revision 1.66.4.2 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:45 2007 UTC (16 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.66.4.1: +18 -18 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored)

Sync with HEAD.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Nov 1 20:33:58 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.67: +18 -18 lines
Diff to previous 1.67 (colored)

De-__P().

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:43:41 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.2: +41 -85 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored)

sync with head.

Revision 1.63.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:08 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.63.2.2: +9 -22 lines
Diff to previous 1.63.2.2 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Sync with HEAD.

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:53 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.65: +9 -22 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with HEAD.

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Thu Aug 9 02:37:25 2007 UTC (16 years, 8 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.66: +2 -13 lines
Diff to previous 1.66 (colored)

Sync with HEAD.

Revision 1.67.8.2 / (download) - annotate - [select for diffs], Tue Aug 7 02:17:22 2007 UTC (16 years, 8 months ago) by dyoung
Branch: matt-mips64
Changes since 1.67.8.1: +2097 -0 lines
Diff to previous 1.67.8.1 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

Remove dead code.

Revision 1.67.8.1, Tue Aug 7 02:17:21 2007 UTC (16 years, 8 months ago) by dyoung
Branch: matt-mips64
Changes since 1.67: +0 -2097 lines
FILE REMOVED

file nd6_rtr.c was added on branch matt-mips64 on 2007-08-07 02:17:22 +0000

Revision 1.67 / (download) - annotate - [select for diffs], Tue Aug 7 02:17:21 2007 UTC (16 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: matt-mips64, matt-armv6, bouyer-xenamd64
Changes since 1.66: +2 -13 lines
Diff to previous 1.66 (colored)

Remove dead code.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:58 2007 UTC (16 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.65: +9 -11 lines
Diff to previous 1.65 (colored)

Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.63.2.2 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:01 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.63.2.1: +5 -7 lines
Diff to previous 1.63.2.1 (colored) to branchpoint 1.63 (colored)

Sync with head.

Revision 1.63.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:49 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.63: +33 -64 lines
Diff to previous 1.63 (colored) next main 1.64 (colored)

Sync with head.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Jun 9 03:25:32 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.64: +5 -7 lines
Diff to previous 1.64 (colored)

Convert from rn_walktree() to rt_walktree().  While I am here,
de-__P().

Revision 1.63.2.1 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:59 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.63: +31 -60 lines
Diff to previous 1.63 (colored)

Sync with head.

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 23 17:15:04 2007 UTC (16 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.63: +31 -60 lines
Diff to previous 1.63 (colored)

Ansify + add a few comments, from Karl Sjödahl

Revision 1.62.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 06:00:01 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored) next main 1.63 (colored)

Sync with HEAD.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:27 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.59.6.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:15 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.59.6.1: +17 -23 lines
Diff to previous 1.59.6.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

Sync with head.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:39 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52.2.1: +20 -27 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored)

sync with head.

Revision 1.59.8.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:16 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.59.8.1: +19 -25 lines
Diff to previous 1.59.8.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

sync with head.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Nov 20 04:34:16 2006 UTC (17 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.61: +17 -23 lines
Diff to previous 1.61 (colored)

Use LIST_/TAILQ_ macros, esp. LIST_FOREACH() and TAILQ_FOREACH().
Use the usual idiom for iterating over a list where we might
_REMOVE() entries,

        for (x = TAILQ_FIRST(...); x != NULL; x = nx) {
                nx = TAILQ_NEXT(x, ...);
                ...
        }

Revision 1.59.6.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:37 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.59: +5 -6 lines
Diff to previous 1.59 (colored)

Sync with head.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:46 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.60: +4 -4 lines
Diff to previous 1.60 (colored)

__unused removal on arguments; approved by core.

Revision 1.59.8.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:35 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.59: +5 -6 lines
Diff to previous 1.59 (colored)

sync with head

Revision 1.60 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:39 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.59: +5 -6 lines
Diff to previous 1.59 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:55 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.54: +415 -139 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

sync with head

Revision 1.55.2.3 / (download) - annotate - [select for diffs], Mon Jun 26 12:54:13 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.55.2.2: +10 -12 lines
Diff to previous 1.55.2.2 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored)

sync with head.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:09 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.52: +424 -142 lines
Diff to previous 1.52 (colored)

sync with head.

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:09:49 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.58: +10 -12 lines
Diff to previous 1.58 (colored) next main 1.59 (colored)

Sync with head.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:04 2006 UTC (17 years, 10 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, rpaulo-netinet-merge-pcb-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.58: +10 -12 lines
Diff to previous 1.58 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.54.4.3 / (download) - annotate - [select for diffs], Sat Apr 22 13:42:07 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.54.4.2: +4 -6 lines
Diff to previous 1.54.4.2 (colored) to branchpoint 1.54 (colored) next main 1.55 (colored)

Update for timecounters - use getnanotime() and time_second variable.

Revision 1.54.4.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:13 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.54.4.1: +410 -132 lines
Diff to previous 1.54.4.1 (colored) to branchpoint 1.54 (colored)

Sync with head.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Wed Apr 19 04:46:12 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.57: +4 -14 lines
Diff to previous 1.57 (colored) next main 1.58 (colored)

sync with head.

Revision 1.55.2.2 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:50 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.55.2.1: +4 -14 lines
Diff to previous 1.55.2.1 (colored) to branchpoint 1.55 (colored)

sync with head.

Revision 1.57.4.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:28 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.57: +4 -14 lines
Diff to previous 1.57 (colored) next main 1.58 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Mar 20 12:13:05 2006 UTC (18 years ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.57: +4 -14 lines
Diff to previous 1.57 (colored)

RFC 4191 changed the meaning of the "Reserved" Router Preference
value. Previously the router should treat the recieved router
advertisement as having a 0 router lifetime. The RFC now says that the
router should treat the "Reserved" field the same way as if it was the
medium (default) preference.

From the KAME project via SUZUKI Shinsuke.

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:39 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.55: +420 -132 lines
Diff to previous 1.55 (colored)

sync with head.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Mar 6 20:33:52 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Changes since 1.56: +5 -5 lines
Diff to previous 1.56 (colored)

Rename local variables called delay that shadow the delay() decl.
Pointed out by Robert Swindells.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Mar 5 23:47:08 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
Changes since 1.55: +420 -132 lines
Diff to previous 1.55 (colored)

NDP-related improvements:
        RFC4191
	- supports host-side router-preference

	RFC3542
	- if DAD fails on a interface, disables IPv6 operation on the
          interface
	- don't advertise MLD report before DAD finishes

	Others
	- fixes integer overflow for valid and preferred lifetimes
	- improves timer granularity for MLD, using callout-timer.
	- reflects rtadvd's IPv6 host variable information into kernel
	  (router only)
	- adds a sysctl option to enable/disable pMTUd for multicast
          packets
	- performs NUD on PPP/GRE interface by default
	- Redirect works regardless of ip6_accept_rtadv
	- removes RFC1885-related code

From the KAME project via SUZUKI Shinsuke.
Reviewed by core.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Mar 3 14:07:06 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy
Changes since 1.54: +4 -4 lines
Diff to previous 1.54 (colored)

Fix typos in comments.

From: the KAME project via SUZUKI Shinsuke.

Revision 1.54.4.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:18:52 2006 UTC (18 years, 2 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.54: +11 -11 lines
Diff to previous 1.54 (colored)

Adapt for timecounters: mostly use get*time(), use bintime's for timeout
calculations and use "time_second" instead of "time.tv_sec".

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:42 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.53: +11 -5 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

sync with head.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:37 2006 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.53: +11 -5 lines
Diff to previous 1.53 (colored)

Better support of IPv6 scoped addresses.

- most of the kernel code will not care about the actual encoding of
  scope zone IDs and won't touch "s6_addr16[1]" directly.
- similarly, most of the kernel code will not care about link-local
  scoped addresses as a special case.
- scope boundary check will be stricter.  For example, the current
  *BSD code allows a packet with src=::1 and dst=(some global IPv6
  address) to be sent outside of the node, if the application do:
    s = socket(AF_INET6);
    bind(s, "::1");
    sendto(s, some_global_IPv6_addr);
  This is clearly wrong, since ::1 is only meaningful within a single
  node, but the current implementation of the *BSD kernel cannot
  reject this attempt.
- and, while there, don't try to remove the ff02::/32 interface route
  entry in in6_ifdetach() as it's already gone.

This also includes some level of support for the standard source
address selection algorithm defined in RFC3484, which will be
completed on in the future.

From the KAME project via JINMEI Tatuya.
Approved by core@.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:02 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

merge ktrace-lwp.

Revision 1.44.2.6 / (download) - annotate - [select for diffs], Thu Nov 10 14:11:25 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44.2.5: +10 -10 lines
Diff to previous 1.44.2.5 (colored) next main 1.45 (colored)

Sync with HEAD. Here we go again...

Revision 1.52 / (download) - annotate - [select for diffs], Sun May 29 21:43:51 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Changes since 1.51: +10 -10 lines
Diff to previous 1.51 (colored)

- avoid shadowed variables
- sprinkle const.

Revision 1.44.2.5 / (download) - annotate - [select for diffs], Mon Nov 29 07:25:04 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44.2.4: +4 -4 lines
Diff to previous 1.44.2.4 (colored)

Sync with HEAD.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Nov 17 03:20:53 2004 UTC (19 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored)

wrong paren.  Patrick Latifi

Revision 1.44.2.4 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:24 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44.2.3: +6 -143 lines
Diff to previous 1.44.2.3 (colored)

Sync with HEAD.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Oct 26 07:03:29 2004 UTC (19 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.49: +2 -7 lines
Diff to previous 1.49 (colored)

no need to call defrouter_select() here any more; jinmei

Revision 1.49 / (download) - annotate - [select for diffs], Tue Oct 26 06:54:53 2004 UTC (19 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.48: +3 -63 lines
Diff to previous 1.48 (colored)

more cleanup on onlink assumption; jinmei

Revision 1.48 / (download) - annotate - [select for diffs], Tue Oct 26 06:08:00 2004 UTC (19 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.47: +12 -84 lines
Diff to previous 1.47 (colored)

remove onlink assumption behavior (consider destination on-link if default
router list is empty) based on recent IETF ipv6 discussion (RFC2461 5.2).

fix "ndp -I delete".

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:37:36 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44.2.2: +2 -2 lines
Diff to previous 1.44.2.2 (colored)

Fix the sync with head I botched.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:55:15 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44.2.1: +0 -0 lines
Diff to previous 1.44.2.1 (colored)

Sync with HEAD.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:55:16 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.44: +4 -7 lines
Diff to previous 1.44 (colored)

Sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Wed Dec 10 11:46:33 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

use if_indexlim (instead of if_index) and ifindex2ifnet[x] != NULL
to check if interface exists, as (1) if_index has different meaning
(2) ifindex2ifnet could become NULL when interface gets destroyed,
since when we have introduced dynamically-created interfaces.  from kame

Revision 1.46 / (download) - annotate - [select for diffs], Thu Oct 30 01:43:10 2003 UTC (20 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.45: +2 -5 lines
Diff to previous 1.45 (colored)

Remove some assigned-to but otherwise unused variables.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Sep 26 22:23:58 2003 UTC (20 years, 6 months ago) by wiz
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Process has only one c. From miod@openbsd.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Jun 24 07:54:48 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

remove unneeded checks of accept_rtadv.  from kame

Revision 1.43 / (download) - annotate - [select for diffs], Tue Jun 24 07:39:27 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.42: +11 -16 lines
Diff to previous 1.42 (colored)

use time.tv_sec directly

Revision 1.42 / (download) - annotate - [select for diffs], Fri May 16 16:57:35 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.41: +4 -11 lines
Diff to previous 1.41 (colored)

backout previous.  (sys/net/if.c fixed)

Revision 1.41 / (download) - annotate - [select for diffs], Fri May 16 16:19:45 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.40: +11 -4 lines
Diff to previous 1.40 (colored)

nd6_rtmsg: If called during if_detach(), TAILQ_FIRST(if_addrlist)
could be NULL.  This is not a common case, but as nd6_rtmsg()
will be called during if_detach(), we need to check for the
case.  reported by kanaoka-san.

Revision 1.40 / (download) - annotate - [select for diffs], Fri May 16 02:53:28 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.39: +2 -10 lines
Diff to previous 1.39 (colored)

remove duplicate.  masanori kanaoka

Revision 1.39 / (download) - annotate - [select for diffs], Thu May 15 14:57:58 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.38: +7 -5 lines
Diff to previous 1.38 (colored)

rt->rt_ifp may not always be available.  masanori kanaoka via kame

Revision 1.38 / (download) - annotate - [select for diffs], Wed May 14 06:47:45 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.37: +2 -12 lines
Diff to previous 1.37 (colored)

always use PULLDOWN_TEST codepath.

Revision 1.37 / (download) - annotate - [select for diffs], Thu May 8 20:08:52 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

fix invalid pointer setting on RA reception.  from kiu shueng chuan via kame

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:24 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.24.2.3: +28 -28 lines
Diff to previous 1.24.2.3 (colored) to branchpoint 1.24 (colored) next main 1.25 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.21.2.8 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:32 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.21.2.7: +26 -26 lines
Diff to previous 1.21.2.7 (colored) next main 1.22 (colored)

Catch up to -current.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Sep 11 02:46:46 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.35: +28 -28 lines
Diff to previous 1.35 (colored)

KNF - return is not a function.  sync w/kame.

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Fri Sep 6 08:49:38 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.24.2.2: +9 -6 lines
Diff to previous 1.24.2.2 (colored) to branchpoint 1.24 (colored)

sync kqueue branch with HEAD

Revision 1.28.8.4 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:53 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.28.8.3: +9 -5 lines
Diff to previous 1.28.8.3 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

catch up with -current.

Revision 1.21.2.7 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:53 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.6: +9 -6 lines
Diff to previous 1.21.2.6 (colored)

Catch up to -current.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 30 23:24:21 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.34: +9 -5 lines
Diff to previous 1.34 (colored)

no need to handle NULL argument in defrouter_delreq.
From: tedu <grendel@zeitbombe.org>

Revision 1.28.8.3 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:08 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.28.8.2: +2 -3 lines
Diff to previous 1.28.8.2 (colored) to branchpoint 1.28 (colored)

catch up with -current.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jul 13 21:04:55 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)

no need to bzero() twice.  from he@netbsd

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:22 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.24.2.1: +1049 -610 lines
Diff to previous 1.24.2.1 (colored) to branchpoint 1.24 (colored)

catch up with -current on kqueue branch

Revision 1.28.8.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:53 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.28.8.1: +1048 -609 lines
Diff to previous 1.28.8.1 (colored) to branchpoint 1.28 (colored)

catch up with -current.

Revision 1.21.2.6 / (download) - annotate - [select for diffs], Thu Jun 20 03:49:30 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.5: +1049 -610 lines
Diff to previous 1.21.2.5 (colored)

Catch up to -current.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Jun 9 14:43:14 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.32: +9 -9 lines
Diff to previous 1.32 (colored)

whitespace cleanup

Revision 1.32 / (download) - annotate - [select for diffs], Sat Jun 8 21:22:35 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.31: +1029 -585 lines
Diff to previous 1.31 (colored)

sync with latest KAME in6_ifaddr/prefix/default router manipulation.
behavior changes:
- two iocts used by ndp(8) are now obsolete (backward compat provided).
  use sysctl path instead.
- lo0 does not get ::1 automatically.  it will get ::1 when lo0 comes up.

Revision 1.31 / (download) - annotate - [select for diffs], Sat Jun 8 00:07:00 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

in6_len2mask is a duplicate of in6_prefixlen2mask.  unify.  sync w/kame

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jun 7 03:05:18 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.29: +17 -22 lines
Diff to previous 1.29 (colored)

cope with ndi->maxmtu == 0 case.  sync w/kame

Revision 1.28.8.1 / (download) - annotate - [select for diffs], Thu May 30 13:52:35 2002 UTC (21 years, 10 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Catch up with -current.

Revision 1.29 / (download) - annotate - [select for diffs], Wed May 29 07:53:42 2002 UTC (21 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

attach nd_ifinfo structure into if_afdata.
split IPv6 link MTU (advertised by RA) from real link MTU.
sync with kame

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:03:29 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.24: +29 -17 lines
Diff to previous 1.24 (colored)

Sync kqueue branch with -current.

Revision 1.21.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:25 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.4: +6 -6 lines
Diff to previous 1.21.2.4 (colored)

Catch up to -current.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Dec 18 03:04:05 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.27: +6 -6 lines
Diff to previous 1.27 (colored)

reduce white space/cosmetic diffs w/kame.

Revision 1.21.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:18:14 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.3: +4 -1 lines
Diff to previous 1.21.2.3 (colored)

Catch up to -current.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Nov 13 00:57:05 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.26: +4 -1 lines
Diff to previous 1.26 (colored)

add RCSIDs

Revision 1.21.2.3 / (download) - annotate - [select for diffs], Mon Oct 22 20:42:05 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.2: +22 -13 lines
Diff to previous 1.21.2.2 (colored)

Catch up to -current.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Oct 17 10:55:10 2001 UTC (22 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache
Changes since 1.25: +16 -7 lines
Diff to previous 1.25 (colored)

do not change neighbor cache state on entry timeout,
if the cache entry is for outgoing router.

perform on-linkness check before default router (re-)seletion.

do not play with interface direct route on nd6_rtrequest.

sync a lot of cosmetic changes.  sync with kame

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 16 06:24:45 2001 UTC (22 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.24: +7 -7 lines
Diff to previous 1.24 (colored)

more whitespace/comment sync with kame

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:09:05 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.21.2.1: +6 -3 lines
Diff to previous 1.21.2.1 (colored)

Catch up to -current.

Revision 1.24 / (download) - annotate - [select for diffs], Thu May 24 08:17:22 2001 UTC (22 years, 10 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: kqueue
Changes since 1.23: +5 -2 lines
Diff to previous 1.23 (colored)

print more diag message on in6_addmulti() failures.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Wed May 9 19:43:17 2001 UTC (22 years, 11 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

Pull up revision 1.20 (via patch, requested by itojun):
  Suppress ND6 logs that are too noisy for normal use.  Can be
  re-enabled by net.inet6.icmp6.nd6_debug.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:57 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.6.2.2: +47 -41 lines
Diff to previous 1.6.2.2 (colored) to branchpoint 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.23 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:27 2001 UTC (23 years ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Remove the use of splimp() from the NetBSD kernel.  splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:58:42 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.21: +46 -40 lines
Diff to previous 1.21 (colored)

Catch up with -current.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Apr 4 06:28:41 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.21: +46 -40 lines
Diff to previous 1.21 (colored)

suppress RS/RA log messages (can be re-enabled by net.inet6.icmp6.nd6_debug),
as they may fill up /var.  sync with kame.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:29 2001 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.6.2.1: +48 -25 lines
Diff to previous 1.6.2.1 (colored) to branchpoint 1.6 (colored)

Sync with HEAD.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Feb 11 07:12:01 2001 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored)

protect router list management by splsoftnet properly.  sync with kame

Revision 1.20 / (download) - annotate - [select for diffs], Wed Feb 7 08:59:49 2001 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.19: +46 -28 lines
Diff to previous 1.19 (colored)

during ip6/icmp6 inbound packet processing, do not call log() nor printf() in
normal operation (/var can get filled up by flodding bogus packets).
sysctl net.inet6.icmp6.nd6_debug will turn on diagnostic messages.
(#define ND6_DEBUG will turn it on by default)

improve stats in ND6 code.

lots of synchronziation with kame (including comments and cometic ones).

Revision 1.19 / (download) - annotate - [select for diffs], Wed Jan 17 11:26:53 2001 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

wrap noisy ND6 debugging messages with ND6_DEBUG.  sync with kame

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:57 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.6: +339 -302 lines
Diff to previous 1.6 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 13 23:45:22 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

supress warning (LOG_ERR -> LOG_DEBUG) which occurs in the following situation:
- manually configure an address from prefix P (like P::1)
- autoconfigure additional address from the same prefix P (like P::ifid).
- rtrequest fails due to P/plen already exists

more fundamental solution should appear later, when kame side stablizes it.
from thopej.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:04 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.15: +19 -22 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 13 04:35:29 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.16: +10 -3 lines
Diff to previous 1.16 (colored)

add sanity check on in6_ifaddr.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 13 02:54:11 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.15: +11 -21 lines
Diff to previous 1.15 (colored)

make sure to link new in6_ifaddr to if_addrlist.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Mar 21 11:34:25 2000 UTC (24 years ago) by itojun
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

s/ND6DEBUG/ND6_DEBUG/ (just to meet nd6_nbr.c)

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 4 02:39:58 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Quiet a noisy diagnostic.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 2 07:14:52 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.12: +5 -2 lines
Diff to previous 1.12 (colored)

don't configure ifa_dstaddr for non-pointopoint interface,
so that we won't be returning them from routing socket manipulation.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Feb 26 08:39:21 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.11: +41 -14 lines
Diff to previous 1.11 (colored)

bring in recent KAME changes (only important and stable ones, as usual).
- remove net.inet6.ip6.nd6_proxyall.  introduce proxy NDP code works
  just like "arp -s".
- revise source address selection.
  be more careful about use of yet-to-be-valid addresses as source.
- as router, transmit ICMP6_DST_UNREACH_BEYONDSCOPE against out-of-scope
  packet forwarding attempt.
- path MTU discovery takes care of routing header properly.
- be more strict about mbuf chain parsing.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Feb 6 12:49:48 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

fix include pathname for better rfc2292 compliance.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Feb 3 12:49:15 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.9: +1 -48 lines
Diff to previous 1.9 (colored)

remove old #if 0'ed portion

Revision 1.9 / (download) - annotate - [select for diffs], Tue Feb 1 22:52:12 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +5 -2 lines
Diff to previous 1.8 (colored)

First-draft if_detach() implementation, originally from Bill Studnemund,
although this version has been changed somewhat:
- reference counting on ifaddrs isn't as complete as Bill's original
  work was.  This is hard to get right, and we should attack one
  protocol at a time.
- This doesn't do reference counting or dynamic allocation of ifnets yet.
- This version introduces a new PRU -- PRU_PURGEADDR, which is used to
  purge an ifaddr from a protocol.  The old method Bill used didn't work
  on all protocols, and it only worked on some because it was Very Lucky.

This mostly works ... i.e. works for my USB Ethernet, except for a dangling
ifaddr reference left by the IPv6 code; have not yet tracked this down.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jan 6 15:46:11 2000 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.7: +1 -55 lines
Diff to previous 1.7 (colored)

remove extra portability #ifdef (like #ifdef __FreeBSD__) in KAME IPv6/IPsec
code, from netbsd-current repository.
#ifdef'ed version is always available from ftp.kame.net.

XXX please do not make too many diff-unfriendly changes, we'll need to take
bunch of diffs on upgrade...

Revision 1.6.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:27 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.6: +316 -210 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Pull up to last week's -current.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:23 1999 UTC (24 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.6: +316 -210 lines
Diff to previous 1.6 (colored)

sync IPv6 part with latest KAME tree.   IPsec part is left unmodified
due to massive changes in KAME side.
- IPv6 output goes through nd6_output
- faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator
  using heavily modified DNS servers
- per-interface statistics (required for IPv6 MIB)
- interface autoconfig is revisited
- udp input handling has a big change for mapped address support.
- introduce in4_cksum() for non-overwriting checksumming
- introduce m_pulldown()
- neighbor discovery cleanups/improvements
- netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland)
- IFA_STATS is fixed a bit (not tested)
- and more more more.

TODO:
- cleanup os-independency #ifdef
- avoid rcvif dual use (for IPsec) to help ifdetach

(sorry for jumbo commit, I can't separate this any more...)

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Tue Nov 30 13:35:59 1999 UTC (24 years, 4 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.1.2.2: +93 -159 lines
Diff to previous 1.1.2.2 (colored) next main 1.2 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Mon Aug 2 22:36:07 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.2.2.2: +11 -10 lines
Diff to previous 1.2.2.2 (colored) next main 1.3 (colored)

Update from trunk.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jul 31 18:41:17 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

sync with recent KAME.
- loosen ipsec restriction on packet diredtion.
- revise icmp6 redirect handling on IsRouter bit.
- tcp/udp notification processing (link-local address case)
- cosmetic fixes (better code share across *BSD).

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 30 10:35:38 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.4: +1 -2 lines
Diff to previous 1.4 (colored)

remove reference to in6_systm.h (file itself will be removed afterwords)

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Tue Jul 6 11:03:03 1999 UTC (24 years, 9 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.1.2.1: +7 -7 lines
Diff to previous 1.1.2.1 (colored)

KAME/NetBSD 1.4, SNAP kit 1999/07/05.
NOTE: this branch is just for reference purposes (i.e. for taking cvs diff).
do not touch anything on the branch.  actual work must be done on HEAD branch.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 4 02:01:15 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.3: +8 -8 lines
Diff to previous 1.3 (colored)

s/splnet/splsoftnet/ in IPv6/IPsec part.
hope I made no mistake (the kernel works fine but I need a regress test)

Suggested by: thorpej

Revision 1.3 / (download) - annotate - [select for diffs], Sat Jul 3 21:30:19 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

RCS ID police.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:48:30 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.2.2.1: +1503 -0 lines
Diff to previous 1.2.2.1 (colored)

Sync w/ -current.

Revision 1.2.2.1, Thu Jul 1 08:12:57 1999 UTC (24 years, 9 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.2: +0 -1503 lines
FILE REMOVED

file nd6_rtr.c was added on branch chs-ubc2 on 1999-07-01 23:48:30 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:57 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Branch point for: chs-ubc2
Changes since 1.1: +1503 -0 lines
Diff to previous 1.1 (colored)

IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
  data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
  package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
  file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 28 06:37:07 1999 UTC (24 years, 9 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.1: +1503 -0 lines
Diff to previous 1.1 (colored)

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.

Revision 1.1, Mon Jun 28 06:37:07 1999 UTC (24 years, 9 months ago) by itojun
Branch: MAIN
Branch point for: kame
FILE REMOVED

file nd6_rtr.c was initially added on branch kame.

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>