The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.288.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 13:06:16 2023 UTC (2 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Changes since 1.288.2.1: +2 -7 lines
Diff to previous 1.288.2.1 (colored) to branchpoint 1.288 (colored) next main 1.289 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #487):

	sys/compat/common/compat_90_mod.c: revision 1.5
	sys/compat/common/compat_90_mod.c: revision 1.6
	sys/netinet6/in6.c: revision 1.290
	sys/netinet6/in6.c: revision 1.291
	sys/compat/common/files.common: revision 1.11
	sys/netinet6/icmp6.c: revision 1.255
	sys/compat/common/net_inet6_nd_90.c: revision 1.1
	sys/compat/common/net_inet6_nd_90.c: revision 1.2
	sys/modules/compat_90/Makefile: revision 1.2
	sys/modules/compat_90/Makefile: revision 1.3
	sys/netinet6/nd6.c: revision 1.281
	sys/compat/common/compat_mod.h: revision 1.10
	sys/kern/compat_stub.c: revision 1.23
	sys/sys/compat_stub.h: revision 1.27

Identify the need to rework the COMPAT_* code to be more
module-aware.
This is an XXX comment block only, NFCI.

Modularize the COMPAT_90 code that resulted from the removal of
netinet6/nd6 from the kernel.  Now, the minimal compat code can
be successfully loaded and unloaded along with the rest of the
COMPAT_90 code.

Allow kernels builds which don't define INET6 to compile compat bits
too.

Default the build of compat_90 module to include IPv6, as is done
for other INET6-sensitive modules (see if_lagg).

Revision 1.291 / (download) - annotate - [select for diffs], Sat Dec 9 15:21:02 2023 UTC (2 months, 2 weeks ago) by pgoyette
Branch: MAIN
CVS Tags: HEAD
Changes since 1.290: +2 -18 lines
Diff to previous 1.290 (colored)

Modularize the COMPAT_90 code that resulted from the removal of
netinet6/nd6 from the kernel.  Now, the minimal compat code can
be successfully loaded and unloaded along with the rest of the
COMPAT_90 code.

XXX  pullup-10 - hopefully before RC2

Revision 1.290 / (download) - annotate - [select for diffs], Thu Dec 7 16:47:44 2023 UTC (2 months, 2 weeks ago) by pgoyette
Branch: MAIN
Changes since 1.289: +13 -2 lines
Diff to previous 1.289 (colored)

Identify the need to rework the COMPAT_* code to be more
module-aware.

This is an XXX comment block only, NFCI.

Revision 1.245.2.14 / (download) - annotate - [select for diffs], Fri Aug 4 14:38:09 2023 UTC (6 months, 3 weeks ago) by martin
Branch: netbsd-8
Changes since 1.245.2.13: +6 -2 lines
Diff to previous 1.245.2.13 (colored) to branchpoint 1.245 (colored) next main 1.246 (colored)

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

	sys/netinet6/in6.c: revision 1.289
	sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface

Revision 1.275.2.2 / (download) - annotate - [select for diffs], Fri Aug 4 14:29:44 2023 UTC (6 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.275.2.1: +6 -2 lines
Diff to previous 1.275.2.1 (colored) to branchpoint 1.275 (colored) next main 1.276 (colored)

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

	sys/netinet6/in6.c: revision 1.289
	sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface

Revision 1.288.2.1 / (download) - annotate - [select for diffs], Fri Aug 4 14:28:01 2023 UTC (6 months, 3 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC1
Changes since 1.288: +6 -2 lines
Diff to previous 1.288 (colored)

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

	sys/netinet6/in6.c: revision 1.289
	sys/netinet6/ip6_output.c: revision 1.234

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

in6: don't send any IPv6 packets over a disabled interface

Revision 1.289 / (download) - annotate - [select for diffs], Thu Aug 3 05:44:22 2023 UTC (6 months, 3 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.288: +6 -2 lines
Diff to previous 1.288 (colored)

in6: clear ND6_IFF_IFDISABLED to allow DAD again on link-up

Revision 1.288 / (download) - annotate - [select for diffs], Mon Oct 24 14:15:19 2022 UTC (16 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.287: +3 -3 lines
Diff to previous 1.287 (colored)

Clear saved_flags to avoid compile error on some archs.

Revision 1.287 / (download) - annotate - [select for diffs], Mon Oct 24 01:54:19 2022 UTC (16 months ago) by knakahara
Branch: MAIN
Changes since 1.286: +31 -2 lines
Diff to previous 1.286 (colored)

Fix PR kern/57037

Be able to change the behavior sending parameter changing routing messages.
When set net.inet6.ip6.param_rt_msg=0, don't send parameter changing
routing messages.
When set net.inet6.ip6.param_rt_msg=1(default), send parameter changing
routing messages by RTM_NEWADDR.

Revision 1.286 / (download) - annotate - [select for diffs], Tue Sep 20 02:23:37 2022 UTC (17 months, 1 week ago) by knakahara
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.285: +30 -2 lines
Diff to previous 1.285 (colored)

Remove routes on an address removal if the routes referencing to the address.  Implemented by ozaki-r@n.o.

A route that has a gateway is on a connected route can be invalid if the
connected route is deleted, i.e., an associated address is removed.
Traditionally NetBSD doesn't sweep such a route on the address removal.  Sending
packets over the route fails with "No route to host".  Also the route holds an
orphan ifaddr as rt_ifa that is destructed say by in_purgeaddr.

If the same address is assgined again in such a state, there can be two
different ifaddr objects with the same address.  Until recently it's not a
big problem because we can send packets anyway.  However after MP-ification
of the network stack, we can't send packets because we strictly check if rt_ifa
(i.e., the (old) ifaddr) is valid.

This change automatically removes such routes on a removal of an associated
address to avoid keeping inconsistent routes.

Revision 1.285 / (download) - annotate - [select for diffs], Sun Dec 5 04:42:55 2021 UTC (2 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.284: +3 -3 lines
Diff to previous 1.284 (colored)

s/existance/existence/ in comment.

Revision 1.284 / (download) - annotate - [select for diffs], Sun Dec 5 03:12:14 2021 UTC (2 years, 2 months ago) by msaitoh
Branch: MAIN
Changes since 1.283: +3 -3 lines
Diff to previous 1.283 (colored)

s/multple/multiple/ in comment.

Revision 1.283 / (download) - annotate - [select for diffs], Tue Sep 21 15:06:21 2021 UTC (2 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.282: +3 -3 lines
Diff to previous 1.282 (colored)

don't opencode kauth_cred_get()

Revision 1.245.2.13 / (download) - annotate - [select for diffs], Thu Oct 8 18:06:13 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-8
Changes since 1.245.2.12: +9 -8 lines
Diff to previous 1.245.2.12 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by roy in ticket #1613):

	sys/netinet/in.c: revision 1.241
	sys/netinet6/in6.c: revision 1.282

inet: Treat LINK_STATE_UNKNOWN as LINK_STATE_UP when changing

It's something we have always done.
it's really rare for anything to transition to UNKNOWN from either
UP or DOWN, but technically it is possible.

Revision 1.275.2.1 / (download) - annotate - [select for diffs], Thu Oct 8 18:04:59 2020 UTC (3 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.275: +9 -8 lines
Diff to previous 1.275 (colored)

Pull up following revision(s) (requested by roy in ticket #1104):

	sys/netinet/in.c: revision 1.241
	sys/netinet6/in6.c: revision 1.282

inet: Treat LINK_STATE_UNKNOWN as LINK_STATE_UP when changing

It's something we have always done.
it's really rare for anything to transition to UNKNOWN from either
UP or DOWN, but technically it is possible.

Revision 1.282 / (download) - annotate - [select for diffs], Tue Sep 29 19:33:36 2020 UTC (3 years, 4 months ago) by roy
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.281: +9 -8 lines
Diff to previous 1.281 (colored)

inet: Treat LINK_STATE_UNKNOWN as LINK_STATE_UP when changing

It's something we have always done.
it's really rare for anything to transition to UNKNOWN from either
UP or DOWN, but technically it is possible.

Revision 1.281 / (download) - annotate - [select for diffs], Tue Jun 16 17:12:18 2020 UTC (3 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.280: +2 -28 lines
Diff to previous 1.280 (colored)

remove unused

Revision 1.280 / (download) - annotate - [select for diffs], Sun Jun 14 14:26:17 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.279: +3 -4 lines
Diff to previous 1.279 (colored)

inet6: Allow addresses to be marked AUTOCONF from userland

Revision 1.279 / (download) - annotate - [select for diffs], Sat Jun 13 06:05:08 2020 UTC (3 years, 8 months ago) by mlelstv
Branch: MAIN
Changes since 1.278: +3 -2 lines
Diff to previous 1.278 (colored)

COMPAT_90 doesn't necessarily imply COMPAT_50. So include compat in6_var.h in
either case.

Fixes evbarm build that starts with COMPAT_60.

Revision 1.278 / (download) - annotate - [select for diffs], Fri Jun 12 11:04:45 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.277: +29 -147 lines
Diff to previous 1.277 (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.268.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:17 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.268.2.2: +4 -2 lines
Diff to previous 1.268.2.2 (colored) to branchpoint 1.268 (colored) next main 1.269 (colored)

Mostly merge changes from HEAD upto 20200411

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

Merge changes from current as of 20200406

Revision 1.276.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:52 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.276: +2 -4 lines
Diff to previous 1.276 (colored) next main 1.277 (colored)

Sync with head.

Revision 1.277 / (download) - annotate - [select for diffs], Mon Jan 20 18:38:22 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2
Changes since 1.276: +2 -4 lines
Diff to previous 1.276 (colored)

Remove FDDI support.

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

Make panic messages more informative

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

Sync with HEAD

Revision 1.275 / (download) - annotate - [select for diffs], Mon Apr 29 11:57:22 2019 UTC (4 years, 9 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.274: +6 -6 lines
Diff to previous 1.274 (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.274 / (download) - annotate - [select for diffs], Mon Mar 18 11:38:03 2019 UTC (4 years, 11 months ago) by msaitoh
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.273: +3 -3 lines
Diff to previous 1.273 (colored)

 s/pakcet/packet/ in comment.

Revision 1.273 / (download) - annotate - [select for diffs], Tue Feb 5 04:48:47 2019 UTC (5 years ago) by mrg
Branch: MAIN
Changes since 1.272: +5 -4 lines
Diff to previous 1.272 (colored)

adjust fallthru comments to appease gcc7.

Revision 1.260.2.7 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:05 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.260.2.6: +4 -4 lines
Diff to previous 1.260.2.6 (colored) to branchpoint 1.260 (colored) next main 1.261 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.272 / (download) - annotate - [select for diffs], Thu Nov 29 09:54:23 2018 UTC (5 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Changes since 1.271: +3 -3 lines
Diff to previous 1.271 (colored)

Don't run DAD on link-up if it's explicitly disabled

Revision 1.271 / (download) - annotate - [select for diffs], Thu Nov 29 09:51:21 2018 UTC (5 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.270: +3 -3 lines
Diff to previous 1.270 (colored)

Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions

Revision 1.260.2.6 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:51 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260.2.5: +32 -2 lines
Diff to previous 1.260.2.5 (colored) to branchpoint 1.260 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.245.2.12 / (download) - annotate - [select for diffs], Tue Nov 6 14:38:58 2018 UTC (5 years, 3 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.245.2.11: +32 -2 lines
Diff to previous 1.245.2.11 (colored) to branchpoint 1.245 (colored)

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

	sys/netinet6/nd6.c: revision 1.251
	sys/netinet/if_arp.c: revision 1.276
	sys/net/if.c: revision 1.438
	sys/net/if.c: revision 1.439
	sys/net/route.c: revision 1.214
	sys/net/route.c: revision 1.215
	sys/net/route.c: revision 1.216
	sys/netinet6/in6.c: revision 1.270
	sys/net/route.h: revision 1.120
	sys/net/if.c: revision 1.440

Remove a wrong assertion in ifaref

 -

Doing ifref on an ifa with IFA_DESTROYING is not a problem; the reference should
be dropped during the destruction of the ifa.

 -

Use atomic operations for ifa_refcnt

 -

Avoid a dangling pointer during rt_replace_ifa

 -

Avoid double rt_replace_ifa on rtrequest1(RTM_ADD)

Some callers of rtrequest1(RTM_ADD) adjust rt_ifa of an rtentry created by
rtrequest1 that may change rt_ifa (in ifa_rtrequest) with another ifa that is
different from requested one.  It's wasteful and even worse introduces a race
condition.  rtrequest1 should just use a passed ifa as is if a caller hopes so.

 -

Use rt_update framework on updating a rtentry

Revision 1.270 / (download) - annotate - [select for diffs], Tue Oct 30 05:56:02 2018 UTC (5 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.269: +32 -2 lines
Diff to previous 1.269 (colored)

Use rt_update framework on updating a rtentry

Revision 1.260.2.5 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:10 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260.2.4: +4 -4 lines
Diff to previous 1.260.2.4 (colored) to branchpoint 1.260 (colored)

Sync with HEAD

Revision 1.269 / (download) - annotate - [select for diffs], Wed Jul 4 00:35:33 2018 UTC (5 years, 7 months ago) by kamil
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.268: +4 -4 lines
Diff to previous 1.268 (colored)

Paper over Undefined Behavior in in6_control1()

Replace calculation of maxexpire (TIME_MAX) with a construct that triggers
UB with a one that uses implementation defined semantics.

No functional change intended.

An attempt to appease KUBSAn.

Detected with Kernel Undefined Behavior Sanitizer.

Reported by <Harry Pantazis>

Revision 1.260.2.4 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:07 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260.2.3: +5 -3 lines
Diff to previous 1.260.2.3 (colored) to branchpoint 1.260 (colored)

Sync with HEAD

Revision 1.245.2.11 / (download) - annotate - [select for diffs], Thu Jun 7 17:48:31 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.245.2.10: +5 -3 lines
Diff to previous 1.245.2.10 (colored) to branchpoint 1.245 (colored)

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

	sys/netinet6/mld6.c: revision 1.93-1.99
	sys/netinet6/in6_var.h: revision 1.99,1.100
	sys/netinet6/in6.c: revision 1.267,1.268
	sys/netinet6/nd6.c: revision 1.249

Don't hold softnet_lock in mld_timeo
Then we can get rid of remaining abuses of mutex_owned(softnet_lock).

Release in6_multilock on callout_halt of mld_timeo to avoid a deadlock
Improve atomicity of in6_leavegroup and in6_delmulti

Avoid NULL pointer dereference on imm->i6mm_maddr

Make a refcount decrement and a removal from a list of an item atomic
in6m_refcount of an in6m can be incremented if the in6m is on the list
(if_multiaddrs) in in6_addmulti or mld_input.  So we must avoid such an
increment when we try to destroy an in6m.  To this end we must make
an in6m_refcount decrement and a removal of an in6m from if_multiaddrs
atomic.

Make a deletion of in6m in nd6_rtrequest atomic

Move LIST_REMOVE
mld_stoptimer releases in6_multilock temporarily, so we must LIST_REMOVE first.

Avoid double LIST_REMOVE which corrupts lists
Mark in6m as used for non-DIAGNOSTIC builds.

Revision 1.268 / (download) - annotate - [select for diffs], Tue May 29 09:10:39 2018 UTC (5 years, 9 months ago) by prlw1
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored)

Mark in6m as used for non-DIAGNOSTIC builds.

Revision 1.267 / (download) - annotate - [select for diffs], Tue May 29 04:37:16 2018 UTC (5 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.266: +5 -3 lines
Diff to previous 1.266 (colored)

Avoid NULL pointer dereference on imm->i6mm_maddr

Revision 1.260.2.3 / (download) - annotate - [select for diffs], Wed May 2 07:20:23 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260.2.2: +2 -4 lines
Diff to previous 1.260.2.2 (colored) to branchpoint 1.260 (colored)

Synch with HEAD

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

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

Revision 1.245.2.10 / (download) - annotate - [select for diffs], Sun Apr 8 06:09:12 2018 UTC (5 years, 10 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.245.2.9: +5 -3 lines
Diff to previous 1.245.2.9 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #701):
	sys/netinet/in.c: 1.227
	sys/netinet6/in6.c: 1.265
	tests/net/arp/t_arp.sh: 1.35-1.36
Make GARP work again when DAD is disabled
The change avoids setting an IP address tentative on initializing it when
the IPv4 DAD is disabled (net.inet.ip.dad_count=0), which allows a GARP packet
to be sent (see arpannounce).  This is the same behavior of NetBSD 7, i.e.,
before introducing the IPv4 DAD.
Additionally do the same change to IPv6 DAD for consistency.
The change is suggested by roy@
--
Improve packet checks and error reporting
--
Add tests for GARP without DAD
Additionally make the existing tests for GARP more explicit.

Revision 1.260.2.2 / (download) - annotate - [select for diffs], Sat Apr 7 04:12:20 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260.2.1: +5 -3 lines
Diff to previous 1.260.2.1 (colored) to branchpoint 1.260 (colored)

Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$

Revision 1.265 / (download) - annotate - [select for diffs], Fri Apr 6 16:03:16 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407
Changes since 1.264: +5 -3 lines
Diff to previous 1.264 (colored)

Make GARP work again when DAD is disabled

The change avoids setting an IP address tentative on initializing it when the
IPv4 DAD is disabled (net.inet.ip.dad_count=0), which allows a GARP packet to be
sent (see arpannounce).  This is the same behavior of NetBSD 7, i.e., before
introducing the IPv4 DAD.

Additionally do the same change to IPv6 DAD for consistency.

The change is suggested by roy@

Revision 1.260.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:07 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.260: +15 -57 lines
Diff to previous 1.260 (colored)

Synch with HEAD

Revision 1.245.2.9 / (download) - annotate - [select for diffs], Tue Mar 13 13:27:10 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
Changes since 1.245.2.8: +17 -59 lines
Diff to previous 1.245.2.8 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #622):
	sys/netinet/if_arp.c: revision 1.270
	sys/net/if_llatbl.c: revision 1.24 (patch)
	sys/net/if_llatbl.c: revision 1.25
	sys/net/if_llatbl.c: revision 1.26
	sys/net/route.c: revision 1.204
	sys/netinet6/in6.c: revision 1.261
	sys/netinet6/in6.c: revision 1.262 (patch)
	sys/netinet6/in6.c: revision 1.263
	sys/netinet/in.c: revision 1.216
	sys/netinet6/in6.c: revision 1.264
	sys/netinet6/nd6.c: revision 1.246 (patch)
	sys/netinet/if_arp.c: revision 1.269
	sys/net/if_llatbl.h: revision 1.14
	sys/netinet6/in6.c: revision 1.259
	sys/netinet/in.c: revision 1.220
	sys/netinet/in.c: revision 1.221 (patch)
	sys/netinet/in.c: revision 1.222
	sys/netinet/in.c: revision 1.223

Suppress noisy debugging outputs
Even if DEBUG they are too noisy under load.

Tweak sanity checks

Scheduling a timer of static entries is wrong.

Add assertions

We must not destroy llentries holding mbufs.

Fix reference leaks of llentry
callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).
While here, we can remove remaining abuses of mutex_owned for softnet_lock.

Fix memory leaks on arp -d and ndp -d for static entries
We have to delete entries on in_lltable_delete and in6_lltable_delete
unconditionally.  Note that we don't need to worry about LLE_IFADDR because
there is no such entries now.

Use pool(9) for llentry allocations
llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.

Revision 1.264 / (download) - annotate - [select for diffs], Tue Mar 6 07:27:55 2018 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Changes since 1.263: +11 -15 lines
Diff to previous 1.263 (colored)

Use pool(9) for llentry allocations

llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.

Revision 1.263 / (download) - annotate - [select for diffs], Tue Mar 6 07:25:27 2018 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.262: +3 -7 lines
Diff to previous 1.262 (colored)

Fix memory leaks on arp -d and ndp -d for static entries

We have to delete entries on in_lltable_delete and in6_lltable_delete
unconditionally.  Note that we don't need to worry about LLE_IFADDR because
there is no such entries now.

Revision 1.262 / (download) - annotate - [select for diffs], Tue Mar 6 07:24:01 2018 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.261: +3 -39 lines
Diff to previous 1.261 (colored)

Fix reference leaks of llentry

callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).

While here, we can remove remaining abuses of mutex_owned for softnet_lock.

Revision 1.261 / (download) - annotate - [select for diffs], Tue Mar 6 07:20:41 2018 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.260: +4 -2 lines
Diff to previous 1.260 (colored)

Add assertions

We must not destroy llentries holding mbufs.

Revision 1.245.2.8 / (download) - annotate - [select for diffs], Mon Feb 26 13:32:01 2018 UTC (6 years ago) by martin
Branch: netbsd-8
Changes since 1.245.2.7: +5 -4 lines
Diff to previous 1.245.2.7 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #588):
	sys/netinet6/in6.c: revision 1.260
	sys/netinet/in.c: revision 1.219
	sys/netinet/wqinput.c: revision 1.4
	sys/rump/net/lib/libnetinet/netinet_component.c: revision 1.11
	sys/netinet/ip_input.c: revision 1.376
	sys/netinet6/ip6_input.c: revision 1.193
Avoid a deadlock between softnet_lock and IFNET_LOCK

A deadlock occurs because there is a violation of the rule of lock ordering;
softnet_lock is held with hodling IFNET_LOCK, which violates the rule.
To avoid the deadlock, replace softnet_lock in in_control and in6_control
with KERNEL_LOCK.

We also need to add some KERNEL_LOCKs to protect the network stack surely.
This is required, for example, for PR kern/51356.

Fix PR kern/53043

Revision 1.260 / (download) - annotate - [select for diffs], Sat Feb 24 07:37:09 2018 UTC (6 years ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.259: +5 -4 lines
Diff to previous 1.259 (colored)

Avoid a deadlock between softnet_lock and IFNET_LOCK

A deadlock occurs because there is a violation of the rule of lock ordering;
softnet_lock is held with hodling IFNET_LOCK, which violates the rule.
To avoid the deadlock, replace softnet_lock in in_control and in6_control
with KERNEL_LOCK.

We also need to add some KERNEL_LOCKs to protect the network stack surely.
This is required, for example, for PR kern/51356.

Fix PR kern/53043

Revision 1.245.2.7 / (download) - annotate - [select for diffs], Sun Feb 11 21:17:34 2018 UTC (6 years ago) by snj
Branch: netbsd-8
Changes since 1.245.2.6: +20 -2 lines
Diff to previous 1.245.2.6 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #536):
	distrib/sets/lists/base/shl.mi: 1.825
	distrib/sets/lists/comp/mi: 1.2168-1.2169
	distrib/sets/lists/comp/shl.mi: 1.310
	distrib/sets/lists/debug/mi: 1.234
	distrib/sets/lists/debug/shl.mi: 1.188
	distrib/sets/lists/man/mi: 1.1570
	distrib/sets/lists/tests/mi: 1.772
	etc/mtree/NetBSD.dist.tests: 1.150
	share/man/man4/Makefile: 1.650
	share/man/man4/ipsec.4: 1.42-1.43
	share/man/man4/ipsecif.4: 1.1-1.5
	sys/arch/amd64/conf/ALL: 1.77
	sys/arch/amd64/conf/GENERIC: 1.480
	sys/conf/files: 1.1191
	sys/net/Makefile: 1.34
	sys/net/files.net: 1.14
	sys/net/if.c: 1.404
	sys/net/if.h: 1.248
	sys/net/if_gif.c: 1.135
	sys/net/if_ipsec.c: 1.1-1.3
	sys/net/if_ipsec.h: 1.1
	sys/net/if_l2tp.c: 1.16
	sys/net/if_types.h: 1.28
	sys/netinet/in.c: 1.214
	sys/netinet/in.h: 1.103
	sys/netinet/in_gif.c: 1.92
	sys/netinet/ip_var.h: 1.122
	sys/netinet6/in6.c: 1.257
	sys/netinet6/in6.h: 1.88
	sys/netinet6/in6_gif.c: 1.90
	sys/netinet6/ip6_var.h: 1.75
	sys/netipsec/Makefile: 1.6
	sys/netipsec/files.netipsec: 1.13
	sys/netipsec/ipsec.h: 1.62
	sys/netipsec/ipsecif.c: 1.1
	sys/netipsec/ipsecif.h: 1.1
	sys/netipsec/key.c: 1.246-1.247
	sys/netipsec/key.h: 1.34
	sys/rump/net/Makefile.rumpnetcomp: 1.20
	sys/rump/net/lib/libipsec/IPSEC.ioconf: 1.1
	sys/rump/net/lib/libipsec/Makefile: 1.1
	sys/rump/net/lib/libipsec/ipsec_component.c: 1.1
	tests/net/Makefile: 1.34
	tests/net/if_ipsec/Makefile: 1.1
	tests/net/if_ipsec/t_ipsec.sh: 1.1-1.2
Don't touch an SP without a reference to it
unify processing to check nesting count for some tunnel protocols.
add ipsec(4) interface, which is used for route-based VPN.
man and ATF are added later, please see man for details.
reviewed by christos@n.o, joerg@n.o and ozaki-r@n.o, thanks.
https://mail-index.netbsd.org/tech-net/2017/12/18/msg006557.html
ipsec(4) interface supports rump now.
add ipsec(4) interface ATF.
add ipsec(4) interface man as ipsecif.4.
add ipsec(4) interface to amd64/GENERIC and amd64/ALL configs.
apply in{,6}_tunnel_validate() to gif(4).
Spell IPsec that way. Simplify macro usage. Sort SEE ALSO. Bump
date for previous.
Improve wording and macro use.
Some parts are not clear to me, so someone with knowledge of ipsecif(4)
should improve this some more.
Improve ipsecif.4. Default port ipsec(4) NAT-T is tested now.
pointed out by wiz@n.o and suggested by ozaki-r@n.o, thanks.
Change the prefix of test names to ipsecif_ to distinguish from tests for ipsec(4)
New sentence, new line. Remove empty macro.
Fix PR kern/52920. Pointed out by David Binderman, thanks.
Improve wording, and put a new drawing, from me and Kengo Nakahara.
apply a little more #ifdef INET/INET6.  fixes !INET6 builds.

Revision 1.245.2.6 / (download) - annotate - [select for diffs], Sat Feb 3 22:07:26 2018 UTC (6 years ago) by snj
Branch: netbsd-8
Changes since 1.245.2.5: +3 -2 lines
Diff to previous 1.245.2.5 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #514):
	sys/net/route.c: 1.205
	sys/net/rtsock.c: 1.237-1.238
	sys/netinet/in.c: 1.215
	sys/netinet/tcp_subr.c: 1.272
	sys/netinet/tcp_timer.c: 1.93
	sys/netinet/tcp_timer.h: 1.29
	sys/netinet/tcp_var.h: 1.182
	sys/netinet6/in6.c: 1.258
Remove extra pserialize_perform from in_purgeaddr
It's already performed in ifa_remove. Note so there (in in6_unlink_ifa too).
Release rt_so_mtx on updating a rtentry to avoid a deadlock with route_intr
The deadlock happened only if NET_MPSAFE on.
Run tcp_slowtimo in workqueue if NET_MPSAFE
If NET_MPSAFE is enabled, we have to avoid taking softnet_lock in softint as
much as possible to prevent any softint handlers including callout handlers
such as tcp_slowtimo from sticking on softnet_lock because it results in
undesired delays of executing subsequent softint handlers.
NFCI for !NET_MPSAFE
Fix a return value of rt_update_prepare
Callers expect it to be an errno.
Fix another deadlock
When waiting for a route update to finish, a waiter has to release its reference
to the route to avoid a deadlock. Because a updater tries to wait for references
to a target route (except for a reference by the updater itself) to be released.

Revision 1.259 / (download) - annotate - [select for diffs], Fri Jan 19 08:01:05 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.258: +4 -4 lines
Diff to previous 1.258 (colored)

Suppress noisy debugging outputs

Even if DEBUG they are too noisy under load.

Revision 1.258 / (download) - annotate - [select for diffs], Mon Jan 15 08:17:35 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.257: +3 -2 lines
Diff to previous 1.257 (colored)

Remove extra pserialize_perform from in_purgeaddr

It's already performed in ifa_remove. Note so there (in in6_unlink_ifa too).

Revision 1.257 / (download) - annotate - [select for diffs], Wed Jan 10 10:56:30 2018 UTC (6 years, 1 month ago) by knakahara
Branch: MAIN
Changes since 1.256: +20 -2 lines
Diff to previous 1.256 (colored)

add ipsec(4) interface, which is used for route-based VPN.

man and ATF are added later, please see man for details.

reviewed by christos@n.o, joerg@n.o and ozaki-r@n.o, thanks.
https://mail-index.netbsd.org/tech-net/2017/12/18/msg006557.html

Revision 1.245.2.5 / (download) - annotate - [select for diffs], Tue Jan 2 10:56:58 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.245.2.4: +3 -3 lines
Diff to previous 1.245.2.4 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #463):
	sys/netinet/in.c: revision 1.212
	sys/netinet/ip_output.c: revision 1.288
	sys/netinet6/in6.c: revision 1.256
	sys/netinet6/in6_pcb.c: revision 1.163
	sys/sys/lwp.h: revision 1.176
Add missing curlwp_bindx
--
Add missing curlwp_bindx
--
Check LP_BOUND is surely set in curlwp_bindx
This may find an extra call of curlwp_bindx.
--
Fix usage of curlwp_bind in ip_output
curlwp_bindx must be called in LIFO order, i.e., we can't call curlwp_bind
and curlwp_bindx like this:
  bound1 = curlwp_bind();
  bound2 = curlwp_bind();
  curlwp_bindx(bound1);
  curlwp_bindx(bound2);
ip_outout did so if NET_MPSAFE. Fix it.
--
Fix wrong usage of psref_held
We can't use it for checking if a caller does NOT hold a given target.
If you want to do it you should have psref_not_held or something.

Revision 1.245.2.4 / (download) - annotate - [select for diffs], Tue Jan 2 10:20:34 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.245.2.3: +12 -15 lines
Diff to previous 1.245.2.3 (colored) to branchpoint 1.245 (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.256 / (download) - annotate - [select for diffs], Mon Dec 25 04:41:49 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

Fix wrong usage of psref_held

We can't use it for checking if a caller does NOT hold a given target.
If you want to do it you should have psref_not_held or something.

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

Ensure to call if_mcast_op with holding IFNET_LOCK

Note that CARP doesn't deal with IFNET_LOCK yet.

Revision 1.161.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.161.2.2: +1120 -750 lines
Diff to previous 1.161.2.2 (colored) to branchpoint 1.161 (colored) next main 1.162 (colored)

update from HEAD

Revision 1.245.2.3 / (download) - annotate - [select for diffs], Thu Nov 30 15:57:37 2017 UTC (6 years, 2 months ago) by martin
Branch: netbsd-8
Changes since 1.245.2.2: +20 -13 lines
Diff to previous 1.245.2.2 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #407):
	sys/compat/linux32/common/linux32_socket.c: revision 1.28
	sys/net/if.c: revision 1.400
	sys/netipsec/key.c: revision 1.243
	sys/compat/linux/common/linux_socket.c: revision 1.139
	sys/netinet/ip_carp.c: revision 1.93
	sys/netinet6/in6.c: revision 1.252
	sys/netinet6/in6.c: revision 1.253
	sys/netinet6/in6.c: revision 1.254
	sys/net/if_spppsubr.c: revision 1.173
	sys/net/if_spppsubr.c: revision 1.174
	sys/compat/common/uipc_syscalls_40.c: revision 1.14
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref
Fix usage of FOREACH macro
key_sad.lock is held there so SAVLIST_WRITER_FOREACH is enough.
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref (more)
Fix and make consistent of usages of psz/psref in ifconf variants
Remove unnecessary goto because there is no cleanup code to share (NFC)
Tweak a condition; we don't need to care ifacount to be negative
Fix a race condition of in6_ifinit
in6_ifinit checks the number of IPv6 addresses on a given interface and
if it's zero (i.e., an IPv6 address being assigned to the interface
is the first one), call if_addr_init. However, the actual assignment of
the address (ifa_insert) is out of in6_ifinit. The check and the
assignment must be done atomically.
Fix it by holding in6_ifaddr_lock during in6_ifinit and ifa_insert.
And also add missing pserialize to IFADDR_READER_FOREACH.

Revision 1.254 / (download) - annotate - [select for diffs], Thu Nov 23 07:09:20 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.253: +17 -9 lines
Diff to previous 1.253 (colored)

Fix a race condition of in6_ifinit

in6_ifinit checks the number of IPv6 addresses on a given interface and
if it's zero (i.e., an IPv6 address being assigned to the interface
is the first one), call if_addr_init. However, the actual assignment of
the address (ifa_insert) is out of in6_ifinit. The check and the
assignment must be done atomically.

Fix it by holding in6_ifaddr_lock during in6_ifinit and ifa_insert.
And also add missing pserialize to IFADDR_READER_FOREACH.

Revision 1.253 / (download) - annotate - [select for diffs], Thu Nov 23 07:06:14 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored)

Tweak a condition; we don't need to care ifacount to be negative

Revision 1.252 / (download) - annotate - [select for diffs], Thu Nov 23 07:05:02 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.251: +4 -5 lines
Diff to previous 1.251 (colored)

Remove unnecessary goto because there is no cleanup code to share (NFC)

Revision 1.245.2.2 / (download) - annotate - [select for diffs], Fri Nov 17 20:24:05 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.245.2.1: +6 -17 lines
Diff to previous 1.245.2.1 (colored) to branchpoint 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #353):
	sys/net/if_llatbl.c: 1.22
	sys/net/if_llatbl.h: 1.13
	sys/netinet/if_arp.c: 1.254
	sys/netinet/in.c: 1.208-1.209
	sys/netinet6/in6.c: 1.249-1.250
	sys/netinet6/nd6.c: 1.237
Remove redundant KASSERTMSG
The function is static, has just one caller and the caller does the same check.
--
Fix a deadlock between a route update and lltable
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.
If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.
A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update
Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.
Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.251 / (download) - annotate - [select for diffs], Fri Nov 17 07:37:12 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.250: +6 -14 lines
Diff to previous 1.250 (colored)

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

Revision 1.250 / (download) - annotate - [select for diffs], Fri Nov 10 07:24:28 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.249: +6 -14 lines
Diff to previous 1.249 (colored)

Fix a deadlock between a route update and lltable

It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.

If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.

A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update

Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.

Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.249 / (download) - annotate - [select for diffs], Fri Nov 10 07:15:32 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.248: +2 -5 lines
Diff to previous 1.248 (colored)

Remove redundant KASSERTMSG

The function is static, has just one caller and the caller does the same check.

Revision 1.179.2.12 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:12 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.11: +293 -221 lines
Diff to previous 1.179.2.11 (colored) to branchpoint 1.179 (colored) next main 1.180 (colored)

Sync with HEAD

Revision 1.245.2.1 / (download) - annotate - [select for diffs], Fri Jul 7 13:57:26 2017 UTC (6 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.245: +15 -10 lines
Diff to previous 1.245 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #107):
	usr.sbin/arp/arp.c: revision 1.56
	sys/net/rtsock.c: revision 1.218
	sys/net/if_llatbl.c: revision 1.20
	usr.sbin/arp/arp.c: revision 1.57
	sys/net/rtsock.c: revision 1.219
	sys/net/if_llatbl.c: revision 1.21
	usr.sbin/arp/arp.c: revision 1.58
	tests/net/net_common.sh: revision 1.19
	sys/netinet6/nd6.h: revision 1.84
	sys/netinet6/nd6.h: revision 1.85
	tests/net/arp/t_arp.sh: revision 1.23
	sys/netinet6/in6.c: revision 1.246
	tests/net/arp/t_arp.sh: revision 1.24
	sys/netinet6/in6.c: revision 1.247
	tests/net/arp/t_arp.sh: revision 1.25
	sys/netinet6/in6.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.26
	usr.sbin/ndp/ndp.c: revision 1.49
	tests/net/arp/t_arp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.20
	tests/net/arp/t_arp.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.21
	tests/net/arp/t_arp.sh: revision 1.29
	tests/net/ndp/t_ndp.sh: revision 1.22
	tests/net/ndp/t_ndp.sh: revision 1.23
	tests/net/route/t_flags6.sh: revision 1.13
	tests/net/ndp/t_ndp.sh: revision 1.24
	tests/net/route/t_flags6.sh: revision 1.14
	tests/net/ndp/t_ndp.sh: revision 1.25
	tests/net/route/t_flags6.sh: revision 1.15
	tests/net/ndp/t_ndp.sh: revision 1.26
	sbin/route/rtutil.c: revision 1.9
	tests/net/ndp/t_ndp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.28
	tests/net/net/t_ipv6address.sh: revision 1.14
	tests/net/ndp/t_ra.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.29
	sys/net/route.h: revision 1.113
	tests/net/ndp/t_ra.sh: revision 1.29
	sys/net/rtsock.c: revision 1.220
	sys/net/rtsock.c: revision 1.221
	sys/net/rtsock.c: revision 1.222
	sys/net/rtsock.c: revision 1.223
	tests/net/route/t_route.sh: revision 1.13
	sys/net/rtsock.c: revision 1.224
	sys/net/route.c: revision 1.196
	sys/net/if_llatbl.c: revision 1.19
	sys/net/route.c: revision 1.197
	sbin/route/route.c: revision 1.156
	tests/net/route/t_flags.sh: revision 1.16
	tests/net/route/t_flags.sh: revision 1.17
	usr.sbin/ndp/ndp.c: revision 1.50
	tests/net/route/t_flags.sh: revision 1.18
	sys/netinet/in.c: revision 1.204
	tests/net/route/t_flags.sh: revision 1.19
	sys/netinet/in.c: revision 1.205
	tests/net/arp/t_arp.sh: revision 1.30
	tests/net/arp/t_arp.sh: revision 1.31
	sys/net/if_llatbl.h: revision 1.11
	tests/net/arp/t_arp.sh: revision 1.32
	sys/net/if_llatbl.h: revision 1.12
	tests/net/arp/t_arp.sh: revision 1.33
	sys/netinet6/nd6.c: revision 1.233
	sys/netinet6/nd6.c: revision 1.234
	sys/netinet/if_arp.c: revision 1.251
	sys/netinet6/nd6.c: revision 1.235
	sys/netinet/if_arp.c: revision 1.252
	sbin/route/route.8: revision 1.57
	sys/net/rtsock.c: revision 1.214
	sys/net/rtsock.c: revision 1.215
	sys/net/rtsock.c: revision 1.216
	sys/net/rtsock.c: revision 1.217
whitespace police
Simplify
We can assume that rt_ifp is always non-NULL.
Sending a routing message (RTM_ADD) on adding an llentry
A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.
Requested by ryo@
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries
ARP/NDP entries aren't connected routes.
Reported by ryo@
Support -c <count> option for route monitor
route command exits if it receives <count> routing messages where
<count> is a value specified by -c.
The option is useful to get only particular message(s) in a test script.
Test routing messages emitted on operations of ARP/NDP entries
Do netstat -a for an appropriate protocol
Add missing declarations for cleanup
Set net.inet.arp.keep only if it's required
Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
Fix typo
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
Remove unused function (nd6_rem_ifa_lle)
Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry
This behavior is a bit odd and should be fixed in the future...
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
Fix build of kernels without both INET and INET6
Tweak lltable_sysctl_dumparp
- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6
Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
Fix ifdef; care about a case w/ INET6 and w/o INET
Drop RTF_UP from a routing message of a deleted ARP/NDP entry
Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
Fix wrong comment
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
Check if ARP/NDP entries are purged when a related route is deleted

Revision 1.248 / (download) - annotate - [select for diffs], Thu Jun 22 09:53:25 2017 UTC (6 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.247: +3 -2 lines
Diff to previous 1.247 (colored)

Purge ARP/NDP entries on an interface when the interface is down

Fix PR kern/51179

Revision 1.247 / (download) - annotate - [select for diffs], Thu Jun 22 09:29:23 2017 UTC (6 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.246: +9 -6 lines
Diff to previous 1.246 (colored)

Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry

This behavior is a bit odd and should be fixed in the future...

Revision 1.246 / (download) - annotate - [select for diffs], Wed Jun 21 09:05:31 2017 UTC (6 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.245: +7 -6 lines
Diff to previous 1.245 (colored)

Don't create a permanent L2 cache entry on adding an address to an interface

It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).

Revision 1.244.4.1 / (download) - annotate - [select for diffs], Tue May 2 03:19:22 2017 UTC (6 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.244: +17 -5 lines
Diff to previous 1.244 (colored) next main 1.245 (colored)

Sync with HEAD - tag prg-localcount2-base1

Revision 1.245 / (download) - annotate - [select for diffs], Fri Apr 28 05:56:33 2017 UTC (6 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, netbsd-8-base
Branch point for: netbsd-8
Changes since 1.244: +17 -5 lines
Diff to previous 1.244 (colored)

Don't output debugging logs just if DIAGNOSTIC

Also make log messages informative.

Revision 1.233.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:06 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.233: +283 -237 lines
Diff to previous 1.233 (colored) next main 1.234 (colored)

Sync with HEAD

Revision 1.208.2.5 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:51 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.208.2.4: +321 -253 lines
Diff to previous 1.208.2.4 (colored) to branchpoint 1.208 (colored) next main 1.209 (colored)

Sync with HEAD

Revision 1.244 / (download) - annotate - [select for diffs], Thu Mar 2 09:48:20 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2
Changes since 1.243: +4 -3 lines
Diff to previous 1.243 (colored)

Plug a race condition on accessing i6mm_maddr

Revision 1.243 / (download) - annotate - [select for diffs], Thu Mar 2 09:16:46 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.242: +36 -18 lines
Diff to previous 1.242 (colored)

Fix racy in6m_sol

Relook up the entry instead of reusing it, which makes locking simple.

Revision 1.242 / (download) - annotate - [select for diffs], Thu Mar 2 05:27:39 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.241: +31 -2 lines
Diff to previous 1.241 (colored)

Protect ia6_memberships by in6_ifaddr_lock

Revision 1.241 / (download) - annotate - [select for diffs], Wed Mar 1 03:02:35 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.240: +8 -2 lines
Diff to previous 1.240 (colored)

Restore/add some softnet_lock for nd6_rt_flush and defrouter_addreq

May help PR kern/52015

Revision 1.240 / (download) - annotate - [select for diffs], Tue Feb 28 04:07:11 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.239: +203 -188 lines
Diff to previous 1.239 (colored)

Separate the code of joining multicast groups

No functional change.

Revision 1.239 / (download) - annotate - [select for diffs], Tue Feb 28 02:56:49 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.238: +10 -4 lines
Diff to previous 1.238 (colored)

Prevent ia6 from being freed in in6_ifinit

It fixes a panic (diagnostic assertion "entry->ple_prevp != NULL" failed)
on:
  ifconfig lo1 create
  ifconfig lo1 127.0.0.2
reported by ryo@

Revision 1.238 / (download) - annotate - [select for diffs], Thu Feb 23 07:57:10 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.237: +2 -22 lines
Diff to previous 1.237 (colored)

Remove mkludge stuffs

For unknown reasons, IPv6 multicast addresses are linked to a first
IPv6 address assigned to an interface. Due to the design, when removing
a first address having multicast addresses, we need to save them to
somewhere and later restore them once a new IPv6 address is activated.
mkludge stuffs support the operations.

This change links multicast addresses to an interface directly and
throws the kludge away.

Note that as usual some obsolete member variables remain for kvm(3)
users. And also sysctl net.inet6.multicast_kludge remains to avoid
breaking old ifmcstat.

TODO: currently ifnet has a list of in6_multi but obviously the list
should be protocol independent. Provide a common structure (if_multi
or something) to handle in6_multi and in_multi together as well as
ifaddr does for in_ifaddr and in6_ifaddr.

Revision 1.179.2.11 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:59 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.10: +94 -76 lines
Diff to previous 1.179.2.10 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.237 / (download) - annotate - [select for diffs], Mon Jan 23 10:19:03 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.236: +8 -8 lines
Diff to previous 1.236 (colored)

Replace some splnet with splsoftnet

Revision 1.236 / (download) - annotate - [select for diffs], Mon Jan 16 15:44:47 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.235: +11 -22 lines
Diff to previous 1.235 (colored)

ip6_sprintf -> IN6_PRINT so that we pass the size.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Jan 16 08:26:30 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.234: +2 -4 lines
Diff to previous 1.234 (colored)

Remove KASSERT (revert in6.c,v 1.232)

We don't need it (it's harmless though).

Revision 1.234 / (download) - annotate - [select for diffs], Mon Jan 16 07:33:36 2017 UTC (7 years, 1 month ago) by ryo
Branch: MAIN
Changes since 1.233: +22 -18 lines
Diff to previous 1.233 (colored)

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

Reviewed by ozaki-r@

Revision 1.233 / (download) - annotate - [select for diffs], Thu Jan 12 04:43:59 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.232: +9 -5 lines
Diff to previous 1.232 (colored)

Prevent in6_ifaddr from being freed with holding its psref

This is a possible fix for PR kern/51828.

Revision 1.232 / (download) - annotate - [select for diffs], Wed Jan 11 18:25:46 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.231: +4 -2 lines
Diff to previous 1.231 (colored)

Add KASSERT.

Revision 1.231 / (download) - annotate - [select for diffs], Tue Jan 10 05:42:34 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.230: +4 -2 lines
Diff to previous 1.230 (colored)

Enable some sysctl knobs on rump kernels for ifmcstat

Revision 1.208.2.4 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.208.2.3: +72 -158 lines
Diff to previous 1.208.2.3 (colored) to branchpoint 1.208 (colored)

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

Revision 1.230 / (download) - annotate - [select for diffs], Wed Jan 4 19:37:14 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.229: +18 -10 lines
Diff to previous 1.229 (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.229 / (download) - annotate - [select for diffs], Tue Jan 3 15:14:31 2017 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.228: +6 -7 lines
Diff to previous 1.228 (colored)

simplify, and call the hooks after the address has been deleted like we did
for the ipv4 case.

Revision 1.228 / (download) - annotate - [select for diffs], Sat Dec 31 09:41:05 2016 UTC (7 years, 1 month ago) by ryo
Branch: MAIN
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

In the case of SIOCDIFADDR, call pfil_run_addrhooks before release ia.

Revision 1.227 / (download) - annotate - [select for diffs], Tue Dec 27 10:53:12 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.226: +4 -5 lines
Diff to previous 1.226 (colored)

Fix panic in pfil_run_hooks on bootup

XXX a kernel with pf still fails to boot up. Please someone fix it.

Revision 1.226 / (download) - annotate - [select for diffs], Wed Dec 21 08:47:02 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.225: +23 -9 lines
Diff to previous 1.225 (colored)

Fix deadlock between llentry timers and destruction of llentry

llentry timer (of nd6) holds both llentry's lock and softnet_lock.
A caller also holds them and calls callout_halt to wait for the
timer to quit. However we can pass only one lock to callout_halt,
so passing either of them can cause a deadlock. Fix it by avoid
calling callout_halt without holding llentry's lock.

BTW in the first place we cannot pass llentry's lock to callout_halt
because it's a rwlock...

Revision 1.225 / (download) - annotate - [select for diffs], Mon Dec 19 07:51:34 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.224: +11 -16 lines
Diff to previous 1.224 (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.224 / (download) - annotate - [select for diffs], Mon Dec 12 03:55:57 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.223: +13 -9 lines
Diff to previous 1.223 (colored)

Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

We protect the routing table with a rwock and protect
rtcaches with another rwlock. Each rtentry is protected
from being freed or updated via reference counting and psref.

Global rwlocks
--------------

There are two rwlocks; one for the routing table (rt_lock) and
the other for rtcaches (rtcache_lock). rtcache_lock covers
all existing rtcaches; there may have room for optimizations
(future work).

The locking order is rtcache_lock first and rt_lock is next.

rtentry references
------------------

References to an rtentry is managed with reference counting
and psref. Either of the two mechanisms is used depending on
where a rtentry is obtained. Reference counting is used when
we obtain a rtentry from the routing table directly via
rtalloc1 and rtrequest{,1} while psref is used when we obtain
a rtentry from a rtcache via rtcache_* APIs. In both cases,
a caller can sleep/block with holding an obtained rtentry.

The reasons why we use two different mechanisms are (i) only
using reference counting hurts the performance due to atomic
instructions (rtcache case) (ii) ease of implementation;
applying psref to APIs such rtaloc1 and rtrequest{,1} requires
additional works (adding a local variable and an argument).

We will finally migrate to use only psref but we can do it
when we have a lockless routing table alternative.

Reference counting for rtentry
------------------------------

rt_refcnt now doesn't count permanent references such as for
rt_timers and rtcaches, instead it is used only for temporal
references when obtaining a rtentry via rtalloc1 and rtrequest{,1}.
We can do so because destroying a rtentry always involves
removing references of rt_timers and rtcaches to the rtentry
and we don't need to track such references. This also makes
it easy to wait for readers to release references on deleting
or updating a rtentry, i.e., we can simply wait until the
reference counter is 0 or 1. (If there are permanent references
the counter can be arbitrary.)

rt_ref increments a reference counter of a rtentry and rt_unref
decrements it. rt_ref is called inside APIs (rtalloc1 and
rtrequest{,1} so users don't need to care about it while
users must call rt_unref to an obtained rtentry after using it.

rtfree is removed and we use rt_unref and rt_free instead.
rt_unref now just decrements the counter of a given rtentry
and rt_free just tries to destroy a given rtentry.

See the next section for destructions of rtentries by rt_free.

Destructions of rtentries
-------------------------

We destroy a rtentry only when we call rtrequst{,1}(RTM_DELETE);
the original implementation can destroy in any rtfree where it's
the last reference. If we use reference counting or psref, it's
easy to understand if the place that a rtentry is destroyed is
fixed.

rt_free waits for references to a given rtentry to be released
before actually destroying the rtentry. rt_free uses a condition
variable (cv_wait) (and psref_target_destroy for psref) to wait.

Unfortunately rtrequst{,1}(RTM_DELETE) can be called in softint
that we cannot use cv_wait. In that case, we have to defer the
destruction to a workqueue.

rtentry#rt_cv, rtentry#rt_psref and global variables
(see rt_free_global) are added to conduct the procedure.

Updates of rtentries
--------------------

One difficulty to use refcnt/psref instead of rwlock for rtentry
is updates of rtentries. We need an additional mechanism to
prevent readers from seeing inconsistency of a rtentry being
updated.

We introduce RTF_UPDATING flag to rtentries that are updating.
While the flag is set to a rtentry, users cannot acquire the
rtentry. By doing so, we avoid users to see inconsistent
rtentries.

There are two options when a user tries to acquire a rtentry
with the RTF_UPDATING flag; if a user runs in softint context
the user fails to acquire a rtentry (NULL is returned).
Otherwise a user waits until the update completes by waiting
on cv.

The procedure of a updater is simpler to destruction of
a rtentry. Wait on cv (and psref) and after all readers left,
proceed with the update.

Global variables (see rt_update_global) are added to conduct
the procedure.

Currently we apply the mechanism to only RTM_CHANGE in
rtsock.c. We would have to apply other codes. See
"Known issues" section.

psref for rtentry
-----------------

When we obtain a rtentry from a rtcache via rtcache_* APIs,
psref is used to reference to the rtentry.

rtcache_ref acquires a reference to a rtentry with psref
and rtcache_unref releases the reference after using it.
rtcache_ref is called inside rtcache_* APIs and users don't
need to take care of it while users must call rtcache_unref
to release the reference.

struct psref and int bound that is needed for psref is
embedded into struct route. By doing so we don't need to
add local variables and additional argument to APIs.

However this adds another constraint to psref other than
reference counting one's; holding a reference of an rtentry
via a rtcache is allowed by just one caller at the same time.
So we must not acquire a rtentry via a rtcache twice and
avoid a recursive use of a rtcache. And also a rtcache must
be arranged to be used by a LWP/softint at the same time
somehow. For IP forwarding case, we have per-CPU rtcaches
used in softint so the constraint is guaranteed. For a h
rtcache of a PCB case, the constraint is guaranteed by the
solock of each PCB. Any other cases (pf, ipf, stf and ipsec)
are currently guaranteed by only the existence of the global
locks (softnet_lock and/or KERNEL_LOCK). If we've found the
cases that we cannot guarantee the constraint, we would need
to introduce other rtcache APIs that use simple reference
counting.

psref of rtcache is created with IPL_SOFTNET and so rtcache
shouldn't used at an IPL higher than IPL_SOFTNET.

Note that rtcache_free is used to invalidate a given rtcache.
We don't need another care by my change; just keep them as
they are.

Performance impact
------------------

When NET_MPSAFE is disabled the performance drop is 3% while
when it's enabled the drop is increased to 11%. The difference
comes from that currently we don't take any global locks and
don't use psref if NET_MPSAFE is disabled.

We can optimize the performance of the case of NET_MPSAFE
on by reducing lookups of rtcache that uses psref;
currently we do two lookups but we should be able to trim
one of two. This is a future work.

Known issues
------------

There are two known issues to be solved; one is that
a caller of rtrequest(RTM_ADD) may change rtentry (see rtinit).
We need to prevent new references during the update. Or
we may be able to remove the code (perhaps, need more
investigations).

The other is rtredirect that updates a rtentry. We need
to apply our update mechanism, however it's not easy because
rtredirect is called in softint and we cannot apply our
mechanism simply. One solution is to defer rtredirect to
a workqueue but it requires some code restructuring.

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

Add nd6_ prefix to exported functions

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

Sync with HEAD

Revision 1.222 / (download) - annotate - [select for diffs], Fri Nov 18 06:50:04 2016 UTC (7 years, 3 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.221: +6 -2 lines
Diff to previous 1.221 (colored)

fix: "ifconfig destory" can stalls when "ifconfig" is done parallel.
This problem occurs only if NET_MPSAFE on.

ifconfig destroy side:
    kernel entry point is ifioctl => if_clone_destroy.
    pr_purgeif() acquires softnet_lock, and then ifa_remove() calls
    pserialize_perform() holding softnet_lock.
ifconfig side:
    kernel entry point is socreate.
    pr_attach()(udp_attach_wrapper()) calls sosetlock(). In this call path,
    sosetlock() try to acquire softnet_lock.
These can cause dead lock.

Revision 1.208.2.3 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:21 2016 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.208.2.2: +7 -2 lines
Diff to previous 1.208.2.2 (colored) to branchpoint 1.208 (colored)

Sync with HEAD

Revision 1.221 / (download) - annotate - [select for diffs], Tue Oct 18 07:30:31 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.220: +7 -2 lines
Diff to previous 1.220 (colored)

Don't hold global locks if NET_MPSAFE is enabled

If NET_MPSAFE is enabled, don't hold KERNEL_LOCK and softnet_lock in
part of the network stack such as IP forwarding paths. The aim of the
change is to make it easy to test the network stack without the locks
and reduce our local diffs.

By default (i.e., if NET_MPSAFE isn't enabled), the locks are held
as they used to be.

Reviewed by knakahara@

Revision 1.179.2.9 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:09 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.8: +323 -245 lines
Diff to previous 1.179.2.8 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.220 / (download) - annotate - [select for diffs], Tue Sep 13 15:57:50 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.219: +2 -3 lines
Diff to previous 1.219 (colored)

revert previous, roy says it breaks DaD.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Sep 13 15:41:34 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.218: +3 -2 lines
Diff to previous 1.218 (colored)

When initializing addresses, reset the interface flags to 0. This fixes
an issue where point to point addresses that started down, and then came
up, were left with stale flags on one side of the point to point link.

Revision 1.218 / (download) - annotate - [select for diffs], Fri Sep 2 15:57:54 2016 UTC (7 years, 5 months ago) by roy
Branch: MAIN
Changes since 1.217: +4 -8 lines
Diff to previous 1.217 (colored)

This comment no longer applies.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Aug 18 09:34:43 2016 UTC (7 years, 6 months ago) by roy
Branch: MAIN
Changes since 1.216: +2 -7 lines
Diff to previous 1.216 (colored)

Revert part of the prior patch so loopback lladdr gets a working prefix route.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Aug 16 10:31:57 2016 UTC (7 years, 6 months ago) by roy
Branch: MAIN
Changes since 1.215: +132 -178 lines
Diff to previous 1.215 (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.208.2.2 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:10 2016 UTC (7 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.208.2.1: +191 -59 lines
Diff to previous 1.208.2.1 (colored) to branchpoint 1.208 (colored)

Sync with HEAD

Revision 1.215 / (download) - annotate - [select for diffs], Fri Aug 5 00:51:14 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.214: +4 -6 lines
Diff to previous 1.214 (colored)

CID 1364757: remove unnecessary branching

Revision 1.214 / (download) - annotate - [select for diffs], Mon Aug 1 04:37:53 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.213: +3 -3 lines
Diff to previous 1.213 (colored)

Fix kernel builds (gcc 4.8)

Revision 1.213 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:31 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.212: +188 -56 lines
Diff to previous 1.212 (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.212 / (download) - annotate - [select for diffs], Thu Jul 28 09:03:50 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.211: +4 -2 lines
Diff to previous 1.211 (colored)

Fix panic on adding/deleting IP addresses under network load

Adding and deleting IP addresses aren't serialized with other network
opeartions, e.g., forwarding packets. So if we add or delete an IP
address under network load, a kernel panic may happen on manipulating
network-related shared objects such as rtentry and rtcache.

To avoid such panicks, we still need to hold softnet_lock in in_control
and in6_control that are called via ioctl and do network-related operations
including IP address additions/deletions.

Fix PR kern/51356

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

Sync with HEAD

Revision 1.211 / (download) - annotate - [select for diffs], Wed Jul 20 07:56:10 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.210: +2 -3 lines
Diff to previous 1.210 (colored)

Get rid of extra ifafree

It was wrongly imported from FreeBSD.

Revision 1.210 / (download) - annotate - [select for diffs], Wed Jul 20 07:37:51 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.209: +14 -4 lines
Diff to previous 1.209 (colored)

Apply pserialize to some iterations of IP address lists

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

Use sin6tosa and sin6tocsa macros

No functional change.

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

Sync with HEAD

Revision 1.208 / (download) - annotate - [select for diffs], Fri Jul 8 06:18:29 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.207: +4 -12 lines
Diff to previous 1.207 (colored)

CID 1363345: remove unreachable code and cleanup returns

Revision 1.207 / (download) - annotate - [select for diffs], Thu Jul 7 09:32:03 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.206: +10 -10 lines
Diff to previous 1.206 (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.206 / (download) - annotate - [select for diffs], Wed Jul 6 10:49:49 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.205: +11 -2 lines
Diff to previous 1.205 (colored)

Move in6_ifaddr_list to a more proper place (from ip6_input.c to in6.c)

It's a similar place as the IPv4 address list, i.e., in.c.

More varibles will join together.

Revision 1.205 / (download) - annotate - [select for diffs], Wed Jul 6 07:52:53 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.204: +4 -2 lines
Diff to previous 1.204 (colored)

Add missing IN6_ADDRLIST_ENTRY_DESTROY

Revision 1.204 / (download) - annotate - [select for diffs], Mon Jul 4 06:48:14 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.203: +21 -37 lines
Diff to previous 1.203 (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.203 / (download) - annotate - [select for diffs], Mon Jul 4 02:41:18 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.202: +2 -3 lines
Diff to previous 1.202 (colored)

Remove redundant codes purging IPv6 addresses

Proposed on tech-net and tech-kern.

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jun 30 01:34:53 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.201: +26 -17 lines
Diff to previous 1.201 (colored)

Make sure that ifaddr is published after its initialization finished

Basically we should insert an item to a collection (say a list) after
item's initialization has been completed to avoid accessing an item
that is initialized halfway. ifaddr (in{,6}_ifaddr) isn't processed
like so and needs to be fixed.

In order to do so, we need to tweak {arp,nd6}_rtrequest that depend
on that an ifaddr is inserted during its initialization; they explore
interface's address list to determine that rt_getkey(rt) of a given
rtentry is in the list to know whether the route's interface should
be a loopback, which doesn't work after the change. To make it work,
first check RTF_LOCAL flag that is set in rt_ifa_addlocal that calls
{arp,nd6}_rtrequest eventually. Note that we still need the original
code for the case to remove and re-add a local interface route.

Revision 1.201 / (download) - annotate - [select for diffs], Tue Jun 28 02:36:54 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

Introduce if_is_deactivated

Checking ifp->if_output == if_nulloutput is too implicit.

No functional change.

Revision 1.200 / (download) - annotate - [select for diffs], Wed Jun 22 07:48:17 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.199: +2 -8 lines
Diff to previous 1.199 (colored)

Remove unnecessary NULL checks of ifa->ifa_addr

If it's NULL, it should be a bug. There many IFADDR_FOREACH that don't do
NULL check. If it can be NULL, they should fire already.

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

Sync with HEAD

Revision 1.199 / (download) - annotate - [select for diffs], Thu May 12 02:24:17 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.198: +6 -3 lines
Diff to previous 1.198 (colored)

Protect ifnet list with psz and psref

The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.

Revision 1.179.2.6 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:18 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.5: +62 -50 lines
Diff to previous 1.179.2.5 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.198 / (download) - annotate - [select for diffs], Mon Apr 4 07:37:07 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.197: +35 -17 lines
Diff to previous 1.197 (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.197 / (download) - annotate - [select for diffs], Fri Apr 1 08:12:00 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.196: +34 -40 lines
Diff to previous 1.196 (colored)

Refine nd6log

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

Revision 1.196 / (download) - annotate - [select for diffs], Fri Apr 1 06:25:51 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.195: +25 -25 lines
Diff to previous 1.195 (colored)

Use __func__ in log messages

Revision 1.179.2.5 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:33 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.4: +16 -6 lines
Diff to previous 1.179.2.4 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Mon Feb 15 14:59:03 2016 UTC (8 years ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.194: +16 -6 lines
Diff to previous 1.194 (colored)

Reduce code duplication.

Split creation of IPv4-Mapped IPv6 addresses into its own function
and use it.

No functional change intended.  As posted to tech-net@

Revision 1.179.2.4 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:07 2015 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.3: +328 -4 lines
Diff to previous 1.179.2.3 (colored) to branchpoint 1.179 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.194 / (download) - annotate - [select for diffs], Sat Dec 12 23:34:25 2015 UTC (8 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.193: +10 -2 lines
Diff to previous 1.193 (colored)

Hook up the addrctl stuff that's already there.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Nov 27 02:54:22 2015 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

Replace __debugused with __diagused

Declaring __debugused was just a mistake. This fixes builds of kernels with
DEBUG but without DIAGNOSTIC.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Nov 25 07:06:19 2015 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored)

Declare __debugused for no DIAGNOSTIC kernels

This unbreaks hpcsh GENERIC kernel build.

Revision 1.191 / (download) - annotate - [select for diffs], Wed Nov 25 06:21:26 2015 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.190: +320 -4 lines
Diff to previous 1.190 (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.179.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.2: +26 -7 lines
Diff to previous 1.179.2.2 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.190 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:27 2015 UTC (8 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.189: +4 -2 lines
Diff to previous 1.189 (colored)

sprinkle _KERNEL_OPT

Revision 1.189 / (download) - annotate - [select for diffs], Fri Aug 7 08:11:33 2015 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.188: +24 -7 lines
Diff to previous 1.188 (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.179.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (8 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179.2.1: +21 -38 lines
Diff to previous 1.179.2.1 (colored) to branchpoint 1.179 (colored)

Sync with HEAD

Revision 1.188 / (download) - annotate - [select for diffs], Wed Apr 22 19:46:08 2015 UTC (8 years, 10 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.187: +16 -2 lines
Diff to previous 1.187 (colored)

Move INET6 specific in6_if_{up,down}() and in6_if_link_{up,down}()
into agnostic domain functions.

Revision 1.187 / (download) - annotate - [select for diffs], Mon Apr 20 10:19:54 2015 UTC (8 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.186: +5 -3 lines
Diff to previous 1.186 (colored)

Introduce p2p_rtrequest() so that IFF_POINTOPOINT interfaces can work
with RTF_LOCAL.
Fixes PR kern/49829.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Apr 7 23:30:36 2015 UTC (8 years, 10 months ago) by roy
Branch: MAIN
Changes since 1.185: +5 -38 lines
Diff to previous 1.185 (colored)

Move in6if_do_dad() to if_do_dad() as the routine is not INET6 specific
and could equally be used by INET.

Revision 1.179.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:23 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.179: +34 -185 lines
Diff to previous 1.179 (colored)

Sync with HEAD

Revision 1.174.2.2 / (download) - annotate - [select for diffs], Mon Apr 6 01:32:33 2015 UTC (8 years, 10 months ago) by snj
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-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.174.2.1: +3 -3 lines
Diff to previous 1.174.2.1 (colored) to branchpoint 1.174 (colored) next main 1.175 (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.185 / (download) - annotate - [select for diffs], Thu Feb 26 12:58:36 2015 UTC (9 years ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.184: +10 -2 lines
Diff to previous 1.184 (colored)

Don't add local routes for the any address or p2p addresses where the address matches the destination.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Feb 26 09:54:46 2015 UTC (9 years ago) by roy
Branch: MAIN
Changes since 1.183: +15 -108 lines
Diff to previous 1.183 (colored)

Introduce the routing flag RTF_LOCAL to track local address routes.
Add functions rt_ifa_addlocal() and rt_ifa_remlocal() to add and remove
local routes for the address and announce the new address and route
to the routing socket.

Add in_ifaddlocal() and in_ifremlocal() to use these functions.
Rename in6_if{add,rem}loop() to in6_if{add,rem}local() and use these
functions.

rtinit() no longer announces the address, just the network route for the
address. As such, calls to rt_newaddrmsg() have been removed from
in_addprefix() and in_scrubprefix().

This solves the problem of potentially more than one announcement, or no
announcement at all for the address in certain situations.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Feb 25 00:26:58 2015 UTC (9 years ago) by roy
Branch: MAIN
Changes since 1.182: +6 -20 lines
Diff to previous 1.182 (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.182 / (download) - annotate - [select for diffs], Mon Feb 23 19:15:59 2015 UTC (9 years ago) by martin
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (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.181 / (download) - annotate - [select for diffs], Fri Feb 20 22:13:48 2015 UTC (9 years ago) by rjs
Branch: MAIN
Changes since 1.180: +3 -3 lines
Diff to previous 1.180 (colored)

Declare input argument to in6_sin_2_v4mapsin6 to be const, allows an
address from the route cache to be used as the input.

ok christos@.

Revision 1.180 / (download) - annotate - [select for diffs], Tue Dec 2 19:36:58 2014 UTC (9 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.179: +8 -60 lines
Diff to previous 1.179 (colored)

add routines to print in6_addr and sockaddr_in6 (in6_print, sin6_print)

Revision 1.179 / (download) - annotate - [select for diffs], Mon Nov 3 13:04:12 2014 UTC (9 years, 3 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.178: +9 -3 lines
Diff to previous 1.178 (colored)

Clear IN6_IFF_DUPLICATED when link goes down or up.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Oct 27 14:10:12 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.177: +8 -2 lines
Diff to previous 1.177 (colored)

print mapped addresses better

Revision 1.174.2.1 / (download) - annotate - [select for diffs], Mon Oct 27 13:42:37 2014 UTC (9 years, 4 months ago) by martin
Branch: netbsd-7
Changes since 1.174: +8 -4 lines
Diff to previous 1.174 (colored)

Pull up following revision(s) (requested by roy in ticket #160):
	sbin/ifconfig/af_inet6.c: revision 1.30
	sbin/ifconfig/ifconfig.8: revision 1.109
	sys/netinet6/in6.c: revision 1.177
Remove the ability for userland to toggle IN6_IFF_TENTATIVE.
Preserve IN6_IFF_TENTATIVE when updating address flags.

Revision 1.177 / (download) - annotate - [select for diffs], Mon Oct 20 14:50:09 2014 UTC (9 years, 4 months ago) by roy
Branch: MAIN
Changes since 1.176: +8 -4 lines
Diff to previous 1.176 (colored)

Remove the ability for userland to toggle IN6_IFF_TENTATIVE.
Preserve IN6_IFF_TENTATIVE when updating address flags.

Revision 1.176 / (download) - annotate - [select for diffs], Tue Sep 9 20:16:12 2014 UTC (9 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.175: +4 -4 lines
Diff to previous 1.175 (colored)

Eliminate IFAREF() and IFAFREE() macros in favour of functions.

Revision 1.175 / (download) - annotate - [select for diffs], Fri Sep 5 06:08:15 2014 UTC (9 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.174: +15 -15 lines
Diff to previous 1.174 (colored)

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

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

Rebase to HEAD as of a few days ago.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:30 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.169: +24 -23 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

Rebase.

Revision 1.174 / (download) - annotate - [select for diffs], Tue Jul 1 23:01:54 2014 UTC (9 years, 7 months ago) by justin
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.173: +5 -5 lines
Diff to previous 1.173 (colored)

On ARM the variable name 'delay' shadows a function here, rename to avoid
-Wshadow objecting.

Revision 1.173 / (download) - annotate - [select for diffs], Tue Jul 1 07:51:29 2014 UTC (9 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.172: +9 -6 lines
Diff to previous 1.172 (colored)

Stop using callout randomly

nd6_dad_start uses callout when xtick > 0 while doesn't when
xtick == 0. So if we pass a random value ranging from 0 to N,
nd6_dad_start uses callout randomly. This behavior makes
debugging difficult.

Discussed in http://mail-index.netbsd.org/tech-kern/2014/06/25/msg017278.html

Revision 1.172 / (download) - annotate - [select for diffs], Tue Jul 1 05:49:19 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.171: +12 -14 lines
Diff to previous 1.171 (colored)

fix parameter types in pr_ioctl, called xx_control() functions and remove
abuse of pointer to struct mbuf type.

param2 changed to u_long type and uses parameter name 'cmd' (ioctl command)
param3 changed to void * type and uses parameter name 'data'
param4 changed to struct ifnet * and uses parameter name 'ifp'
param5 has been removed (formerly struct lwp *) and uses of 'l' have been
       replaced with curlwp from curproc(9).

callers have had (now unnecessary) casts to struct mbuf * removed, called
code has had (now unnecessary) casts to u_long, void * and struct ifnet *
respectively removed.

reviewed by rmind@

Revision 1.171 / (download) - annotate - [select for diffs], Fri Jun 6 01:02:47 2014 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
Changes since 1.170: +6 -6 lines
Diff to previous 1.170 (colored)

- Eliminate RTFREE() macro in favour of rtfree() function.
- Make rtcache() function static.

Revision 1.158.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:10 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.158.2.2: +120 -60 lines
Diff to previous 1.158.2.2 (colored) to branchpoint 1.158 (colored) next main 1.159 (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.165.2.3 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.165.2.2: +4 -33 lines
Diff to previous 1.165.2.2 (colored) next main 1.166 (colored)

sync with head

Revision 1.170 / (download) - annotate - [select for diffs], Sat May 17 20:44:24 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored)

- Move IFNET_*() macros under #ifdef _KERNEL.
- Replace TAILQ_FOREACH on ifnet with IFNET_FOREACH().

Revision 1.169 / (download) - annotate - [select for diffs], Wed Jan 15 10:52:11 2014 UTC (10 years, 1 month ago) by roy
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.168: +2 -4 lines
Diff to previous 1.168 (colored)

Remove dead code.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Jan 13 18:57:48 2014 UTC (10 years, 1 month ago) by roy
Branch: MAIN
Changes since 1.167: +2 -28 lines
Diff to previous 1.167 (colored)

Remove the now un-used function in6ifa_ifplocaladdr.

Revision 1.141.10.1 / (download) - annotate - [select for diffs], Wed Sep 18 03:44:36 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Pull up following revision(s) (requested by spz in ticket #1876):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.141.14.1 / (download) - annotate - [select for diffs], Wed Sep 18 03:42:53 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Pull up following revision(s) (requested by spz in ticket #1876):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.141.4.1 / (download) - annotate - [select for diffs], Wed Sep 18 03:41:45 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored) next main 1.142 (colored)

Pull up following revision(s) (requested by spz in ticket #1876):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.159.8.2 / (download) - annotate - [select for diffs], Wed Sep 18 03:25:47 2013 UTC (10 years, 5 months ago) by msaitoh
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.159.8.1: +4 -2 lines
Diff to previous 1.159.8.1 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored)

Pull up following revision(s) (requested by spz in ticket #944):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.159.10.2 / (download) - annotate - [select for diffs], Wed Sep 18 03:23:56 2013 UTC (10 years, 5 months ago) by msaitoh
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
Changes since 1.159.10.1: +4 -2 lines
Diff to previous 1.159.10.1 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored)

Pull up following revision(s) (requested by spz in ticket #944):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.159.4.2 / (download) - annotate - [select for diffs], Wed Sep 18 03:22:11 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.159.4.1: +4 -2 lines
Diff to previous 1.159.4.1 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored)

Pull up following revision(s) (requested by spz in ticket #944):
	sys/netinet6/in6.c: revision 1.167 via patch
Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.

Revision 1.167 / (download) - annotate - [select for diffs], Wed Sep 11 23:15:47 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.166: +4 -5 lines
Diff to previous 1.166 (colored)

Include BRDADDR and NETMASK to the v4 ioctls we ban for v6; from FreeBSD.
Remove X25 stuff which has been GC'ed.
XXX: pullup-5,6

Revision 1.165.2.2 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:36 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.165.2.1: +5 -13 lines
Diff to previous 1.165.2.1 (colored)

sync with head

Revision 1.165.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (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.159.10.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:56 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-1-RELEASE
Changes since 1.159: +4 -2 lines
Diff to previous 1.159 (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.159.8.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:34 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6-0
Changes since 1.159: +4 -2 lines
Diff to previous 1.159 (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.159.4.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:07 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6
Changes since 1.159: +4 -2 lines
Diff to previous 1.159 (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.166 / (download) - annotate - [select for diffs], Sat Jun 29 21:06:58 2013 UTC (10 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.165: +5 -13 lines
Diff to previous 1.165 (colored)

- Rewrite parts of pfil(9): use array to store hooks and thus be more cache
  friendly (there are only few hooks in the system).  Make the structures
  opaque and the interface more strict.
- Remove PFIL_HOOKS option by making pfil(9) mandatory.

Revision 1.161.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:25 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.161: +115 -18 lines
Diff to previous 1.161 (colored)

resync from head

Revision 1.165 / (download) - annotate - [select for diffs], Thu Jun 20 13:56:29 2013 UTC (10 years, 8 months ago) by roy
Branch: MAIN
Branch point for: rmind-smpnet
Changes since 1.164: +23 -9 lines
Diff to previous 1.164 (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.164 / (download) - annotate - [select for diffs], Tue Jun 11 12:08:29 2013 UTC (10 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.163: +76 -12 lines
Diff to previous 1.163 (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.163 / (download) - annotate - [select for diffs], Wed May 29 12:07:58 2013 UTC (10 years, 9 months ago) by roy
Branch: MAIN
Changes since 1.162: +5 -2 lines
Diff to previous 1.162 (colored)

Generate RTM_NEWADDR when adding a pre-existing IPv6 address.

Revision 1.162 / (download) - annotate - [select for diffs], Tue May 21 08:37:27 2013 UTC (10 years, 9 months ago) by roy
Branch: MAIN
Changes since 1.161: +24 -8 lines
Diff to previous 1.161 (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.158.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:47 2012 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.158.2.1: +4 -2 lines
Diff to previous 1.158.2.1 (colored) to branchpoint 1.158 (colored)

sync with head

Revision 1.161 / (download) - annotate - [select for diffs], Sat Jun 23 03:14:03 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.160: +4 -2 lines
Diff to previous 1.160 (colored)

4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:42 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.158: +12 -8 lines
Diff to previous 1.158 (colored)

sync with head

Revision 1.159.2.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:45 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.159: +6 -4 lines
Diff to previous 1.159 (colored) next main 1.160 (colored)

sync to latest -current.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:59 2012 UTC (11 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.159: +6 -4 lines
Diff to previous 1.159 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:26 2011 UTC (12 years, 3 months ago) by tls
Branch: MAIN
CVS Tags: 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-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6, jmcneill-usbmp
Changes since 1.158: +8 -6 lines
Diff to previous 1.158 (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.158 / (download) - annotate - [select for diffs], Wed Oct 19 01:53:07 2011 UTC (12 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.157: +4 -4 lines
Diff to previous 1.157 (colored)

Use if_addr_init() and if_mcast_op() instead of ifp->if_ioctl().

Revision 1.156.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:58 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.156: +5 -6 lines
Diff to previous 1.156 (colored) next main 1.157 (colored)

Sync with HEAD.

Revision 1.154.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:58 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.154.4.1: +5 -6 lines
Diff to previous 1.154.4.1 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored)

sync with head

Revision 1.156.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:02 2011 UTC (13 years ago) by bouyer
Branch: bouyer-quota2
Changes since 1.156: +5 -6 lines
Diff to previous 1.156 (colored) next main 1.157 (colored)

Sync with HEAD

Revision 1.157 / (download) - annotate - [select for diffs], Sun Feb 6 19:12:55 2011 UTC (13 years ago) by dyoung
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.156: +5 -6 lines
Diff to previous 1.156 (colored)

Delete unnecessary casts to void *. No functional change intended.  Same
assembly generated before and after this change.

Revision 1.140.4.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:57 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.140.4.5: +74 -44 lines
Diff to previous 1.140.4.5 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored)

sync with head.

Revision 1.154.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:03 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.154: +74 -44 lines
Diff to previous 1.154 (colored)

sync with head

Revision 1.154.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:21 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.154: +74 -44 lines
Diff to previous 1.154 (colored) next main 1.155 (colored)

Sync with HEAD.

Revision 1.156 / (download) - annotate - [select for diffs], Thu Apr 22 20:05:15 2010 UTC (13 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.155: +63 -41 lines
Diff to previous 1.155 (colored)

When choosing IPv6 source addresses, respect the ifaddr preference
level such as one might set with 'ifconfig xx0 inet6 <address>
preference <pref>'.  I've been running this for many months without
any problems.

Revision 1.155 / (download) - annotate - [select for diffs], Wed Apr 7 22:59:15 2010 UTC (13 years, 10 months ago) by oki
Branch: MAIN
Changes since 1.154: +13 -5 lines
Diff to previous 1.154 (colored)

ip6_sprintf: compress the zeros of representation of the IPv6 address.
see RFC4291 section 2.2 item 2.

Revision 1.140.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:29 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.140.4.4: +2 -6 lines
Diff to previous 1.140.4.4 (colored) to branchpoint 1.140 (colored)

sync with head

Revision 1.154 / (download) - annotate - [select for diffs], Sat Sep 19 13:11:02 2009 UTC (14 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.153: +2 -6 lines
Diff to previous 1.153 (colored)

backout the changes that establish a workqueue to synchronize the addresses
for arg and gre because they cause a race condition by calling ioctl() during
interface initialization. To make this work correctly we would need to
synchronize all interface init routines.

Revision 1.140.4.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:02 2009 UTC (14 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.140.4.3: +19 -11 lines
Diff to previous 1.140.4.3 (colored) to branchpoint 1.140 (colored)

sync with head

Revision 1.153 / (download) - annotate - [select for diffs], Fri Sep 11 22:06:29 2009 UTC (14 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.152: +19 -11 lines
Diff to previous 1.152 (colored)

Make ifconfig(8) set and display preference numbers for IPv6
addresses.  Make the kernel support SIOC[SG]IFADDRPREF for IPv6
interface addresses.

In in6ifa_ifpforlinklocal(), consult preference numbers before
making an otherwise arbitrary choice of in6_ifaddr.  Otherwise,
preference numbers are *not* consulted by the kernel, but that will
be rather easy for somebody with a little bit of free time to fix.

Please note that setting the preference number for a link-local
IPv6 address does not work right, yet, but that ought to be fixed
soon.

In support of the changes above,

1 Add a method to struct domain for "externalizing" a sockaddr, and
  provide an implementation for IPv6.  Expect more work in this area: it
  may be more proper to say that the IPv6 implementation "internalizes"
  a sockaddr.  Add sockaddr_externalize().

2 Add a subroutine, sofamily(), that returns a struct socket's address
  family or AF_UNSPEC.

3 Make a lot of IPv4-specific code generic, and move it from
  sys/netinet/ to sys/net/ for re-use by IPv6 parts of the kernel and
  ifconfig(8).

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

sync with head.

Revision 1.152 / (download) - annotate - [select for diffs], Thu Aug 13 00:34:04 2009 UTC (14 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.151: +6 -2 lines
Diff to previous 1.151 (colored)

Postpone to a workqueue adding link-local and loopback IPv6 addresses
to an interface.  This keeps the kernel from entering ifp->if_ioctl
recursively, which can deadlock if if_ioctl takes locks.  This will
fix deadlocks & LOCKDEBUG errors in agr(4) (kern/39940) and in
gre(4).

Revision 1.140.4.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:50 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.140.4.1: +29 -15 lines
Diff to previous 1.140.4.1 (colored) to branchpoint 1.140 (colored)

sync with head

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:28 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.146: +58 -44 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

Sync with HEAD.

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

Revision 1.151 / (download) - annotate - [select for diffs], Tue May 12 23:01:26 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, jymxensuspend-base, jym-xensuspend-base
Changes since 1.150: +29 -15 lines
Diff to previous 1.150 (colored)

Remove "privileged" variable, perform the kauth(9) call before we go into
splnet() for the privileged commands. Privileged commands were marked as
such for clarity.

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/05/08/msg001283.html

Revision 1.140.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:18 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.140: +106 -56 lines
Diff to previous 1.140 (colored)

sync with head.

Revision 1.141.2.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:23 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.141.2.2: +31 -31 lines
Diff to previous 1.141.2.2 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with HEAD.

Revision 1.150 / (download) - annotate - [select for diffs], Sat Apr 18 14:58:05 2009 UTC (14 years, 10 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.149: +14 -14 lines
Diff to previous 1.149 (colored)

Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch

Revision 1.149 / (download) - annotate - [select for diffs], Wed Mar 18 17:06:52 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.148: +14 -14 lines
Diff to previous 1.148 (colored)

bcopy -> memcpy

Revision 1.148 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.147: +17 -17 lines
Diff to previous 1.147 (colored)

bzero -> memset

Revision 1.147 / (download) - annotate - [select for diffs], Wed Mar 18 15:14:31 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.146: +4 -4 lines
Diff to previous 1.146 (colored)

bcmp -> memcmp

Revision 1.141.2.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:34:06 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.141.2.1: +11 -11 lines
Diff to previous 1.141.2.1 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Feb 5 22:32:24 2009 UTC (15 years ago) by dyoung
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.145: +11 -11 lines
Diff to previous 1.145 (colored)

Use the in6_ifaddr ia_ifa member instead of casting from from
in6_ifaddr to ifaddr.

Remove unnecessary parentheses.  Do not needlessly cast RTM_ADD to
int.

No functional change intended.

Revision 1.141.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:13 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.141: +43 -18 lines
Diff to previous 1.141 (colored)

Sync with HEAD.

Revision 1.139.12.3 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:33 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.139.12.2: +41 -16 lines
Diff to previous 1.139.12.2 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

Sync with HEAD.

Revision 1.145 / (download) - annotate - [select for diffs], Thu Jan 15 20:32:59 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.144: +16 -2 lines
Diff to previous 1.144 (colored)

Emulate a couple more ioctls. Thanks to Matthias Drochner for pointing them out.

Revision 1.144 / (download) - annotate - [select for diffs], Thu Jan 15 18:20:48 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.143: +20 -2 lines
Diff to previous 1.143 (colored)

- switch the lifetime struct to time_t and provide compatibility for the
  old ioctl.

Revision 1.143 / (download) - annotate - [select for diffs], Fri Dec 19 18:49:39 2008 UTC (15 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.142: +8 -12 lines
Diff to previous 1.142 (colored)

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

Revision 1.140.10.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:27 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.140.10.1: +5 -8 lines
Diff to previous 1.140.10.1 (colored) to branchpoint 1.140 (colored) next main 1.141 (colored)

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

Revision 1.142 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:18 2008 UTC (15 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.141: +5 -8 lines
Diff to previous 1.141 (colored)

*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.

Revision 1.140.10.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:52 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.140: +27 -2 lines
Diff to previous 1.140 (colored)

Sync with HEAD.

Revision 1.91.8.1 / (download) - annotate - [select for diffs], Fri Oct 3 10:46:10 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3-1
Changes since 1.91: +27 -2 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Pull up revisions:
  src/sys/netinet6/in6.c	1.141 via patch
  src/sys/netinet6/in6_var.h	1.59 via patch
  src/sys/netinet6/nd6_nbr.c	1.89-1.90 via patch
(requested by adrianp in ticket #1967).

If a neighbor solictation isn't from the unspecified address, make sure
that the source address matches one of the interfaces address prefixes.

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.91.6.1 / (download) - annotate - [select for diffs], Fri Oct 3 10:44:25 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3-0
Changes since 1.91: +27 -2 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Pull up revisions:
  src/sys/netinet6/in6.c	1.141 via patch
  src/sys/netinet6/in6_var.h	1.59 via patch
  src/sys/netinet6/nd6_nbr.c	1.89-1.90 via patch
(requested by adrianp in ticket #1967).

If a neighbor solictation isn't from the unspecified address, make sure
that the source address matches one of the interfaces address prefixes.

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.91.4.1 / (download) - annotate - [select for diffs], Fri Oct 3 10:43:48 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3
Changes since 1.91: +27 -2 lines
Diff to previous 1.91 (colored) next main 1.92 (colored)

Pull up revisions:
  src/sys/netinet6/in6.c	1.141 via patch
  src/sys/netinet6/in6_var.h	1.59 via patch
  src/sys/netinet6/nd6_nbr.c	1.89-1.90 via patch
(requested by adrianp in ticket #1967).

If a neighbor solictation isn't from the unspecified address, make sure
that the source address matches one of the interfaces address prefixes.

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.119.8.1 / (download) - annotate - [select for diffs], Fri Oct 3 10:32:22 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-4-0
CVS Tags: netbsd-4-0-1-RELEASE
Changes since 1.119: +27 -2 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

Pull up revisions:
  src/sys/netinet6/in6.c	1.141 via patch
  src/sys/netinet6/in6_var.h	1.59 via patch
  src/sys/netinet6/nd6_nbr.c	1.89-1.90 via patch
(requested by adrianp in ticket #1210).

If a neighbor solictation isn't from the unspecified address, make sure
that the source address matches one of the interfaces address prefixes.

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Fri Oct 3 10:31:59 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-4
Changes since 1.119: +27 -2 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

Pull up revisions:
  src/sys/netinet6/in6.c	1.141 via patch
  src/sys/netinet6/in6_var.h	1.59 via patch
  src/sys/netinet6/nd6_nbr.c	1.89-1.90 via patch
(requested by adrianp in ticket #1210).

If a neighbor solictation isn't from the unspecified address, make sure
that the source address matches one of the interfaces address prefixes.

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.139.12.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:59 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.139.12.1: +25 -0 lines
Diff to previous 1.139.12.1 (colored) to branchpoint 1.139 (colored)

Sync with HEAD.

Revision 1.140.6.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:01 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.140: +27 -2 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Jul 31 18:24:07 2008 UTC (15 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, 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, 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-dm-base1
Branch point for: nick-hppapmap, netbsd-5-2, netbsd-5-1, netbsd-5
Changes since 1.140: +27 -2 lines
Diff to previous 1.140 (colored)

Generalize previous fix so that both NS and NA packets are checked.

Revision 1.139.12.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:08 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

Sync with HEAD.

Revision 1.139.8.2 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:24 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.139.8.1: +3 -3 lines
Diff to previous 1.139.8.1 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync with head.

Revision 1.131.6.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:07 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.131.6.2: +3 -3 lines
Diff to previous 1.131.6.2 (colored) to branchpoint 1.131 (colored) next main 1.132 (colored)

sync with HEAD

Revision 1.93.2.8 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:42 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.7: +3 -3 lines
Diff to previous 1.93.2.7 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored)

sync with head.

Revision 1.140 / (download) - annotate - [select for diffs], Wed Feb 27 19:40:56 2008 UTC (16 years ago) by matt
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, yamt-lazymbuf-base15, yamt-lazymbuf-base14, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase, ad-socklock-base1
Branch point for: yamt-nfs-mp, wrstuden-revivesa, haad-dm
Changes since 1.139: +3 -3 lines
Diff to previous 1.139 (colored)

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

Revision 1.139.8.1 / (download) - annotate - [select for diffs], Fri Feb 22 02:53:33 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.139: +100 -4 lines
Diff to previous 1.139 (colored)

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

Revision 1.131.6.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:33 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.131.6.1: +17 -37 lines
Diff to previous 1.131.6.1 (colored) to branchpoint 1.131 (colored)

sync with HEAD

Revision 1.131.4.4 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:37 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.131.4.3: +12 -23 lines
Diff to previous 1.131.4.3 (colored) to branchpoint 1.131 (colored) next main 1.132 (colored)

Sync with HEAD.

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:15 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.134.2.1: +12 -23 lines
Diff to previous 1.134.2.1 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored)

Sync with HEAD.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:57 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.135: +12 -23 lines
Diff to previous 1.135 (colored) next main 1.136 (colored)

Sync with head.

Revision 1.93.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:34 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.6: +12 -23 lines
Diff to previous 1.93.2.6 (colored) to branchpoint 1.93 (colored)

sync with head

Revision 1.139 / (download) - annotate - [select for diffs], Thu Dec 6 00:28:36 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.138: +4 -8 lines
Diff to previous 1.138 (colored)

Use ifa_insert(), ifa_remove().

Revision 1.138 / (download) - annotate - [select for diffs], Wed Dec 5 23:47:18 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.137: +3 -10 lines
Diff to previous 1.137 (colored)

Extract common code, creating a subroutine if_purgeaddrs(ifp,
family, purgeaddr) which applies function `purgeaddr' to each
address on `ifp' belonging to `family'.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Dec 5 23:00:58 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.136: +4 -4 lines
Diff to previous 1.136 (colored)

Use IFADDR_FIRST(), IFADDR_NEXT().

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

Use IFNET_FOREACH() and IFADDR_FOREACH().

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:11 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.134: +7 -16 lines
Diff to previous 1.134 (colored)

Sync with HEAD.

Revision 1.93.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:09 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.5: +7 -16 lines
Diff to previous 1.93.2.5 (colored) to branchpoint 1.93 (colored)

sync with head.

Revision 1.133.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:53 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.133: +8 -17 lines
Diff to previous 1.133 (colored) next main 1.134 (colored)

Sync with HEAD

Revision 1.131.4.3 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:32 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.131.4.2: +7 -16 lines
Diff to previous 1.131.4.2 (colored) to branchpoint 1.131 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Nov 10 00:05:57 2007 UTC (16 years, 3 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.134: +7 -16 lines
Diff to previous 1.134 (colored)

Use sockaddr_in6_init().

Revision 1.131.6.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:33:58 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.131: +19 -56 lines
Diff to previous 1.131 (colored)

sync with HEAD

Revision 1.93.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:11 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.4: +19 -56 lines
Diff to previous 1.93.2.4 (colored) to branchpoint 1.93 (colored)

sync with head.

Revision 1.131.4.2 / (download) - annotate - [select for diffs], Fri Oct 26 15:49:06 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.131.4.1: +3 -3 lines
Diff to previous 1.131.4.1 (colored) to branchpoint 1.131 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.134 / (download) - annotate - [select for diffs], Wed Oct 24 06:37:21 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: jmcneill-base
Branch point for: mjf-devfs
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored)

Replace rote sockaddr_in6 initializations (memset(), set sa6_family,
sa6_len, and sa6_add) with sockaddr_in6_init() calls.

De-__P().  Constify.  KNF.  Shorten a staircase.  Change bcmp() to
memcmp().

Extract subroutine in6_setzoneid() from in6_setscope(), for re-use
soon.

Revision 1.125.2.6 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:53 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.125.2.5: +18 -55 lines
Diff to previous 1.125.2.5 (colored) next main 1.126 (colored)

Sync with head.

Revision 1.131.4.1 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:22 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.131: +18 -55 lines
Diff to previous 1.131 (colored)

Sync with HEAD.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Sep 16 18:01:30 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.132: +18 -19 lines
Diff to previous 1.132 (colored)

Cosmetic: shorten staircase.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Sep 11 19:54:51 2007 UTC (16 years, 5 months ago) by gdt
Branch: MAIN
Changes since 1.131: +2 -38 lines
Diff to previous 1.131 (colored)

Remove SIOCSIFALIFETIME_IN6, which could not possibly have ever worked.

Problem reported in kern/35897 by Robert Elz.

Revision 1.93.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:43:18 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.3: +94 -63 lines
Diff to previous 1.93.2.3 (colored) to branchpoint 1.93 (colored)

sync with head.

Revision 1.125.2.5 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:03 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.125.2.4: +8 -8 lines
Diff to previous 1.125.2.4 (colored)

Sync with HEAD.

Revision 1.130.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:48 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.130: +8 -8 lines
Diff to previous 1.130 (colored) next main 1.131 (colored)

Sync with HEAD.

Revision 1.131.8.2 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:57 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.131.8.1: +2309 -0 lines
Diff to previous 1.131.8.1 (colored) to branchpoint 1.131 (colored) next main 1.132 (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.131.8.1, Thu Jul 19 20:48:56 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.131: +0 -2309 lines
FILE REMOVED

file in6.c was added on branch matt-mips64 on 2007-07-19 20:48:57 +0000

Revision 1.131 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:56 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.130: +8 -8 lines
Diff to previous 1.130 (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.125.2.4 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:00 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.125.2.3: +60 -2 lines
Diff to previous 1.125.2.3 (colored)

Sync with head.

Revision 1.125.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:36 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.125: +81 -50 lines
Diff to previous 1.125 (colored) next main 1.126 (colored)

Sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Thu Jun 28 21:03:47 2007 UTC (16 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.129: +60 -2 lines
Diff to previous 1.129 (colored)

Add functions to do mapped address conversions from FreeBSD.

Revision 1.125.2.3 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:12 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.125.2.2: +3 -3 lines
Diff to previous 1.125.2.2 (colored)

Sync with head.

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:51 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.125.2.1: +20 -46 lines
Diff to previous 1.125.2.1 (colored)

Sync with head.

Revision 1.129 / (download) - annotate - [select for diffs], Sun May 27 16:58:17 2007 UTC (16 years, 9 months ago) by cube
Branch: MAIN
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

Tyop.

Revision 1.128 / (download) - annotate - [select for diffs], Wed May 23 17:32:46 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.127: +2 -4 lines
Diff to previous 1.127 (colored)

fix typos in previous

Revision 1.127 / (download) - annotate - [select for diffs], Wed May 23 17:15:01 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.126: +20 -44 lines
Diff to previous 1.126 (colored)

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

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:50 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.125: +4 -5 lines
Diff to previous 1.125 (colored)

Sync with head.

Revision 1.122.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:11 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.122.2.2: +4 -5 lines
Diff to previous 1.122.2.2 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.125.6.1 / (download) - annotate - [select for diffs], Sun Mar 18 00:06:46 2007 UTC (16 years, 11 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.125: +4 -5 lines
Diff to previous 1.125 (colored) next main 1.126 (colored)

First attempt to bring branch in sync with HEAD

Revision 1.126 / (download) - annotate - [select for diffs], Thu Mar 15 23:22:30 2007 UTC (16 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Changes since 1.125: +4 -5 lines
Diff to previous 1.125 (colored)

KNF: compare pointer w/ NULL, don't "check truth".  Fix K&R parameter
types declaration.

Revision 1.122.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:56 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.122.2.1: +10 -10 lines
Diff to previous 1.122.2.1 (colored) to branchpoint 1.122 (colored)

Sync with HEAD.

Revision 1.125 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:25 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.124: +10 -10 lines
Diff to previous 1.124 (colored)

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

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:59 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.122: +6 -12 lines
Diff to previous 1.122 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.93.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:48 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.2: +7 -13 lines
Diff to previous 1.93.2.2 (colored) to branchpoint 1.93 (colored)

sync with head.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Feb 22 08:43:43 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.123: +4 -6 lines
Diff to previous 1.123 (colored)

Cosmetic: use TAILQ_FOREACH().  Join lines.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:12 2007 UTC (17 years ago) by dyoung
Branch: MAIN
Changes since 1.122: +4 -8 lines
Diff to previous 1.122 (colored)

KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.

Revision 1.110.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:15 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.110.2.1: +227 -172 lines
Diff to previous 1.110.2.1 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

Sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jan 4 19:07:04 2007 UTC (17 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.93.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:38 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93.2.1: +240 -187 lines
Diff to previous 1.93.2.1 (colored) to branchpoint 1.93 (colored)

sync with head.

Revision 1.110.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:14 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.110.4.1: +230 -178 lines
Diff to previous 1.110.4.1 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored)

sync with head.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Dec 2 20:40:58 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3
Changes since 1.120: +123 -53 lines
Diff to previous 1.120 (colored)

Synchronize access to the ifaddr list by in6_update_ifa() and
in6_control() with splnet()/splx().  I was being a bit paranoid
here.  Following a cursory analysis of the code, this still looked
necessary.  We don't spend a lot of time in these calls, so it
should not be too harmful to suspend network interrupts.

In in6_unlink_ifa(), call in6_delmulti() just once on each multicast
address (in6_multi).  Previously, in6_unlink_ifa() called in6_delmulti()
on each in6_multi until in6_delmulti() removed the in6_multi from
the list and freed its memory.  That's not justified: the multicast
list holds *one* reference.  All other references belong to other
entities.  We must wait to free the memory until the other entities
release their references, to protect against dereferencing a freed
in6_multi.

XXX I need to revisit in6_delmulti(), in6_unlink_ifa(), and friends,
XXX to pry apart the conditions where an in6_multi is removed from
XXX its list and where it is freed.  Following my change, above,
XXX we still risk dereferencing a freed in6_multi.

Prevent in6_update_ifa() and in6_addremloop() from creating dangling
pointers to interfaces in the routing table.  Previously, my NetBSD
tunnel concentrator, which adds and deletes a lot of P2P interfaces
with the same local address, crashed in 8 hours or less when it
dereferenced a dangling pointer to a deleted ifnet.  Now, its uptime
is greater than 3 days.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Dec 2 18:59:17 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.119: +27 -31 lines
Diff to previous 1.119 (colored)

Use the queue(3) macros instead of open-coding them.  Shorten
staircases.  Remove unnecessary casts.  Where appropriate, s/8/NBBY/.
De-__P().  KNF.

No functional changes intended.

Revision 1.119 / (download) - annotate - [select for diffs], Fri Nov 24 19:47:00 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, 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, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0, netbsd-4
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

fix spelling of accommodate; from Zapher.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Nov 20 04:13:28 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.117: +3 -4 lines
Diff to previous 1.117 (colored)

Cosmetic: join two lines.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:37 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.110: +8 -11 lines
Diff to previous 1.110 (colored)

Sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Nov 18 16:23:15 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.116: +9 -9 lines
Diff to previous 1.116 (colored)

Remove __P().  Use LIST_ macros instead of accessing lh_first
directly.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Nov 18 16:17:55 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.115: +72 -82 lines
Diff to previous 1.115 (colored)

Cosmetic: use TAILQ_FOREACH().  Remove superfluous parentheses from
return statements.

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

__unused removal on arguments; approved by core.

Revision 1.114 / (download) - annotate - [select for diffs], Mon Nov 13 05:13:42 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.113: +4 -7 lines
Diff to previous 1.113 (colored)

Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.

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

sync with head

Revision 1.113 / (download) - annotate - [select for diffs], Sun Oct 15 07:00:44 2006 UTC (17 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.112: +4 -2 lines
Diff to previous 1.112 (colored)

Make SIOCALIFADDR work for adding IPv6 addresses: initialize the
lifetime of the addresses to infinity (ND6_INFINITE_LIFETIME).

Nobody squealed when I proposed this on tech-net.

Revision 1.112 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:39 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.111: +3 -5 lines
Diff to previous 1.111 (colored)

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

Revision 1.111 / (download) - annotate - [select for diffs], Tue Sep 26 11:55:41 2006 UTC (17 years, 5 months ago) by is
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

Fix typo in comment

Revision 1.95.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:55 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.95: +225 -398 lines
Diff to previous 1.95 (colored) next main 1.96 (colored)

sync with head

Revision 1.97.2.6 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:42 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97.2.5: +4 -4 lines
Diff to previous 1.97.2.5 (colored) to branchpoint 1.97 (colored) next main 1.98 (colored)

sync with head.

Revision 1.110 / (download) - annotate - [select for diffs], Fri Aug 25 18:29:17 2006 UTC (17 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.109: +4 -4 lines
Diff to previous 1.109 (colored)

Don't include <netccitt/x25.> and don't bother checking for SIOCSIFCONF_X25.

Revision 1.97.2.5 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:48 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97.2.4: +12 -11 lines
Diff to previous 1.97.2.4 (colored) to branchpoint 1.97 (colored)

sync with head

Revision 1.109 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:13 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.108: +12 -11 lines
Diff to previous 1.108 (colored)

Use the LWP cached credentials where sane.

Revision 1.97.2.4 / (download) - annotate - [select for diffs], Mon Jun 26 12:54:13 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97.2.3: +26 -16 lines
Diff to previous 1.97.2.3 (colored) to branchpoint 1.97 (colored)

sync with head.

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:08 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.93: +307 -799 lines
Diff to previous 1.93 (colored)

sync with head.

Revision 1.103.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:09:49 2006 UTC (17 years, 8 months ago) by chap
Branch: chap-midi
Changes since 1.103: +26 -16 lines
Diff to previous 1.103 (colored) next main 1.104 (colored)

Sync with head.

Revision 1.108 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:03 2006 UTC (17 years, 8 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.107: +15 -15 lines
Diff to previous 1.107 (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.95.4.6 / (download) - annotate - [select for diffs], Sat Jun 3 19:44:04 2006 UTC (17 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.95.4.5: +13 -3 lines
Diff to previous 1.95.4.5 (colored) next main 1.96 (colored)

Sync with head.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Jun 3 06:56:43 2006 UTC (17 years, 8 months ago) by dogcow
Branch: MAIN
CVS Tags: simonb-timecounters-base
Changes since 1.106: +4 -2 lines
Diff to previous 1.106 (colored)

include <netccitt/x25.h> for the SIOCSIFCONF_X25 case in in6_control.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Jun 3 01:43:47 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

Fix typo.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Jun 3 01:32:52 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.104: +5 -5 lines
Diff to previous 1.104 (colored)

add 2 more ioctls that use struct ifaddr *, and remove debugging printfs
I accidentally committed.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Jun 3 01:04:29 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.103: +11 -3 lines
Diff to previous 1.103 (colored)

This is ugly, but it is the simplest fix to avoid calling in the default
case:

    <driver>_ioctl(ifp, SIOCSIFADDR, struct ifreq *)

where it should be calling:

    <driver>_ioctl(ifp, SIOCSIFADDR, struct ifaddr *)

and "Bad Things Happen (TM)"

Returning an error is good enough because none of the drivers handle INET6.

The problem here is that handling SIOCSIFADDR is a kludge. The ioctl gets
passed a struct ifreq * from userland, but then in the control routines
SIOCSIFADDR is handled "specially", and we call:

	ifp->if_ioctl(ifp, SIOCSIFADDR, struct ifaddr *)

directly with the ifaddr we computed for that interface. It would be nice
if we called the ioctl routine if the original struct ifreq, and computed
the ifaddr, or passed it directly. This way all the ioctls would be treated
the same way, and we would not have the problem of pointer overloading.

Revision 1.95.4.5 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:02 2006 UTC (17 years, 8 months ago) by kardel
Branch: simonb-timecounters
Changes since 1.95.4.4: +6 -5 lines
Diff to previous 1.95.4.4 (colored)

Sync with head.

Revision 1.99.4.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:45 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.99.4.1: +6 -5 lines
Diff to previous 1.99.4.1 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.97.2.3 / (download) - annotate - [select for diffs], Wed May 24 10:59:09 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97.2.2: +6 -5 lines
Diff to previous 1.97.2.2 (colored) to branchpoint 1.97 (colored)

sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Thu May 18 09:05:51 2006 UTC (17 years, 9 months ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)

Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@

Revision 1.102 / (download) - annotate - [select for diffs], Sun May 14 21:19:34 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.101: +4 -3 lines
Diff to previous 1.101 (colored)

integrate kauth.

Revision 1.99.2.4 / (download) - annotate - [select for diffs], Sat May 6 23:32:11 2006 UTC (17 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.99.2.3: +3 -2 lines
Diff to previous 1.99.2.3 (colored) to branchpoint 1.99 (colored) next main 1.100 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.95.4.4 / (download) - annotate - [select for diffs], Sun Apr 30 18:04:55 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
Changes since 1.95.4.3: +6 -6 lines
Diff to previous 1.95.4.3 (colored)

- cast constant 1 to time_t to smooth a future
  transition to a 64 bit time_t

Revision 1.95.4.3 / (download) - annotate - [select for diffs], Sat Apr 22 13:42:07 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.95.4.2: +3 -3 lines
Diff to previous 1.95.4.2 (colored)

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

Revision 1.95.4.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:11 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.95.4.1: +190 -375 lines
Diff to previous 1.95.4.1 (colored)

Sync with head.

Revision 1.99.2.3 / (download) - annotate - [select for diffs], Wed Apr 19 04:46:11 2006 UTC (17 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.99.2.2: +4 -4 lines
Diff to previous 1.99.2.2 (colored) to branchpoint 1.99 (colored)

sync with head.

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:49 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97.2.1: +4 -4 lines
Diff to previous 1.97.2.1 (colored) to branchpoint 1.97 (colored)

sync with head.

Revision 1.99.4.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:28 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored)

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

Revision 1.101 / (download) - annotate - [select for diffs], Fri Mar 17 23:29:20 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, elad-kernelauth-base
Changes since 1.100: +3 -3 lines
Diff to previous 1.100 (colored)

0 > len ==> len < 0

Revision 1.100 / (download) - annotate - [select for diffs], Fri Mar 17 23:26:06 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

0 > len ==> len < 0

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Mon Mar 13 09:07:39 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.97: +186 -371 lines
Diff to previous 1.97 (colored)

sync with head.

Revision 1.99.2.2 / (download) - annotate - [select for diffs], Fri Mar 10 15:20:54 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.99.2.1: +3 -3 lines
Diff to previous 1.99.2.1 (colored) to branchpoint 1.99 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:19:40 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

Adapt to kernel authorization KPI.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Mar 6 20:33:52 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Changes since 1.98: +13 -13 lines
Diff to previous 1.98 (colored)

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

Revision 1.98 / (download) - annotate - [select for diffs], Sun Mar 5 23:47:08 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: MAIN
Changes since 1.97: +186 -371 lines
Diff to previous 1.97 (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.97 / (download) - annotate - [select for diffs], Fri Mar 3 14:07:06 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base
Branch point for: yamt-pdpolicy
Changes since 1.96: +3 -3 lines
Diff to previous 1.96 (colored)

Fix typos in comments.

From: the KAME project via SUZUKI Shinsuke.

Revision 1.94.2.2 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:23 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.94.2.1: +3 -3 lines
Diff to previous 1.94.2.1 (colored) next main 1.95 (colored)

sync with head.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Feb 8 13:35:48 2006 UTC (18 years ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

Fix copy&paste problem found by James Juran
<James.Juran@baesystems.com> in freebsd-net mailing list.
bzero'ing the wrong var with a wrong sizeof is clearly not ok..

Revision 1.95.4.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:18:52 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.95: +10 -10 lines
Diff to previous 1.95 (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.94.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:41 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.94: +119 -437 lines
Diff to previous 1.94 (colored)

sync with head.

Revision 1.95 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:36 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.94: +119 -437 lines
Diff to previous 1.94 (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.94 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:02 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

merge ktrace-lwp.

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

Sync with HEAD. Here we go again...

Revision 1.93 / (download) - annotate - [select for diffs], Sun May 29 21:43:51 2005 UTC (18 years, 9 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.92: +12 -12 lines
Diff to previous 1.92 (colored)

- avoid shadowed variables
- sprinkle const.

Revision 1.92 / (download) - annotate - [select for diffs], Tue May 17 04:14:58 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.91: +6 -7 lines
Diff to previous 1.91 (colored)

Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...

Revision 1.90.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:34 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.90: +2 -28 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

sync with -current

Revision 1.90.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:54 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.90: +2 -28 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

sync with head.

Revision 1.77.2.4 / (download) - annotate - [select for diffs], Fri Feb 4 11:48:04 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.77.2.3: +2 -28 lines
Diff to previous 1.77.2.3 (colored)

Sync with HEAD.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Feb 1 15:29:23 2005 UTC (19 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, 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-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, kent-audio2-base
Branch point for: netbsd-3-1, netbsd-3-0, netbsd-3
Changes since 1.90: +2 -28 lines
Diff to previous 1.90 (colored)

remove the unused in6_ifindex2scopeid()
if at all, it works with site-local addresses whose fate is uncertain
to say the least

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

Fix the sync with head I botched.

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

Sync with HEAD.

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:55:11 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.77: +76 -55 lines
Diff to previous 1.77 (colored)

Sync with HEAD

Revision 1.90 / (download) - annotate - [select for diffs], Mon Jul 26 13:44:35 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.89: +16 -2 lines
Diff to previous 1.89 (colored)

run PFIL_IFADDR hooks on SIOCAIFADDR_IN6 and SIOCDIFADDR_IN6 as well.

from Peter Postma, PR/26368.
ok'ed by itojun.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Jun 16 03:17:26 2004 UTC (19 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.88: +58 -74 lines
Diff to previous 1.88 (colored)

multicast data management fix - previous fix was incorrect.  jinmei@kame

Revision 1.88 / (download) - annotate - [select for diffs], Mon Jun 14 08:07:29 2004 UTC (19 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.87: +11 -26 lines
Diff to previous 1.87 (colored)

use macro and make it a bit more readable.

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jun 14 07:54:45 2004 UTC (19 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.86: +73 -43 lines
Diff to previous 1.86 (colored)

check before joining multicast group.  otherwise multiple in6_multi structure
will be kept.  reported by patrick latifi

Revision 1.86 / (download) - annotate - [select for diffs], Sun Mar 28 08:28:06 2004 UTC (19 years, 11 months ago) by christos
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.85: +15 -2 lines
Diff to previous 1.85 (colored)

PR/23335: Christos Zoulas: Removing interfaces trashes free memory when
ipv6 is used because multicast group memberships contain dangling references
to the multicast group deleted.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Feb 23 05:01:04 2004 UTC (20 years ago) by itojun
Branch: MAIN
Changes since 1.84: +4 -3 lines
Diff to previous 1.84 (colored)

avoid out-of-bound memory access if len == 128.
from Ted Unangst via Colin Percival

Revision 1.84 / (download) - annotate - [select for diffs], Wed Dec 10 11:46:33 2003 UTC (20 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (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.83 / (download) - annotate - [select for diffs], Thu Dec 4 13:57:31 2003 UTC (20 years, 2 months ago) by keihan
Branch: MAIN
Changes since 1.82: +3 -3 lines
Diff to previous 1.82 (colored)

netbsd.org -> NetBSD.org

This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.

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

Remove some assigned-to but otherwise unused variables.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Oct 15 22:55:34 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.80: +3 -6 lines
Diff to previous 1.80 (colored)

backout previous (ENETREST special handlng)

Revision 1.80 / (download) - annotate - [select for diffs], Wed Oct 15 22:15:25 2003 UTC (20 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.79: +6 -3 lines
Diff to previous 1.79 (colored)

ignore ENETRESET on ADDMULTI.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Sep 5 23:20:50 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.78: +4 -4 lines
Diff to previous 1.78 (colored)

u_short -> u_int16_t.  sync w/ kame.
don't set ip6_plen where unneeded (i.e. before calling ip6_output)

Revision 1.78 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:23 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.77: +3 -7 lines
Diff to previous 1.77 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.77 / (download) - annotate - [select for diffs], Tue Jun 24 07:43:44 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.76: +2 -4 lines
Diff to previous 1.76 (colored)

typo

Revision 1.76 / (download) - annotate - [select for diffs], Tue Jun 24 07:39:25 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.75: +12 -12 lines
Diff to previous 1.75 (colored)

use time.tv_sec directly

Revision 1.75 / (download) - annotate - [select for diffs], Wed May 14 12:45:07 2003 UTC (20 years, 9 months ago) by wiz
Branch: MAIN
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

constant usually has two n.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Feb 27 22:06:38 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Changes since 1.73: +22 -2 lines
Diff to previous 1.73 (colored)

Add in6_localaddr().  From KAME via FreeBSD.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Feb 24 03:01:03 2003 UTC (21 years ago) by matt
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

automatic aggregates are evil.  make it static const.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:46 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Changes since 1.71: +4 -2 lines
Diff to previous 1.71 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.44.2.10 / (download) - annotate - [select for diffs], Mon Nov 11 22:15:39 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.44.2.9: +9 -16 lines
Diff to previous 1.44.2.9 (colored) next main 1.45 (colored)

Catch up to -current

Revision 1.44.2.9 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:22 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.8: +23 -12 lines
Diff to previous 1.44.2.8 (colored)

Catch up to -current.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Oct 17 00:07:44 2002 UTC (21 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.70: +11 -18 lines
Diff to previous 1.70 (colored)

do not differentiate manually configured address from autoconfigured ones
wrt prefix management;
- always earn a reference to the prefix when an address is configured
 (by ioctl).
- always delete the prefix when an address that has the last referene
  is manually removed.

The change should solve the problem raised in KAME-snap 6989.

sync w/kame

Revision 1.45.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:14 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.45.2.3: +87 -76 lines
Diff to previous 1.45.2.3 (colored) to branchpoint 1.45 (colored) next main 1.46 (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.70 / (download) - annotate - [select for diffs], Mon Sep 23 13:16:52 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.69: +25 -7 lines
Diff to previous 1.69 (colored)

better fix to PR 18163 ("deprecated" flag manipulation).  sync w/kame

Revision 1.69 / (download) - annotate - [select for diffs], Mon Sep 23 05:51:13 2002 UTC (21 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.68: +2 -9 lines
Diff to previous 1.68 (colored)

Remove breaks after returns, unreachable returns and returns after
returns(!).

Revision 1.44.2.8 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:17 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.7: +64 -64 lines
Diff to previous 1.44.2.7 (colored)

Catch up to -current.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Sep 11 02:46:44 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.67: +64 -64 lines
Diff to previous 1.67 (colored)

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

Revision 1.45.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:09 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.45.2.2: +1023 -549 lines
Diff to previous 1.45.2.2 (colored) to branchpoint 1.45 (colored)

catch up with -current on kqueue branch

Revision 1.53.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:38 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.53.2.1: +937 -504 lines
Diff to previous 1.53.2.1 (colored) to branchpoint 1.53 (colored) next main 1.54 (colored)

catch up with -current.

Revision 1.44.2.7 / (download) - annotate - [select for diffs], Thu Jun 20 03:49:11 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.6: +1022 -548 lines
Diff to previous 1.44.2.6 (colored)

Catch up to -current.

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jun 11 07:28:05 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.66: +20 -20 lines
Diff to previous 1.66 (colored)

silence some of log(), as the codepath will be visited for IPv6-non-capable
interfaces too and can be annoying.  net.inet6.icmp6.nd6_debug will
re-enable them.

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

whitespace cleanup

Revision 1.65 / (download) - annotate - [select for diffs], Sat Jun 8 21:22:30 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.64: +877 -373 lines
Diff to previous 1.64 (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.64 / (download) - annotate - [select for diffs], Sat Jun 8 00:07:00 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.63: +5 -19 lines
Diff to previous 1.63 (colored)

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

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

on SIOCAIFADDR_IN6 check if sin6_len is sane.  sync w/kame

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jun 7 04:18:11 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored)

typo

Revision 1.61 / (download) - annotate - [select for diffs], Fri Jun 7 04:07:55 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)

'fall through' is not a valid LINT keyword.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jun 7 04:03:53 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.59: +57 -119 lines
Diff to previous 1.59 (colored)

remove support for deprecated ioctls (EINVAL).  sync w/kame

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Thu May 30 13:52:30 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.53: +87 -46 lines
Diff to previous 1.53 (colored)

Catch up with -current.

Revision 1.59 / (download) - annotate - [select for diffs], Wed May 29 07:53:40 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.58: +9 -17 lines
Diff to previous 1.58 (colored)

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

Revision 1.58 / (download) - annotate - [select for diffs], Wed May 29 02:58:29 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.57: +49 -17 lines
Diff to previous 1.57 (colored)

move per-interface ip6/icmp6 stat to ifnet->if_afdata.  sync w/kame

Revision 1.57 / (download) - annotate - [select for diffs], Sat May 25 22:18:49 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.56: +2 -5 lines
Diff to previous 1.56 (colored)

we have no IFT_DUMMY.  kame merge mistake

Revision 1.56 / (download) - annotate - [select for diffs], Thu May 23 06:53:13 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.55: +2 -3 lines
Diff to previous 1.55 (colored)

remove wrong "break" statement

Revision 1.55 / (download) - annotate - [select for diffs], Thu May 23 06:35:18 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.54: +40 -19 lines
Diff to previous 1.54 (colored)

simplify conditions to do DAD.  sync w/kame

Revision 1.54 / (download) - annotate - [select for diffs], Thu May 23 06:28:25 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

should perform DAD for IFT_GIF.

Revision 1.44.2.6 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:49 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.5: +3 -3 lines
Diff to previous 1.44.2.5 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.53 / (download) - annotate - [select for diffs], Sat Mar 23 00:43:59 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: 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
Branch point for: gehenna-devsw
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

fix arg to bcmp() - need to compare 15 bytes, not 3 bytes.  sync w/kame

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:03:12 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.45.2.1: +66 -25 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored)

Sync kqueue branch with -current.

Revision 1.44.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:15 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.4: +63 -25 lines
Diff to previous 1.44.2.4 (colored)

Catch up to -current.

Revision 1.32.4.6 / (download) - annotate - [select for diffs], Mon Dec 24 14:13:08 2001 UTC (22 years, 2 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.32.4.5: +2 -1 lines
Diff to previous 1.32.4.5 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Pull up revision 1.38 (requested by jdolecek):
  Make sure we don't use an uninitialized pointer.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Dec 21 08:54:53 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.51: +29 -24 lines
Diff to previous 1.51 (colored)

whitespace/costmetic sync w/kame

Revision 1.51 / (download) - annotate - [select for diffs], Thu Dec 20 07:26:36 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.50: +35 -2 lines
Diff to previous 1.50 (colored)

centralize multicast group management (in6_join/leavegroup).
have a flag for ip6_output() to fragment to minimum MTU.
sync with kame

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 18 03:04:02 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)

reduce white space/cosmetic diffs w/kame.

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

Catch up to -current.

Revision 1.49 / (download) - annotate - [select for diffs], Tue Nov 13 00:56:58 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.48: +4 -1 lines
Diff to previous 1.48 (colored)

add RCSIDs

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Mon Oct 22 20:42:00 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.2: +2 -2 lines
Diff to previous 1.44.2.2 (colored)

Catch up to -current.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Oct 18 07:44:33 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

reduce diffs with kame (mostly cosmetic).
move IPV6_CHECKSUM processing to sys/netinet6/raw_ip6.c.
constify a couple of places.

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:36 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44.2.1: +43 -15 lines
Diff to previous 1.44.2.1 (colored)

Catch up with -current.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:58 2001 UTC (22 years, 6 months ago) by lukem
Branch: kqueue
Changes since 1.45: +43 -15 lines
Diff to previous 1.45 (colored)

update to -current

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 25 06:59:51 2001 UTC (22 years, 7 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
Changes since 1.46: +3 -1 lines
Diff to previous 1.46 (colored)

ifidex2ifnet could contain NULL after if_detach().  sync with kame

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 18 13:12:27 2001 UTC (22 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.45: +41 -15 lines
Diff to previous 1.45 (colored)

do not malloc() during interrupt context for IPv6 multicast kludge table.
malloc() during interface initialization.  sync with kame

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Thu Jun 21 20:08:51 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Catch up to -current.

Revision 1.7.2.6 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:54 2001 UTC (22 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7.2.5: +2 -2 lines
Diff to previous 1.7.2.5 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:25 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: kqueue
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (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.7.2.5 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:54 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7.2.4: +4 -4 lines
Diff to previous 1.7.2.4 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.32.4.5 / (download) - annotate - [select for diffs], Mon Feb 26 15:58:18 2001 UTC (23 years ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.32.4.4: +9 -1 lines
Diff to previous 1.32.4.4 (colored) to branchpoint 1.32 (colored)

Pull up revision 1.39 (requested by itojun):
  Workaround to avoid EMSGSIZE when ND6 table for outgoing interface
  is not initialized (should result in "interface down").

Revision 1.44 / (download) - annotate - [select for diffs], Fri Feb 16 15:13:40 2001 UTC (23 years ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.43: +4 -4 lines
Diff to previous 1.43 (colored)

wording in comment.
is contradict -> "is contradictory", or "contradicts".

Revision 1.7.2.4 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:21 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7.2.3: +46 -28 lines
Diff to previous 1.7.2.3 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Feb 11 06:49:52 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.42: +5 -2 lines
Diff to previous 1.42 (colored)

pull latest kame pcbnotify code.  synchronizes ICMPv6 path mtu discovery
behavior with other protocols (i.e. validation, use of hiwat/lowat).

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 11 04:29:30 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored)

add missing IFAFREE() in error recovery case.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Feb 10 04:14:27 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.40: +30 -27 lines
Diff to previous 1.40 (colored)

to sync with kame better, (1) remove register declaration for variables,
(2) sync whitespaces, (3) update comments. (4) bring in some of portability
and logging enhancements.  no functional changes here.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Feb 7 08:59:48 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.39: +4 -1 lines
Diff to previous 1.39 (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.39 / (download) - annotate - [select for diffs], Thu Jan 18 06:50:12 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.38: +9 -1 lines
Diff to previous 1.38 (colored)

workaround to avoid EMSGSIZE when ND6 table for the outgoing interface
is not initialized (should result in "interface down").

Revision 1.7.2.3 / (download) - annotate - [select for diffs], Fri Dec 8 09:18:51 2000 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7.2.2: +2 -1 lines
Diff to previous 1.7.2.2 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Dec 4 12:11:49 2000 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.37: +3 -2 lines
Diff to previous 1.37 (colored)

make sure we don't touch uninitialized pointer.  from: fvdl

Revision 1.7.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:20 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7.2.1: +12 -2 lines
Diff to previous 1.7.2.1 (colored) to branchpoint 1.7 (colored)

Sync with HEAD.

Revision 1.7.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:46 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.7: +717 -394 lines
Diff to previous 1.7 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.37 / (download) - annotate - [select for diffs], Sun Nov 5 17:17:16 2000 UTC (23 years, 3 months ago) by onoe
Branch: MAIN
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (colored)

First Prototype implementation of network interface part for IEEE1394 (if_fw).

Current status:
	Only OHCI chip is supported (fwohci).
	ping (IPv4) works with Sony's implementation (SmartConnect) on Win98.
	sometimes works but not stable.
Not implemented yet:
	IRM (Isochronous Resource Manager) functionality.
	Link layer fragmentation.
	Topology map.
More to do:
	clean ups
	MCAP
	charactor device part
	dhcp

There is no entry in GENERIC config file yet.
Follow sys/dev/ieee1394/IMPLEMENTATION to enable if_fw.

Revision 1.32.4.4 / (download) - annotate - [select for diffs], Mon Oct 30 22:36:33 2000 UTC (23 years, 4 months ago) by tv
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2
Changes since 1.32.4.3: +10 -2 lines
Diff to previous 1.32.4.3 (colored) to branchpoint 1.32 (colored)

Pullup 1.36 [itojun]:
do not panic on "ifconfig inet6 fe80::1 -alias".  from Todd Fries.
KAME PR 295.

Revision 1.36 / (download) - annotate - [select for diffs], Sat Oct 28 03:46:21 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.35: +10 -2 lines
Diff to previous 1.35 (colored)

do not panic on "ifconfig inet6 fe80::1 -alias".  from Todd Fries.
KAME PR 295.

Revision 1.32.4.3 / (download) - annotate - [select for diffs], Fri Oct 6 07:00:37 2000 UTC (23 years, 4 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-BETA
Changes since 1.32.4.2: +2 -22 lines
Diff to previous 1.32.4.2 (colored) to branchpoint 1.32 (colored)

pullup (approved by releng-1-5)
move privilege check for SIOCSIFPHY* from in{,6}_control to ifioctl.
fix privilege check mistakes (which allows non-root user to modify gif
physical address in some cases).  sync with kame.
 > cvs rdiff -r1.62 -r1.63 syssrc/sys/netinet/in.c
 > cvs rdiff -r1.34 -r1.35 syssrc/sys/netinet6/in6.c
 > cvs rdiff -r1.71 -r1.73 syssrc/sys/net/if.c

Revision 1.35 / (download) - annotate - [select for diffs], Fri Oct 6 05:07:42 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.34: +2 -22 lines
Diff to previous 1.34 (colored)

remove obsolete handling code for SIOCSIFPHY*.  they are now in ifioctl().
sync with kame.

Revision 1.32.4.2 / (download) - annotate - [select for diffs], Fri Aug 18 06:38:46 2000 UTC (23 years, 6 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.32.4.1: +4 -1 lines
Diff to previous 1.32.4.1 (colored) to branchpoint 1.32 (colored)

pullup (approved by releng-1-5)
sys/netinet6/in6.c 1.33 -> 1.34
sys/netinet/in.c 1.61 -> 1.62

 > inhibit error code from rtinit().  this happens when we try to assign
 > multiple addresses from same prefix, onto single interface.  PR 10427.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Aug 2 15:03:04 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored)

inhibit error code from rtinit().  this happens when we try to assign
multiple addresses from same prefix, onto single interface.  PR 10427.


more info:
- 4.4BSD did not check return code from in_ifinit() at all.
  4.4BSD does not support multiple address from same prefix.
- past KAME change passed in{,6}_ifinit() to upwards, toward ifconfig(8).
  the behavior is filed as PR 10427.
- the commit inhibits EEXIST from rtinit(), hence partially recovers old
  4.4BSD behavior.
- the right thing to happen is to properly support multiple address assignment
  from the same prefix.  KAME tree has more extensive change, however, it needs
  much more time to get stabilized (rtentry refcnt change can cause serious
  issue, we really need to bake it before bring it to netbsd)

Revision 1.32.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 14:59:50 2000 UTC (23 years, 7 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.32: +11 -5 lines
Diff to previous 1.32 (colored)

pullup 1.32 -> 1.33 (approved by releng-1-5)

fatal bug fix from kame (rtentry refcnt goes negative if we play with IPv6
address/routing table too much).

in6_ifloop_request()
  not to request rtrequest to return an rtentry except for the ADD
  operation, in order to avoid misdecreasing the refcnt (which might
  cause leak of rtentry)

Revision 1.33 / (download) - annotate - [select for diffs], Thu Jul 13 09:56:20 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.32: +11 -5 lines
Diff to previous 1.32 (colored)

fatal bug fix from kame (rtentry refcnt goes negative if we play with IPv6
address/routing table too much).

in6_ifloop_request()
  not to request rtrequest to return an rtentry except for the ADD
  operation, in order to avoid misdecreasing the refcnt (which might
  cause leak of rtentry)

Revision 1.32 / (download) - annotate - [select for diffs], Thu Apr 27 16:44:19 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

misuse of free(ia) in #if 0'ed region.
From: Lennart Augustsson <lennart@augustsson.net>

Revision 1.31 / (download) - annotate - [select for diffs], Sun Apr 16 15:27:59 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored)

perform neighbor unreachability detection on p2p links (spec requires
it for bidir p2p links).
improve -i in ndp(8) to allow tweaking per-interface ND flag on.
fix ndp(8) infinite loop on certain routing table setup.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Apr 16 15:00:56 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.29: +11 -16 lines
Diff to previous 1.29 (colored)

better sync with latest kame (cosmetic only).

Revision 1.29 / (download) - annotate - [select for diffs], Wed Apr 12 10:36:44 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.28: +5 -52 lines
Diff to previous 1.28 (colored)

revisit in6_ifattach().
- be persistent on initializing interfaces, even if there's manually-
  assigned linklocal, multicast/whatever initialization is necessary.
- do not cache mac addr in the kernel.  grab mac addr from existing cards
  (this is important when you swap ethernet cards back and forth)
now ppp6 works just fine!

call in6_ifattach() on ATM PVC interface to assign link-local, using
hardware MAC address as seed.

(the change is in sync with kame tree).

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 24 04:09:04 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

move ia6->ia6_dad_ch to dp->dad_timer_ch, to ease KAME code sharing.
now in6_var.h does not need to pull sys/callout.h in.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Mar 23 07:03:29 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Mar 21 11:23:32 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.25: +9 -2 lines
Diff to previous 1.25 (colored)

improve comment (about undo'ing code on in{,6}_ifinit failure)

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 18 02:41:59 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.24: +5 -1 lines
Diff to previous 1.24 (colored)

#if 0'ed undo code for interface address addition failure.
it was a bit too strong, and forbids multiple addresses from
same prefix to be assigned.

now the behavior is the same as previous - memory leak on interface address
addition failure.
http://orange.kame.net/dev/query-pr.cgi?pr=218

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 12 05:23:07 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.23: +33 -5 lines
Diff to previous 1.23 (colored)

undo interface addition attempt if in6_ifinit() fails.
without it, :: will be kept if in6_ifinit() fails.

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

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

Revision 1.22 / (download) - annotate - [select for diffs], Mon Feb 28 12:08:22 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.21: +1 -9 lines
Diff to previous 1.21 (colored)

remove some of cross-BSD portability #ifdef.
remove xxCTL_VARS, which is BSDI specific.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Feb 26 08:39:19 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.20: +267 -178 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Fri Feb 25 05:13:05 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.19: +75 -31 lines
Diff to previous 1.19 (colored)

on SIOCS*_IN6, validate sockaddrs so that we never configure non-AF_INET6
addresses. (in_control has the same problem - I'll need to check it as well)

obsolete the following two ioctls, they do not fit well against IPv6 addressing
model. (the kernel support them for some period of time, we'll remove them
in the near future)
	SIOCSIFDSTADDR_IN6
	SIOCSIFNETMASK_IN6

Revision 1.19 / (download) - annotate - [select for diffs], Thu Feb 24 12:59:12 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.18: +2 -7 lines
Diff to previous 1.18 (colored)

remove never-referenced variable (in6_interfaces).
fix paren match for macro.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 24 12:43:49 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.17: +16 -16 lines
Diff to previous 1.17 (colored)

costmetic (remove space at EOL)

Revision 1.17 / (download) - annotate - [select for diffs], Mon Feb 7 05:42:59 2000 UTC (24 years ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

correct SIOCAIFADDR_IN6 failure recovery in point-to-point case.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Feb 6 12:49:43 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

fix include pathname for better rfc2292 compliance.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Feb 4 08:54:04 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.14: +5 -11 lines
Diff to previous 1.14 (colored)

avoid some of typecasting from in6_ifaddr to ifaddr.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Feb 2 23:28:10 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.13: +14 -12 lines
Diff to previous 1.13 (colored)

PRU_PURGEADDR -> PRU_PURGEIF, per a discussion w/ itojun.  In the IPv4
and IPv6 code, also use this to traverse PCB tables, looking for cached
routes referencing the dying ifnet, forcing them to be refreshed.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Feb 2 17:54:07 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.12: +4 -7 lines
Diff to previous 1.12 (colored)

make sure to nuke kludge entries, regardless from refcnt.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Feb 2 16:58:10 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.11: +30 -2 lines
Diff to previous 1.11 (colored)

implement in6_purgemkludge().  in6_ifdetach() calls it to avoid dangling
kludge entries.  the situation would occur if you take the following steps:
- join multicast groups (default ones like linklocal all-node is fine)
- remove all IPv6 addresses manually
- remove pcmcia card

to thorpej: pls call in6_ifdetach() when PRU_PURGEIF is raised (just before
removing ifnet).  it should do the right thing (unable to perform real test
though)

Revision 1.11 / (download) - annotate - [select for diffs], Wed Feb 2 13:44:05 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.10: +15 -1 lines
Diff to previous 1.10 (colored)

remove route to link-local allnodes multicast address (ff02:x::/32),
when the last IPv6 address on an interface is get removed.
in6_ifattach() configures it and in6_ifdetach() removes it.

XXX last part of in6_purgeaddr looks very ugly, but there's no event for
"interface detach" (events are for "address detach").

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 1 22:52:10 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.9: +81 -57 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Thu Jan 6 15:46:09 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.8: +2 -151 lines
Diff to previous 1.8 (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.7.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:23 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.7: +373 -65 lines
Diff to previous 1.7 (colored) next main 1.8 (colored)

Pull up to last week's -current.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:21 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.7: +373 -65 lines
Diff to previous 1.7 (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:49 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.1.2.2: +518 -56 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.7 / (download) - annotate - [select for diffs], Sun Sep 26 20:08:15 1999 UTC (24 years, 5 months ago) by is
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored)

Add missing "case IFT_ARCNET".

Revision 1.6 / (download) - annotate - [select for diffs], Sun Sep 19 21:31:34 1999 UTC (24 years, 5 months ago) by is
Branch: MAIN
Changes since 1.5: +10 -1 lines
Diff to previous 1.5 (colored)

Zeroth version of IPv6 support for ARCnet. Correct MTU handling still needs
to be done.

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

Update from trunk.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 30 10:35:36 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-base
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:02:59 1999 UTC (24 years, 7 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.1.2.1: +2 -146 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, 7 months ago) by itojun
Branch: MAIN
Changes since 1.3: +3 -3 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:18 1999 UTC (24 years, 8 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:27 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.2.2.1: +1799 -0 lines
Diff to previous 1.2.2.1 (colored)

Sync w/ -current.

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

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

Revision 1.2 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:53 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: chs-ubc2
Changes since 1.1: +1799 -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:03 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.1: +1945 -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:03 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: kame
FILE REMOVED

file in6.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>