The NetBSD Project

CVS log for src/sys/net/rtsock.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.256: download - view: text, markup, annotated - select for diffs
Sat Aug 27 08:36:41 2022 UTC (2 years, 3 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +4 -4 lines
Add a little const. NFC.

Revision 1.241.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:15 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.241.2.1: preferred, colored; branchpoint 1.241: preferred, colored; next MAIN 1.242: preferred, colored
Changes since revision 1.241.2.1: +15 -15 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.255: download - view: text, markup, annotated - select for diffs
Mon Mar 9 21:20:55 2020 UTC (4 years, 8 months ago) by roy
Branches: 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, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +5 -4 lines
route: RTM_MISS now puts the message source address in RTA_AUTHOR

route(8) also reports this.
A userland app could use this to blacklist nodes who probe for machines
that doesn't exist on a subnet / prefix.

Revision 1.252.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:06 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.252: preferred, colored; next MAIN 1.253: preferred, colored
Changes since revision 1.252: +5 -5 lines
Sync with head.

Revision 1.254: download - view: text, markup, annotated - select for diffs
Mon Feb 3 20:34:13 2020 UTC (4 years, 10 months ago) by roy
Branches: MAIN
CVS tags: ad-namecache-base3
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +4 -4 lines
rtsock: favour ifatoia and ifatoia6 over direct struct casts

Revision 1.253: download - view: text, markup, annotated - select for diffs
Wed Jan 29 04:35:13 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +3 -3 lines
Do not reference ifp->if_data directly; use if_export_if_data().

Revision 1.250.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 5 08:28:05 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Diff to: previous 1.250.2.1: preferred, colored; branchpoint 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250.2.1: +7 -7 lines
Pull up following revision(s) (requested by roy in ticket #168):

	sys/net/rtsock.c: revision 1.252
	sys/netinet6/nd6_nbr.c: revision 1.168 - 1.172
	sys/netinet6/nd6.c: revision 1.262

inet6: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.

This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This results in less messages via route(4) and tells us when a new
lladdr has been added (RTM_ADD), changed (RTM_CHANGE), deleted
(RTM_DELETED) or has failed to been resolved (RTM_MISS).

The latter case can be interpreted as unreachable.

inet6: change rt_announce and llchange to bool in nd6_na_input()
more bool

Revision 1.252: download - view: text, markup, annotated - select for diffs
Sun Sep 1 18:54:38 2019 UTC (5 years, 3 months ago) by roy
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +7 -7 lines
inet6: Send RTM_MISS when we fail to resolve an address.

Takes the same approach as when adding a new address - we no longer
announce the new lladdr right away but we announce the result.
This will either be RTM_ADD or RTM_MISS.
RTM_DELETE is only sent if we have a lladdr assigned OR gc'ed.

This results in less messages via route(4) and tells us when a new
lladdr has been added (RTM_ADD), changed (RTM_CHANGE), deleted (RTM_DELETED)
or has failed to been resolved (RTM_MISS). The latter case can be
interpreted as unreachable.

Revision 1.250.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 26 13:42:36 2019 UTC (5 years, 3 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +9 -10 lines
Pull up following revision(s) (requested by roy in ticket #109):

	sys/net/route.h: revision 1.124
	sys/netinet6/nd6.c: revision 1.258
	sys/netinet6/nd6.c: revision 1.259
	sys/net/rtsock.c: revision 1.251
	sys/netinet/if_arp.c: revision 1.284
	sys/netinet6/nd6_nbr.c: revision 1.167

rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9

 -

nd6: notify userland of neighbour lla updates once more

XXX pullup -8 -9

Revision 1.251: download - view: text, markup, annotated - select for diffs
Thu Aug 22 21:14:45 2019 UTC (5 years, 3 months ago) by roy
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +9 -10 lines
rtsock: rework rt_clonedmsg to take a message type and lladdr

We will use this in a future patch to notify userland of lladdr
changes.

XXX pullup -8 -9

Revision 1.241.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:45 2019 UTC (5 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +64 -1647 lines
Sync with HEAD

Revision 1.213.2.13: download - view: text, markup, annotated - select for diffs
Wed May 29 16:01:51 2019 UTC (5 years, 6 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE
Diff to: previous 1.213.2.12: preferred, colored; branchpoint 1.213: preferred, colored; next MAIN 1.214: preferred, colored
Changes since revision 1.213.2.12: +4 -4 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1276):

	sys/net/rtsock.c: revision 1.250

Don't take softnet_lock in sysctl_rtable

Taking softnet_lock there can cause a deadlock with nfs sosend, so we don't.
Having only KERNEL_LOCK is enough because now the routing table is protected by
KERNEL_LOCK that was introduced by the fix for PR 53043.

PR kern/54227 from Paul Ripke

Revision 1.250: download - view: text, markup, annotated - select for diffs
Mon May 27 05:33:48 2019 UTC (5 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base
Branch point for: netbsd-9
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +4 -4 lines
Don't take softnet_lock in sysctl_rtable

Taking softnet_lock there can cause a locking error with nfs sosend, so we don't.
Having only KERNEL_LOCK is enough because now the routing table is protected by
KERNEL_LOCK that was introduced by the fix for PR 53043.

PR kern/54227 from Paul Ripke

Revision 1.249: download - view: text, markup, annotated - select for diffs
Mon Apr 29 05:42:09 2019 UTC (5 years, 7 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +7 -8 lines
For the rtsock compat code, make sure we create the "oroute" sysctl
tree.  Otherwise a 5.2 version of getifaddrs(2) gets errors.

This makes the 5.2 version of ifconfig(8) behave the same on both
NetBSD-8 and -current.  HOWEVER, both of them print nothing (for
``ifconfig -l'' command) so there's still a bug somewhere.

As reported originally by der Mouse.

Revision 1.213.2.12: download - view: text, markup, annotated - select for diffs
Thu Mar 7 16:59:10 2019 UTC (5 years, 8 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-1-RC1
Diff to: previous 1.213.2.11: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.11: +4 -2 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1203):

	sys/net/rtsock.c: revision 1.247

Protect sysctl_rtable with KERNEL_LOCK and softnet_lock

In the function the routing table could be accessed without any locks, which was
unsafe.  Actually, on netbsd-7, a kernel panic happened(*).  The situation of
locking hasn't changed since netbsd-7 so we still need to hold the big locks on
-current (and netbsd-8) too.

Note that if NET_MPSAFE is enabled, the routing table is protected by its own
lock and we don't need the locks.

Reported and tested on netbsd-7 by sborrill@
(*) http://mail-index.netbsd.org/tech-net/2018/11/08/msg007153.html

Revision 1.248: download - view: text, markup, annotated - select for diffs
Fri Mar 1 11:06:57 2019 UTC (5 years, 9 months ago) by pgoyette
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +5 -5 lines
Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly
discussed on irc.

NFCI intended.

Ride the earlier kernel bump - it;s getting crowded.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Wed Feb 27 04:03:06 2019 UTC (5 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +4 -2 lines
Protect sysctl_rtable with KERNEL_LOCK and softnet_lock

In the function the routing table could be accessed without any locks, which was
unsafe.  Actually, on netbsd-7, a kernel panic happened(*).  The situation of
locking hasn't changed since netbsd-7 so we still need to hold the big locks on
-current (and netbsd-8) too.

Note that if NET_MPSAFE is enabled, the routing table is protected by its own
lock and we don't need the locks.

Reported and tested on netbsd-7 by sborrill@

(*) http://mail-index.netbsd.org/tech-net/2018/11/08/msg007153.html

Revision 1.163.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 23 07:17:37 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7
Diff to: previous 1.163.2.1: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.2.1: +6 -2 lines
Apply patch, requested by sborrill in ticket #1680:

	sys/net/rtsock.c		(apply patch)

Fix locking for sysctl_rtable (fix in HEAD will be different).

Revision 1.163.8.2: download - view: text, markup, annotated - select for diffs
Sat Feb 23 07:16:37 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7-1
Diff to: previous 1.163.8.1: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.8.1: +6 -2 lines
Apply patch, requested by sborrill in ticket #1680:

	sys/net/rtsock.c		(apply patch)

Fix locking for sysctl_rtable (fix in HEAD will be different).

Revision 1.163.4.2: download - view: text, markup, annotated - select for diffs
Sat Feb 23 07:14:40 2019 UTC (5 years, 9 months ago) by martin
Branches: netbsd-7-0
Diff to: previous 1.163.4.1: preferred, colored; branchpoint 1.163: preferred, colored; next MAIN 1.164: preferred, colored
Changes since revision 1.163.4.1: +6 -2 lines
Apply patch, requested by sborrill in ticket #1680:

	sys/net/rtsock.c		(apply patch)

Fix locking for sysctl_rtable (fix in HEAD will be different).

Revision 1.246: download - view: text, markup, annotated - select for diffs
Tue Jan 29 09:28:51 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +6 -6 lines
Normalize all the compat hooks' names to the form

	<subsystem>_<function>_<version>_hook

NFCI

XXX Note that although this introduces a change in the kernel-to-
XXX module interface, we are NOT bumping the kernel version number.
XXX We will bump the version number once the interface stabilizes.

Revision 1.245: download - view: text, markup, annotated - select for diffs
Sun Jan 27 02:08:48 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +56 -1639 lines
Merge the [pgoyette-compat] branch

Revision 1.238.2.25: download - view: text, markup, annotated - select for diffs
Tue Jan 22 07:42:41 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.238.2.24: preferred, colored; branchpoint 1.238: preferred, colored; next MAIN 1.239: preferred, colored
Changes since revision 1.238.2.24: +8 -83 lines
Convert the MODULE_{,VOID_}HOOK_CALL macros to do everything in-line
rather than defining an intermediate hook##call function.  Almost
all of the hooks are called only once, and although we lose the
ability of doing things like

	if (MODULE_HOOK_CALL(...) == 0) ...

we simplify things quite a bit.  With this change, we no longer need
to have both declaration and definition macros, and the definition
no longer needs to have both prototype argument list and a "real"
argument list.

FWIW, the above if now needs to written as

	int ret;

	MODULE_HOOK_CALL(..., ret);
	if (ret == 0) ...

with appropriate use of braces {}.

Revision 1.238.2.24: download - view: text, markup, annotated - select for diffs
Mon Jan 21 06:49:28 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.23: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.23: +10 -10 lines
No need to declare the hook_call() function for void hooks.  So
remove and simplify.

Revision 1.238.2.23: download - view: text, markup, annotated - select for diffs
Fri Jan 18 00:01:02 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.22: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.22: +9 -18 lines
Don't restrict hooks to having only int or void types.  Pass the hook's
type to the various macros, as needed.

Allows us to reduce diffs to original in at least one or two places (we
no longer have to provide an additional parameter to the hook routine
for returning a non-int return value).

Revision 1.238.2.22: download - view: text, markup, annotated - select for diffs
Tue Jan 15 22:27:07 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.21: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.21: +2 -4 lines
Remove a couple of unneeded #include-s

XXX There's probably a lot more clean-up that could happen here!

Revision 1.238.2.21: download - view: text, markup, annotated - select for diffs
Tue Jan 15 04:10:34 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.20: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.20: +2 -8 lines
Add vectors for sctp_{add,delete}_ipaddr() so we can check them
in rtsock.c rather than depending on the SCTP kernel compile
option.  This is similar to what was done previously with NTP.

Revision 1.238.2.20: download - view: text, markup, annotated - select for diffs
Tue Jan 15 03:40:35 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.19: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.19: +5 -1611 lines
Split sys/net/rtsock.c into two pieces, one of which is applicable only
to -current and one which is shared between -current and COMPAT_50.

Revision 1.238.2.19: download - view: text, markup, annotated - select for diffs
Mon Jan 14 13:34:28 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.18: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.18: +48 -54 lines
Create a variant of the HOOK macros that handles hook routines of
type void, and use them where appropriate.

Revision 1.238.2.18: download - view: text, markup, annotated - select for diffs
Sun Jan 13 23:32:22 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.17: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.17: +119 -71 lines
Add the required hooks for rtsock_50 and modify the COMPATCALL() macro
to use the hooks.  While the rtsock_50 situation is still sub-optimal
(it includes the main rtsock.c with a whole bunch of function and
variable redefinitions via macros), this at least makes it possible to
load the rtsock_50 code separately from more recent code, rather than
the previous requirement that rtsock_50 be built-in.

Revision 1.238.2.17: download - view: text, markup, annotated - select for diffs
Sun Jan 13 10:49:51 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.16: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.16: +21 -20 lines
Remove the HOOK2 versions of the MODULE_HOOK macros.  There were
only a few uses, and using them led to some lack of clarity in the
code.  Instead, we now use two separate hooks, with names that
make it clear(er) what we're doing.

This also positions us to start unraveling some of the rtsock_50
mess, which will need (at least) five hooks.

Revision 1.238.2.16: download - view: text, markup, annotated - select for diffs
Sun Jan 13 07:05:10 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.15: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.15: +142 -137 lines
Rearrange a bit, put all the sysctl-related stuff at the end of the
file, and enclose it in a single ``#ifdef COMPAT_RTSOCK ... #endif''
block.

XXX Arguably, this code might better belong in its own source file,
but I'll leave that for a future project.

Revision 1.238.2.15: download - view: text, markup, annotated - select for diffs
Fri Jan 11 07:55:53 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.14: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.14: +8 -3 lines
Don't accept OIFLIST operation unless the rtsock_70_hook is loaded,
even though the results are otherwise identical to those on current.

Revision 1.238.2.14: download - view: text, markup, annotated - select for diffs
Fri Jan 11 06:27:45 2019 UTC (5 years, 10 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.13: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.13: +62 -44 lines
Rework the various sysctl-related routines to call the correct code
for each version.  While here, extract the 5.0 specific code instead
of including in the main rtsock.c code.

Also, clean up all the sysctl-related routines to prevent building
more than one copy, no matter how many places rtsock.c gets #include'd
into!

Revision 1.163.4.1: download - view: text, markup, annotated - select for diffs
Wed Nov 28 16:32:14 2018 UTC (6 years ago) by martin
Branches: netbsd-7-0
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +4 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1657):

	sys/net/rtsock.c: revision 1.244 (adapted)

Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.
[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.163.8.1: download - view: text, markup, annotated - select for diffs
Wed Nov 28 16:30:57 2018 UTC (6 years ago) by martin
Branches: netbsd-7-1
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +4 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1657):

	sys/net/rtsock.c: revision 1.244 (adapted)

Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.
[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.163.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 28 16:30:06 2018 UTC (6 years ago) by martin
Branches: netbsd-7
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +4 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1657):

	sys/net/rtsock.c: revision 1.244 (adapted)

Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.
[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.238.2.13: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:50 2018 UTC (6 years ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.12: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.12: +4 -4 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.213.2.11: download - view: text, markup, annotated - select for diffs
Wed Nov 21 12:01:11 2018 UTC (6 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.213.2.10: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.10: +4 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1101):

	sys/net/rtsock.c: revision 1.244

Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.
[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.244: download - view: text, markup, annotated - select for diffs
Tue Nov 13 07:45:43 2018 UTC (6 years ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +4 -4 lines
Fix kernel info leak. There are 2 bytes of padding in struct if_msghdr.

[  944.607323] kleak: Possible leak in copyout: [len=176, leaked=2]
[  944.617335] #0 0xffffffff80b7c44a in kleak_note <netbsd>
[  944.627332] #1 0xffffffff80b7c4ca in kleak_copyout <netbsd>
[  944.627332] #2 0xffffffff80c91698 in sysctl_iflist_if <netbsd>
[  944.637336] #3 0xffffffff80c91d3c in sysctl_iflist <netbsd>
[  944.647343] #4 0xffffffff80c93855 in sysctl_rtable <netbsd>
[  944.647343] #5 0xffffffff80b5b328 in sysctl_dispatch <netbsd>
[  944.657346] #6 0xffffffff80b5b62e in sys___sysctl <netbsd>
[  944.667354] #7 0xffffffff8025ab3c in sy_call <netbsd>
[  944.667354] #8 0xffffffff8025ad6e in sy_invoke <netbsd>
[  944.677365] #9 0xffffffff8025adf4 in syscall <netbsd>

Revision 1.238.2.12: download - view: text, markup, annotated - select for diffs
Mon Oct 15 04:33:34 2018 UTC (6 years, 1 month ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.11: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.11: +24 -15 lines
Convert a couple more hooks to the MP-safe mechanism.

While here, clean up some headers and remove any that are now empty.

Revision 1.238.2.11: download - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:56 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.10: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.10: +2 -3 lines
Ssync with HEAD

Revision 1.238.2.10: download - view: text, markup, annotated - select for diffs
Sat Sep 29 21:36:14 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.9: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.9: +4 -6 lines
In MODULE_HOOK_CALL_DECL we don't need to provide the actual argument
list for calling the hook function, nor do we need to provide the
default value (for when the hook has not been set).

Revision 1.238.2.9: download - view: text, markup, annotated - select for diffs
Tue Sep 18 23:03:55 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.8: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.8: +7 -7 lines
The COMPAT_HOOK macros were renamed to MODULE_HOOK, adjust all callers

Revision 1.238.2.8: download - view: text, markup, annotated - select for diffs
Tue Sep 18 01:15:58 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.7: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.7: +12 -4 lines
Split the COMPAT_CALL_HOOK to separate the declaration from the
implementation.  Some hooks are called from multiple source files,
and the old method resulted in duplicate implementations.

Implement MP-safe hooks for the usb_subr_30 code.  Pass the helper
functions as arguments to the compat code so it does not have to
determine if the kernel contains usb code.

Revision 1.238.2.7: download - view: text, markup, annotated - select for diffs
Mon Sep 17 11:04:31 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.6: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.6: +21 -4 lines
Adapt (most of) the indirect function pointers to the new MP-safe
mechanism.  Still remaining are the compat_netbsd32 stuff, and
some usb subroutines.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Fri Sep 7 06:08:16 2018 UTC (6 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +2 -3 lines
Set unused pr_input field to NULL, discussed on tech-net@.

Revision 1.238.2.6: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:44 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.5: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.5: +4 -4 lines
Sync with HEAD

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

Revision 1.242: download - view: text, markup, annotated - select for diffs
Fri Aug 31 15:15:23 2018 UTC (6 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0906
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +4 -4 lines
Fix buffer overflow, detected by kASan.

	ifconfig gif0 create
	ifconfig gif0 up

[   50.682919] kASan: Unauthorized Access In 0xffffffff80f22655: Addr 0xffffffff81b997a0 [8 bytes, read]
[   50.682919] #0 0xffffffff8021ce6a in kasan_memcpy <netbsd>
[   50.692999] #1 0xffffffff80f22655 in m_copyback_internal <netbsd>
[   50.692999] #2 0xffffffff80f22e81 in m_copyback <netbsd>
[   50.692999] #3 0xffffffff8103109a in rt_msg1 <netbsd>
[   50.692999] #4 0xffffffff8159109a in compat_70_rt_newaddrmsg1 <netbsd>
[   50.692999] #5 0xffffffff81031b0f in rt_newaddrmsg <netbsd>
[   50.692999] #6 0xffffffff8102c35e in rt_ifa_addlocal <netbsd>
[   50.692999] #7 0xffffffff80a5287c in in6_update_ifa1 <netbsd>
[   50.692999] #8 0xffffffff80a54149 in in6_update_ifa <netbsd>
[   50.692999] #9 0xffffffff80a59176 in in6_ifattach <netbsd>
[   50.692999] #10 0xffffffff80a56dd4 in in6_if_up <netbsd>
[   50.692999] #11 0xffffffff80fc5cb8 in if_up_locked <netbsd>
[   50.703622] #12 0xffffffff80fcc4c1 in ifioctl_common <netbsd>
[   50.703622] #13 0xffffffff80fde694 in gif_ioctl <netbsd>
[   50.703622] #14 0xffffffff80fcdb1f in doifioctl <netbsd>

Revision 1.213.2.10: download - view: text, markup, annotated - select for diffs
Sat May 5 19:07:51 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Diff to: previous 1.213.2.9: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.9: +14 -4 lines
Pull up following revision(s) (requested by ozaki-r in ticket #788):

	sys/net/rtsock.c: revision 1.241

Fix a deadlock (rt_free vs. route_intr on rt_so_mtx)
It occurs only if NET_MPSAFE is enabled.

Revision 1.238.2.5: download - view: text, markup, annotated - select for diffs
Wed May 2 07:20:23 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.4: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.4: +14 -4 lines
Synch with HEAD

Revision 1.241: download - view: text, markup, annotated - select for diffs
Wed Apr 25 03:49:57 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502
Branch point for: phil-wifi
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +14 -4 lines
Fix a deadlock (rt_free vs. route_intr on rt_so_mtx)

It occurs only if NET_MPSAFE is enabled.

Revision 1.238.2.4: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:08 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.3: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.3: +20 -155 lines
Sync with HEAD, resolve some conflicts

Revision 1.213.2.9: download - view: text, markup, annotated - select for diffs
Sat Apr 14 10:16:19 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RC1
Diff to: previous 1.213.2.8: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.8: +20 -155 lines
Pull up following revision(s) (requested by ozaki-r in ticket #749):

	sys/net/if.h: revision 1.259
	sys/net/route.c: revision 1.209
	sys/net/route.h: revision 1.118
	sys/net/rtsock.c: revision 1.240

Resolve tangled lock dependencies in route.c

This change sweeps remaining lock decisions based on if locked or not by
moving utility functions of rtentry updates from rtsock.c and ensuring
holding the rt_lock.
It also improves the atomicity of a update of a rtentry.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Thu Apr 12 04:38:13 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-0422, pgoyette-compat-0415
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +20 -155 lines
Resolve tangled lock dependencies in route.c

This change sweeps remaining lock decisions based on if locked or not by moving
utility functions of rtentry updates from rtsock.c and ensuring holding the
rt_lock.  It also improves the atomicity of a update of a rtentry.

Revision 1.213.2.8: download - view: text, markup, annotated - select for diffs
Mon Apr 9 13:34:10 2018 UTC (6 years, 7 months ago) by bouyer
Branches: netbsd-8
Diff to: previous 1.213.2.7: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.7: +3 -2 lines
Pull up following revision(s) (requested by roy in ticket #724):
	tests/net/icmp/t_ping.c: revision 1.19
	sys/netinet6/raw_ip6.c: revision 1.166
	sys/netinet6/ip6_input.c: revision 1.195
	sys/net/raw_usrreq.c: revision 1.59
	sys/sys/socketvar.h: revision 1.151
	sys/kern/uipc_socket2.c: revision 1.128
	tests/lib/libc/sys/t_recvmmsg.c: revision 1.2
	lib/libc/sys/recv.2: revision 1.38
	sys/net/rtsock.c: revision 1.239
	sys/netinet/udp_usrreq.c: revision 1.246
	sys/netinet6/icmp6.c: revision 1.224
	tests/net/icmp/t_ping.c: revision 1.20
	sys/netipsec/keysock.c: revision 1.63
	sys/netinet/raw_ip.c: revision 1.172
	sys/kern/uipc_socket.c: revision 1.260
	tests/net/icmp/t_ping.c: revision 1.22
	sys/kern/uipc_socket.c: revision 1.261
	tests/net/icmp/t_ping.c: revision 1.23
	sys/netinet/ip_mroute.c: revision 1.155
	sbin/route/route.c: revision 1.159
	sys/netinet6/ip6_mroute.c: revision 1.123
	sys/netatalk/ddp_input.c: revision 1.31
	sys/netcan/can.c: revision 1.3
	sys/kern/uipc_usrreq.c: revision 1.184
	sys/netinet6/udp6_usrreq.c: revision 1.138
	tests/net/icmp/t_ping.c: revision 1.18
socket: report receive buffer overflows
Add soroverflow() which increments the overflow counter, sets so_error
to ENOBUFS and wakes the receive socket up.
Replace all code that manually increments this counter with soroverflow().
Add soroverflow() to raw_input().
This allows userland to detect route(4) overflows so it can re-sync
with the current state.
socket: clear error even when peeking
The error has already been reported and it's pointless requiring another
recv(2) call just to clear it.
socket: remove now incorrect comment that so_error is only udp
As it can be affected by route(4) sockets which are raw.
rtsock: log dropped messages that we cannot report to userland
Handle ENOBUFS when receiving messages.
Don't send messages if the receiver has died.
Sprinkle more soroverflow().
Handle ENOBUFS in recv
Handle ENOBUFS in sendto
Note value received. Harden another sendto for ENOBUFS.
Handle the routing socket overflowing gracefully.
Allow a valid sendto .... duh
Handle errors better.
Fix test for checking we sent all the data we asked to.

Revision 1.238.2.3: download - view: text, markup, annotated - select for diffs
Fri Mar 30 10:09:08 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.2: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.2: +9 -9 lines
Extract compat_14 stuff into its own module

Revision 1.238.2.2: download - view: text, markup, annotated - select for diffs
Thu Mar 22 01:44:51 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238.2.1: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.1: +3 -2 lines
Synch with HEAD, resolve conflicts

Revision 1.239: download - view: text, markup, annotated - select for diffs
Mon Mar 19 16:34:48 2018 UTC (6 years, 8 months ago) by roy
Branches: MAIN
CVS tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +3 -2 lines
rtsock: log dropped messages that we cannot report to userland

Revision 1.238.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 15 05:10:06 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +26 -14 lines
Create a separate module for COMPAT_70 code only, and untangle the
70 compat code from the current.

Revision 1.213.2.7: download - view: text, markup, annotated - select for diffs
Wed Feb 28 18:54:43 2018 UTC (6 years, 9 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.213.2.6: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.6: +8 -3 lines
Pull up following revision(s) (requested by mrg in ticket #595):
	sys/net/if.c: revision 1.398
	sys/net/rtsock.c: revision 1.231
remove useless cast, initialize family.
Avoid using a zero family mask.

Revision 1.213.2.6: download - view: text, markup, annotated - select for diffs
Sat Feb 3 22:07:26 2018 UTC (6 years, 10 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.213.2.5: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.5: +34 -2 lines
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.238: download - view: text, markup, annotated - select for diffs
Thu Jan 25 03:09:05 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +12 -2 lines
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.237: download - view: text, markup, annotated - select for diffs
Fri Jan 19 05:19:29 2018 UTC (6 years, 10 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +24 -2 lines
Release rt_so_mtx on updating a rtentry to avoid a deadlock with route_intr

The deadlock happened only if NET_MPSAFE on.

Revision 1.213.2.5: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:30:10 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.213.2.4: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.4: +18 -7 lines
Pull up following revision(s) (requested by ozaki-r in ticket #457):
	sys/net/rtsock.c: revision 1.233-1.234, 1.236
Protect ifp returned from route_output_get_ifa surely
An ifp returned from route_output_get_ifa was supposed to be protected
by a returned ifa; if the ifa belongs to ifp, holding the ifa prevents
the ifp from being freed. However route_output_get_ifa can return an ifp
to which a returned ifa doesn't belong. So we need to take a reference
to a returning ifp separately.
--
Fix a bug that tries to psref_acquire ifa with a psref used before
This fixes ATF tests that started to fail by a recent change to psref.
--
Fix compile error (may be used uninitialized)
Hmm, __noinline had hidden this error.

Revision 1.213.2.4: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:33 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.213.2.3: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.3: +4 -10 lines
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.236: download - view: text, markup, annotated - select for diffs
Mon Dec 18 05:35:36 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +3 -3 lines
Fix compile error (may be used uninitialized)

Hmm, __noinline had hidden this error.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Mon Dec 18 05:35:01 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +7 -7 lines
Revert "Spinkle __noinline to some non-performance-sensitive functions for debugging"

We should do this kind of tweaks for debugging just locally and personally.

Requested by christos@

Revision 1.234: download - view: text, markup, annotated - select for diffs
Thu Dec 14 05:48:59 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +3 -2 lines
Fix a bug that tries to psref_acquire ifa with a psref used before

This fixes ATF tests that started to fail by a recent change to psref.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Thu Dec 14 05:47:45 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +16 -6 lines
Protect ifp returned from route_output_get_ifa surely

An ifp returned from route_output_get_ifa was supposed to be protected
by a returned ifa; if the ifa belongs to ifp, holding the ifa prevents
the ifp from being freed. However route_output_get_ifa can return an ifp
to which a returned ifa doesn't belong. So we need to take a reference
to a returning ifp separately.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Thu Dec 14 05:43:14 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +7 -7 lines
Spinkle __noinline to some non-performance-sensitive functions for debugging

Revision 1.140.6.3: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:02 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.140.6.2: preferred, colored; branchpoint 1.140: preferred, colored; next MAIN 1.141: preferred, colored
Changes since revision 1.140.6.2: +878 -287 lines
update from HEAD

Revision 1.231: download - view: text, markup, annotated - select for diffs
Sun Nov 19 18:49:51 2017 UTC (7 years ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +8 -3 lines
Avoid using a zero family mask.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Fri Nov 17 07:37:12 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +4 -10 lines
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.213.2.3: download - view: text, markup, annotated - select for diffs
Sat Oct 21 19:43:54 2017 UTC (7 years, 1 month ago) by snj
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.213.2.2: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.2: +39 -6 lines
Pull up following revision(s) (requested by ozaki-r in ticket #300):
	crypto/dist/ipsec-tools/src/setkey/parse.y: 1.19
	crypto/dist/ipsec-tools/src/setkey/token.l: 1.20
	distrib/sets/lists/tests/mi: 1.754, 1.757, 1.759
	doc/TODO.smpnet: 1.12-1.13
	sys/net/pfkeyv2.h: 1.32
	sys/net/raw_cb.c: 1.23-1.24, 1.28
	sys/net/raw_cb.h: 1.28
	sys/net/raw_usrreq.c: 1.57-1.58
	sys/net/rtsock.c: 1.228-1.229
	sys/netinet/in_proto.c: 1.125
	sys/netinet/ip_input.c: 1.359-1.361
	sys/netinet/tcp_input.c: 1.359-1.360
	sys/netinet/tcp_output.c: 1.197
	sys/netinet/tcp_var.h: 1.178
	sys/netinet6/icmp6.c: 1.213
	sys/netinet6/in6_proto.c: 1.119
	sys/netinet6/ip6_forward.c: 1.88
	sys/netinet6/ip6_input.c: 1.181-1.182
	sys/netinet6/ip6_output.c: 1.193
	sys/netinet6/ip6protosw.h: 1.26
	sys/netipsec/ipsec.c: 1.100-1.122
	sys/netipsec/ipsec.h: 1.51-1.61
	sys/netipsec/ipsec6.h: 1.18-1.20
	sys/netipsec/ipsec_input.c: 1.44-1.51
	sys/netipsec/ipsec_netbsd.c: 1.41-1.45
	sys/netipsec/ipsec_output.c: 1.49-1.64
	sys/netipsec/ipsec_private.h: 1.5
	sys/netipsec/key.c: 1.164-1.234
	sys/netipsec/key.h: 1.20-1.32
	sys/netipsec/key_debug.c: 1.18-1.21
	sys/netipsec/key_debug.h: 1.9
	sys/netipsec/keydb.h: 1.16-1.20
	sys/netipsec/keysock.c: 1.59-1.62
	sys/netipsec/keysock.h: 1.10
	sys/netipsec/xform.h: 1.9-1.12
	sys/netipsec/xform_ah.c: 1.55-1.74
	sys/netipsec/xform_esp.c: 1.56-1.72
	sys/netipsec/xform_ipcomp.c: 1.39-1.53
	sys/netipsec/xform_ipip.c: 1.50-1.54
	sys/netipsec/xform_tcp.c: 1.12-1.16
	sys/rump/librump/rumpkern/Makefile.rumpkern: 1.170
	sys/rump/librump/rumpnet/net_stub.c: 1.27
	sys/sys/protosw.h: 1.67-1.68
	tests/net/carp/t_basic.sh: 1.7
	tests/net/if_gif/t_gif.sh: 1.11
	tests/net/if_l2tp/t_l2tp.sh: 1.3
	tests/net/ipsec/Makefile: 1.7-1.9
	tests/net/ipsec/algorithms.sh: 1.5
	tests/net/ipsec/common.sh: 1.4-1.6
	tests/net/ipsec/t_ipsec_ah_keys.sh: 1.2
	tests/net/ipsec/t_ipsec_esp_keys.sh: 1.2
	tests/net/ipsec/t_ipsec_gif.sh: 1.6-1.7
	tests/net/ipsec/t_ipsec_l2tp.sh: 1.6-1.7
	tests/net/ipsec/t_ipsec_misc.sh: 1.8-1.18
	tests/net/ipsec/t_ipsec_sockopt.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_tcp.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_transport.sh: 1.5-1.6
	tests/net/ipsec/t_ipsec_tunnel.sh: 1.9
	tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_tunnel_odd.sh: 1.3
	tests/net/mcast/t_mcast.sh: 1.6
	tests/net/net/t_ipaddress.sh: 1.11
	tests/net/net_common.sh: 1.20
	tests/net/npf/t_npf.sh: 1.3
	tests/net/route/t_flags.sh: 1.20
	tests/net/route/t_flags6.sh: 1.16
	usr.bin/netstat/fast_ipsec.c: 1.22
Do m_pullup before mtod

It may fix panicks of some tests on anita/sparc and anita/GuruPlug.
---
KNF
---
Enable DEBUG for babylon5
---
Apply C99-style struct initialization to xformsw
---
Tweak outputs of netstat -s for IPsec

- Get rid of "Fast"
- Use ipsec and ipsec6 for titles to clarify protocol
- Indent outputs of sub protocols

Original outputs were organized like this:

(Fast) IPsec:
IPsec ah:
IPsec esp:
IPsec ipip:
IPsec ipcomp:
(Fast) IPsec:
IPsec ah:
IPsec esp:
IPsec ipip:
IPsec ipcomp:

New outputs are organized like this:

ipsec:
	ah:
	esp:
	ipip:
	ipcomp:
ipsec6:
	ah:
	esp:
	ipip:
	ipcomp:
---
Add test cases for IPComp
---
Simplify IPSEC_OSTAT macro (NFC)
---
KNF; replace leading whitespaces with hard tabs
---
Introduce and use SADB_SASTATE_USABLE_P
---
KNF
---
Add update command for testing

Updating an SA (SADB_UPDATE) requires that a process issuing
SADB_UPDATE is the same as a process issued SADB_ADD (or SADB_GETSPI).
This means that update command must be used with add command in a
configuration of setkey. This usage is normally meaningless but
useful for testing (and debugging) purposes.
---
Add test cases for updating SA/SP

The tests require newly-added udpate command of setkey.
---
PR/52346: Frank Kardel: Fix checksumming for NAT-T
See XXX for improvements.
---
Remove codes for PACKET_TAG_IPSEC_IN_CRYPTO_DONE

It seems that PACKET_TAG_IPSEC_IN_CRYPTO_DONE is for network adapters
that have IPsec accelerators; a driver sets the mtag to a packet
when its device has already encrypted the packet.

Unfortunately no driver implements such offload features for long
years and seems unlikely to implement them soon. (Note that neither
FreeBSD nor Linux doesn't have such drivers.) Let's remove related
(unused) codes and simplify the IPsec code.
---
Fix usages of sadb_msg_errno
---
Avoid updating sav directly

On SADB_UPDATE a target sav was updated directly, which was unsafe.
Instead allocate another sav, copy variables of the old sav to
the new one and replace the old one with the new one.
---
Simplify; we can assume sav->tdb_xform cannot be NULL while it's valid
---
Rename key_alloc* functions (NFC)

We shouldn't use the term "alloc" for functions that just look up
data and actually don't allocate memory.
---
Use explicit_memset to surely zero-clear key_auth and key_enc
---
Make sure to clear keys on error paths of key_setsaval
---
Add missing KEY_FREESAV
---
Make sure a sav is inserted to a sah list after its initialization completes
---
Remove unnecessary zero-clearing codes from key_setsaval

key_setsaval is now used only for a newly-allocated sav. (It was
used to reset variables of an existing sav.)
---
Correct wrong assumption of sav->refcnt in key_delsah

A sav in a list is basically not to be sav->refcnt == 0. And also
KEY_FREESAV assumes sav->refcnt > 0.
---
Let key_getsavbyspi take a reference of a returning sav
---
Use time_mono_to_wall (NFC)
---
Separate sending message routine (NFC)
---
Simplify; remove unnecessary zero-clears

key_freesaval is used only when a target sav is being destroyed.
---
Omit NULL checks for sav->lft_c

sav->lft_c can be NULL only when initializing or destroying sav.
---
Omit unnecessary NULL checks for sav->sah
---
Omit unnecessary check of sav->state

key_allocsa_policy picks a sav of either MATURE or DYING so we
don't need to check its state again.
---
Simplify; omit unnecessary saidx passing

- ipsec_nextisr returns a saidx but no caller uses it
- key_checkrequest is passed a saidx but it can be gotton by
  another argument (isr)
---
Fix splx isn't called on some error paths
---
Fix header size calculation of esp where sav is NULL
---
Fix header size calculation of ah in the case sav is NULL

This fix was also needed for esp.
---
Pass sav directly to opencrypto callback

In a callback, use a passed sav as-is by default and look up a sav
only if the passed sav is dead.
---
Avoid examining freshness of sav on packet processing

If a sav list is sorted (by lft_c->sadb_lifetime_addtime) in advance,
we don't need to examine each sav and also don't need to delete one
on the fly and send up a message. Fortunately every sav lists are sorted
as we need.

Added key_validate_savlist validates that each sav list is surely sorted
(run only if DEBUG because it's not cheap).
---
Add test cases for SAs with different SPIs
---
Prepare to stop using isr->sav

isr is a shared resource and using isr->sav as a temporal storage
for each packet processing is racy. And also having a reference from
isr to sav makes the lifetime of sav non-deterministic; such a reference
is removed when a packet is processed and isr->sav is overwritten by
new one. Let's have a sav locally for each packet processing instead of
using shared isr->sav.

However this change doesn't stop using isr->sav yet because there are
some users of isr->sav. isr->sav will be removed after the users find
a way to not use isr->sav.
---
Fix wrong argument handling
---
fix printf format.
---
Don't validate sav lists of LARVAL or DEAD states

We don't sort the lists so the validation will always fail.

Fix PR kern/52405
---
Make sure to sort the list when changing the state by key_sa_chgstate
---
Rename key_allocsa_policy to key_lookup_sa_bysaidx
---
Separate test files
---
Calculate ah_max_authsize on initialization as well as esp_max_ivlen
---
Remove m_tag_find(PACKET_TAG_IPSEC_PENDING_TDB) because nobody sets the tag
---
Restore a comment removed in previous

The comment is valid for the below code.
---
Make tests more stable

sleep command seems to wait longer than expected on anita so
use polling to wait for a state change.
---
Add tests that explicitly delete SAs instead of waiting for expirations
---
Remove invalid M_AUTHIPDGM check on ESP isr->sav

M_AUTHIPDGM flag is set to a mbuf in ah_input_cb. An sav of ESP can
have AH authentication as sav->tdb_authalgxform. However, in that
case esp_input and esp_input_cb are used to do ESP decryption and
AH authentication and M_AUTHIPDGM never be set to a mbuf. So
checking M_AUTHIPDGM of a mbuf on isr->sav of ESP is meaningless.
---
Look up sav instead of relying on unstable sp->req->sav

This code is executed only in an error path so an additional lookup
doesn't matter.
---
Correct a comment
---
Don't release sav if calling crypto_dispatch again
---
Remove extra KEY_FREESAV from ipsec_process_done

It should be done by the caller.
---
Don't bother the case of crp->crp_buf == NULL in callbacks
---
Hold a reference to an SP during opencrypto processing

An SP has a list of isr (ipsecrequest) that represents a sequence
of IPsec encryption/authentication processing. One isr corresponds
to one opencrypto processing. The lifetime of an isr follows its SP.

We pass an isr to a callback function of opencrypto to continue
to a next encryption/authentication processing. However nobody
guaranteed that the isr wasn't freed, i.e., its SP wasn't destroyed.

In order to avoid such unexpected destruction of isr, hold a reference
to its SP during opencrypto processing.
---
Don't make SAs expired on tests that delete SAs explicitly
---
Fix a debug message
---
Dedup error paths (NFC)
---
Use pool to allocate tdb_crypto

For ESP and AH, we need to allocate an extra variable space in addition
to struct tdb_crypto. The fixed size of pool items may be larger than
an actual requisite size of a buffer, but still the performance
improvement by replacing malloc with pool wins.
---
Don't use unstable isr->sav for header size calculations

We may need to optimize to not look up sav here for users that
don't need to know an exact size of headers (e.g., TCP segmemt size
caclulation).
---
Don't use sp->req->sav when handling NAT-T ESP fragmentation

In order to do this we need to look up a sav however an additional
look-up degrades performance. A sav is later looked up in
ipsec4_process_packet so delay the fragmentation check until then
to avoid an extra look-up.
---
Don't use key_lookup_sp that depends on unstable sp->req->sav

It provided a fast look-up of SP. We will provide an alternative
method in the future (after basic MP-ification finishes).
---
Stop setting isr->sav on looking up sav in key_checkrequest
---
Remove ipsecrequest#sav
---
Stop setting mtag of PACKET_TAG_IPSEC_IN_DONE because there is no users anymore
---
Skip ipsec_spi_*_*_preferred_new_timeout when running on qemu

Probably due to PR 43997
---
Add localcount to rump kernels
---
Remove unused macro
---
Fix key_getcomb_setlifetime

The fix adjusts a soft limit to be 80% of a corresponding hard limit.

I'm not sure the fix is really correct though, at least the original
code is wrong. A passed comb is zero-cleared before calling
key_getcomb_setlifetime, so
  comb->sadb_comb_soft_addtime = comb->sadb_comb_soft_addtime * 80 / 100;
is meaningless.
---
Provide and apply key_sp_refcnt (NFC)

It simplifies further changes.
---
Fix indentation

Pointed out by knakahara@
---
Use pslist(9) for sptree
---
Don't acquire global locks for IPsec if NET_MPSAFE

Note that the change is just to make testing easy and IPsec isn't MP-safe yet.
---
Let PF_KEY socks hold their own lock instead of softnet_lock

Operations on SAD and SPD are executed via PF_KEY socks. The operations
include deletions of SAs and SPs that will use synchronization mechanisms
such as pserialize_perform to wait for references to SAs and SPs to be
released. It is known that using such mechanisms with holding softnet_lock
causes a dead lock. We should avoid the situation.
---
Make IPsec SPD MP-safe

We use localcount(9), not psref(9), to make the sptree and secpolicy (SP)
entries MP-safe because SPs need to be referenced over opencrypto
processing that executes a callback in a different context.

SPs on sockets aren't managed by the sptree and can be destroyed in softint.
localcount_drain cannot be used in softint so we delay the destruction of
such SPs to a thread context. To do so, a list to manage such SPs is added
(key_socksplist) and key_timehandler_spd deletes dead SPs in the list.

For more details please read the locking notes in key.c.

Proposed on tech-kern@ and tech-net@
---
Fix updating ipsec_used

- key_update_used wasn't called in key_api_spddelete2 and key_api_spdflush
- key_update_used wasn't called if an SP had been added/deleted but
  a reply to userland failed
---
Fix updating ipsec_used; turn on when SPs on sockets are added
---
Add missing IPsec policy checks to icmp6_rip6_input

icmp6_rip6_input is quite similar to rip6_input and the same checks exist
in rip6_input.
---
Add test cases for setsockopt(IP_IPSEC_POLICY)
---
Don't use KEY_NEWSP for dummy SP entries

By the change KEY_NEWSP is now not called from softint anymore
and we can use kmem_zalloc with KM_SLEEP for KEY_NEWSP.
---
Comment out unused functions
---
Add test cases that there are SPs but no relevant SAs
---
Don't allow sav->lft_c to be NULL

lft_c of an sav that was created by SADB_GETSPI could be NULL.
---
Clean up clunky eval strings

- Remove unnecessary \ at EOL
  - This allows to omit ; too
- Remove unnecessary quotes for arguments of atf_set
- Don't expand $DEBUG in eval
  - We expect it's expanded on execution

Suggested by kre@
---
Remove unnecessary KEY_FREESAV in an error path

sav should be freed (unreferenced) by the caller.
---
Use pslist(9) for sahtree
---
Use pslist(9) for sah->savtree
---
Rename local variable newsah to sah

It may not be new.
---
MP-ify SAD slightly

- Introduce key_sa_mtx and use it for some list operations
- Use pserialize for some list iterations
---
Introduce KEY_SA_UNREF and replace KEY_FREESAV with it where sav will never be actually freed in the future

KEY_SA_UNREF is still key_freesav so no functional change for now.

This change reduces diff of further changes.
---
Remove out-of-date log output

Pointed out by riastradh@
---
Use KDASSERT instead of KASSERT for mutex_ownable

Because mutex_ownable is too heavy to run in a fast path
even for DIAGNOSTIC + LOCKDEBUG.

Suggested by riastradh@
---
Assemble global lists and related locks into cache lines (NFCI)

Also rename variable names from *tree to *list because they are
just lists, not trees.

Suggested by riastradh@
---
Move locking notes
---
Update the locking notes

- Add locking order
- Add locking notes for misc lists such as reglist
- Mention pserialize, key_sp_ref and key_sp_unref on SP operations

Requested by riastradh@
---
Describe constraints of key_sp_ref and key_sp_unref

Requested by riastradh@
---
Hold key_sad.lock on SAVLIST_WRITER_INSERT_TAIL
---
Add __read_mostly to key_psz

Suggested by riastradh@
---
Tweak wording (pserialize critical section => pserialize read section)

Suggested by riastradh@
---
Add missing mutex_exit
---
Fix setkey -D -P outputs

The outputs were tweaked (by me), but I forgot updating libipsec
in my local ATF environment...
---
MP-ify SAD (key_sad.sahlist and sah entries)

localcount(9) is used to protect key_sad.sahlist and sah entries
as well as SPD (and will be used for SAD sav).

Please read the locking notes of SAD for more details.
---
Introduce key_sa_refcnt and replace sav->refcnt with it (NFC)
---
Destroy sav only in the loop for DEAD sav
---
Fix KASSERT(solocked(sb->sb_so)) failure in sbappendaddr that is called eventually from key_sendup_mbuf

If key_sendup_mbuf isn't passed a socket, the assertion fails.
Originally in this case sb->sb_so was softnet_lock and callers
held softnet_lock so the assertion was magically satisfied.
Now sb->sb_so is key_so_mtx and also softnet_lock isn't always
held by callers so the assertion can fail.

Fix it by holding key_so_mtx if key_sendup_mbuf isn't passed a socket.

Reported by knakahara@
Tested by knakahara@ and ozaki-r@
---
Fix locking notes of SAD
---
Fix deadlock between key_sendup_mbuf called from key_acquire and localcount_drain

If we call key_sendup_mbuf from key_acquire that is called on packet
processing, a deadlock can happen like this:
- At key_acquire, a reference to an SP (and an SA) is held
- key_sendup_mbuf will try to take key_so_mtx
- Some other thread may try to localcount_drain to the SP with
  holding key_so_mtx in say key_api_spdflush
- In this case localcount_drain never return because key_sendup_mbuf
  that has stuck on key_so_mtx never release a reference to the SP

Fix the deadlock by deferring key_sendup_mbuf to the timer
(key_timehandler).
---
Fix that prev isn't cleared on retry
---
Limit the number of mbufs queued for deferred key_sendup_mbuf

It's easy to be queued hundreds of mbufs on the list under heavy
network load.
---
MP-ify SAD (savlist)

localcount(9) is used to protect savlist of sah. The basic design is
similar to MP-ifications of SPD and SAD sahlist. Please read the
locking notes of SAD for more details.
---
Simplify ipsec_reinject_ipstack (NFC)
---
Add per-CPU rtcache to ipsec_reinject_ipstack

It reduces route lookups and also reduces rtcache lock contentions
when NET_MPSAFE is enabled.
---
Use pool_cache(9) instead of pool(9) for tdb_crypto objects

The change improves network throughput especially on multi-core systems.
---
Update

ipsec(4), opencrypto(9) and vlan(4) are now MP-safe.
---
Write known issues on scalability
---
Share a global dummy SP between PCBs

It's never be changed so it can be pre-allocated and shared safely between PCBs.
---
Fix race condition on the rawcb list shared by rtsock and keysock

keysock now protects itself by its own mutex, which means that
the rawcb list is protected by two different mutexes (keysock's one
and softnet_lock for rtsock), of course it's useless.

Fix the situation by having a discrete rawcb list for each.
---
Use a dedicated mutex for rt_rawcb instead of softnet_lock if NET_MPSAFE
---
fix localcount leak in sav. fixed by ozaki-r@n.o.

I commit on behalf of him.
---
remove unnecessary comment.
---
Fix deadlock between pserialize_perform and localcount_drain

A typical ussage of localcount_drain looks like this:

  mutex_enter(&mtx);
  item = remove_from_list();
  pserialize_perform(psz);
  localcount_drain(&item->localcount, &cv, &mtx);
  mutex_exit(&mtx);

This sequence can cause a deadlock which happens for example on the following
situation:

- Thread A calls localcount_drain which calls xc_broadcast after releasing
  a specified mutex
- Thread B enters the sequence and calls pserialize_perform with holding
  the mutex while pserialize_perform also calls xc_broadcast
- Thread C (xc_thread) that calls an xcall callback of localcount_drain tries
  to hold the mutex

xc_broadcast of thread B doesn't start until xc_broadcast of thread A
finishes, which is a feature of xcall(9). This means that pserialize_perform
never complete until xc_broadcast of thread A finishes. On the other hand,
thread C that is a callee of xc_broadcast of thread A sticks on the mutex.
Finally the threads block each other (A blocks B, B blocks C and C blocks A).

A possible fix is to serialize executions of the above sequence by another
mutex, but adding another mutex makes the code complex, so fix the deadlock
by another way; the fix is to release the mutex before pserialize_perform
and instead use a condvar to prevent pserialize_perform from being called
simultaneously.

Note that the deadlock has happened only if NET_MPSAFE is enabled.
---
Add missing ifdef NET_MPSAFE
---
Take softnet_lock on pr_input properly if NET_MPSAFE

Currently softnet_lock is taken unnecessarily in some cases, e.g.,
icmp_input and encap4_input from ip_input, or not taken even if needed,
e.g., udp_input and tcp_input from ipsec4_common_input_cb. Fix them.

NFC if NET_MPSAFE is disabled (default).
---
- sanitize key debugging so that we don't print extra newlines or unassociated
  debugging messages.
- remove unused functions and make internal ones static
- print information in one line per message
---
humanize printing of ip addresses
---
cast reduction, NFC.
---
Fix typo in comment
---
Pull out ipsec_fill_saidx_bymbuf (NFC)
---
Don't abuse key_checkrequest just for looking up sav

It does more than expected for example key_acquire.
---
Fix SP is broken on transport mode

isr->saidx was modified accidentally in ipsec_nextisr.

Reported by christos@
Helped investigations by christos@ and knakahara@
---
Constify isr at many places (NFC)
---
Include socketvar.h for softnet_lock
---
Fix buffer length for ipsec_logsastr

Revision 1.229: download - view: text, markup, annotated - select for diffs
Mon Sep 25 01:57:54 2017 UTC (7 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +28 -2 lines
Use a dedicated mutex for rt_rawcb instead of softnet_lock if NET_MPSAFE

Revision 1.228: download - view: text, markup, annotated - select for diffs
Mon Sep 25 01:56:22 2017 UTC (7 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +13 -6 lines
Fix race condition on the rawcb list shared by rtsock and keysock

keysock now protects itself by its own mutex, which means that
the rawcb list is protected by two different mutexes (keysock's one
and softnet_lock for rtsock), of course it's useless.

Fix the situation by having a discrete rawcb list for each.

Revision 1.164.2.12: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:11 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.11: preferred, colored; branchpoint 1.164: preferred, colored; next MAIN 1.165: preferred, colored
Changes since revision 1.164.2.11: +262 -72 lines
Sync with HEAD

Revision 1.213.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 25 01:55:21 2017 UTC (7 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.213.2.1: preferred, colored; branchpoint 1.213: preferred, colored
Changes since revision 1.213.2.1: +22 -2 lines
Pull up following revision(s) (requested by ozaki-r in ticket #140):
	sys/kern/uipc_domain.c: 1.97-1.99
	sys/net/rtsock.c: 1.225-1.227
	sys/sys/socket.h: 1.123
Restore the original length of a sockaddr for netmask
route(8) passes a sockaddr for netmask that is truncated with its
prefixlen. However the kernel basically doesn't expect such format
and may read beyond the data. So restore the original length of the
the data at the beginning of the kernel for the rest components.
Failures of ATF tests such as route_flags_blackhole6 should
be fixed.
--
Avoid DIAGNOSTIC warning with previous fix and simplify it (don't require
memory alloc/free).
--
put the code that returns the sizeof the socket by family in one place.
--
don't warn about AF_LINK sockets with sa_len less than the size of the sockaddr
--
don't print diagnostic for AF_LINK

Revision 1.213.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 7 13:57:26 2017 UTC (7 years, 4 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +85 -27 lines
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.227: download - view: text, markup, annotated - select for diffs
Sat Jul 1 16:59:12 2017 UTC (7 years, 5 months ago) by christos
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +6 -22 lines
put the code that returns the sizeof the socket by family in one place.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Jun 30 18:28:31 2017 UTC (7 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +31 -33 lines
Avoid DIAGNOSTIC warning with previous fix and simplify it (don't require
memory alloc/free).

Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Jun 30 09:11:22 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +40 -2 lines
Restore the original length of a sockaddr for netmask

route(8) passes a sockaddr for netmask that is truncated with its
prefixlen. However the kernel basically doesn't expect such format
and may read beyond the data. So restore the original length of the
the data at the beginning of the kernel for the rest components.

Failures of ATF tests such as route_flags_blackhole6 should
be fixed.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Wed Jun 28 04:14:53 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +18 -6 lines
Restore ARP/NDP entries to route show and netstat -r

Requested by dyoung@ some time ago

Revision 1.223: download - view: text, markup, annotated - select for diffs
Mon Jun 26 06:59:56 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +3 -2 lines
Drop RTF_UP from a routing message of a deleted ARP/NDP entry

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Jun 26 06:58:42 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +10 -10 lines
Fix ifdef; care about a case w/ INET6 and w/o INET

Revision 1.221: download - view: text, markup, annotated - select for diffs
Mon Jun 26 03:16:28 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +2 -4 lines
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry

A message originally included only DST and GATEWAY. Restore it.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Mon Jun 26 03:13:40 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +5 -3 lines
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.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Fri Jun 23 05:46:10 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +5 -5 lines
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

Revision 1.218: download - view: text, markup, annotated - select for diffs
Fri Jun 23 04:27:55 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +4 -2 lines
Fix build of kernels without both INET and INET6

Revision 1.217: download - view: text, markup, annotated - select for diffs
Thu Jun 22 09:58:04 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +12 -4 lines
Purge L2 caches on changing an interface of a route

The change addresses situations similar to PR 51179.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri Jun 16 02:26:17 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +3 -2 lines
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries

ARP/NDP entries aren't connected routes.

Reported by ryo@

Revision 1.215: download - view: text, markup, annotated - select for diffs
Fri Jun 16 02:24:54 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +40 -2 lines
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@

Revision 1.214: download - view: text, markup, annotated - select for diffs
Thu Jun 15 02:51:45 2017 UTC (7 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +5 -9 lines
Simplify

We can assume that rt_ifp is always non-NULL.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:14 2017 UTC (7 years, 6 months ago) by chs
Branches: MAIN
CVS tags: netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +3 -6 lines
remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.191.2.6: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:29 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191.2.5: preferred, colored; branchpoint 1.191: preferred, colored; next MAIN 1.192: preferred, colored
Changes since revision 1.191.2.5: +125 -22 lines
Sync with HEAD

Revision 1.199.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:05 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199: +165 -45 lines
Sync with HEAD

Revision 1.212: download - view: text, markup, annotated - select for diffs
Tue Apr 11 13:55:55 2017 UTC (7 years, 7 months ago) by roy
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, bouyer-socketcan-base1
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +99 -5 lines
Add RO_MSGFILTER socket option to PF_ROUTE to filter out
un-wanted route(4) messages.

Inspired by the ROUTE_MSGFILTER equivalent in OpenBSD,
but with an API which allows the full range of potential message types.

Revision 1.211: download - view: text, markup, annotated - select for diffs
Fri Mar 24 03:45:02 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +17 -10 lines
Forbit installing a route which its gateway is unreachable

This change needs a tweak in route_output_change to unbreak route
change commands (e.g., route change -inet6 default -reject).

PR kern/52077 (s-yamaguchi@IIJ and ozaki-r@)

Revision 1.210: download - view: text, markup, annotated - select for diffs
Wed Mar 22 07:14:18 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +13 -11 lines
Tweak and KNF some functions

Revision 1.191.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:50 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191.2.4: preferred, colored; branchpoint 1.191: preferred, colored
Changes since revision 1.191.2.4: +41 -37 lines
Sync with HEAD

Revision 1.209: download - view: text, markup, annotated - select for diffs
Fri Mar 17 10:05:02 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +4 -4 lines
Add missing NULL check

Fix PR kern/52083

Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Mar 14 09:39:28 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +5 -3 lines
Add missing pserialize_read_exit

Pointed out by riastradh@

Revision 1.207: download - view: text, markup, annotated - select for diffs
Tue Mar 14 09:03:08 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +5 -5 lines
Use if_acquire and if_release instead of using psref API directly

- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static

Revision 1.206: download - view: text, markup, annotated - select for diffs
Tue Mar 14 08:35:55 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +4 -3 lines
Fix use of curlwp_bind

There was an error path that returned without curlwp_bindx.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Tue Mar 14 08:11:09 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +14 -3 lines
Fix race condition in sysctl_iflist

We need to use psref for the ifa iteration because iflist_addr can sleep.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Tue Mar 14 04:25:10 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +3 -6 lines
Replace DIAGNOSTIC + panic with KASSERT

Revision 1.203: download - view: text, markup, annotated - select for diffs
Tue Mar 14 04:23:15 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +10 -10 lines
Avoid debug printf just if DIAGNOSTIC

Revision 1.202: download - view: text, markup, annotated - select for diffs
Tue Feb 21 04:00:01 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +6 -6 lines
Use kmem instead of malloc

Revision 1.201: download - view: text, markup, annotated - select for diffs
Fri Feb 17 02:56:53 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +3 -2 lines
Fill rmx_locks too

Otherwise userland sees garbage in it.

This should fix t_mtudisc6 failing on babylon5.

Revision 1.164.2.11: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:58 2017 UTC (7 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.10: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.10: +25 -8 lines
Sync with HEAD

Revision 1.200: download - view: text, markup, annotated - select for diffs
Thu Jan 19 06:58:55 2017 UTC (7 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +7 -2 lines
Disable rt_update mechanism by default

This is a workaround for PR kern/51877. Enable again once the issue
is fixed.

Revision 1.191.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:50 2017 UTC (7 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191.2.3: preferred, colored; branchpoint 1.191: preferred, colored
Changes since revision 1.191.2.3: +21 -9 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.199: download - view: text, markup, annotated - select for diffs
Mon Dec 12 03:55:57 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +21 -9 lines
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.164.2.10: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:27 2016 UTC (8 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.9: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.9: +73 -68 lines
Sync with HEAD

Revision 1.191.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:21 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191.2.2: preferred, colored; branchpoint 1.191: preferred, colored
Changes since revision 1.191.2.2: +235 -85 lines
Sync with HEAD

Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Oct 26 06:49:10 2016 UTC (8 years, 1 month ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +73 -68 lines
Pull RTM_CHANGE code out of route_output to make further changes easy

No functional change.

Revision 1.164.2.9: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:08 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.8: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.8: +250 -110 lines
Sync with HEAD

Revision 1.197: download - view: text, markup, annotated - select for diffs
Mon Oct 3 11:06:06 2016 UTC (8 years, 2 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20161004
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +14 -10 lines
Fix race condition on ifqueue used by traditional netisr

If a underlying network device driver supports MSI/MSI-X, RX interrupts
can be delivered to arbitrary CPUs. This means that Layer 2 subroutines
such as ether_input (softint) and subsequent Layer 3 subroutines (softint)
which are called via traditional netisr can be dispatched on an arbitrary
CPU. Layer 2 subroutines now run without any locks (expected) and so a
Layer 2 subroutine and a Layer 3 subroutine can run in parallel.

There is a shared data between a Layer 2 routine and a Layer 3 routine,
that is ifqueue and IF_ENQUEUE (from L2) and IF_DEQUEUE (from L3) on it
are racy now.

To fix the race condition, use ifqueue#ifq_lock to protect ifqueue
instead of splnet that is meaningless now.

The same race condition exists in route_intr. Fix it as well.

Reviewed by knakahara@

Revision 1.196: download - view: text, markup, annotated - select for diffs
Wed Sep 21 10:50:22 2016 UTC (8 years, 2 months ago) by roy
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +89 -13 lines
Add ifam_pid and ifam_addrflags to ifa_msghdr.
Re-version RTM_NEWADDR, RTM_DELADDR, RTM_CHGADDR and NET_RT_IFLIST.
Add compat code for old version.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Thu Sep 1 19:04:30 2016 UTC (8 years, 3 months ago) by roy
Branches: MAIN
CVS tags: localcount-20160914
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +72 -68 lines
Split out sysctl_iflist into sysctl_iflist_if and sysctl_iflist_addr.
Setup a command and function pointer in one case statement
instead of having a seconary case statement within a loop.
This makes the code much easier to follow, and possibly to add more compat
in the future.

Don't panic when running an old binary without compat support.

Revision 1.191.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:10 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191.2.1: preferred, colored; branchpoint 1.191: preferred, colored
Changes since revision 1.191.2.1: +49 -23 lines
Sync with HEAD

Revision 1.194: download - view: text, markup, annotated - select for diffs
Mon Aug 1 03:15:30 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160806
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +47 -21 lines
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.193: download - view: text, markup, annotated - select for diffs
Thu Jul 28 07:54:31 2016 UTC (8 years, 4 months ago) by martin
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +4 -4 lines
PR kern/51371: avoid shifting negative values

Revision 1.191.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:23 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +50 -20 lines
Sync with HEAD

Revision 1.192: download - view: text, markup, annotated - select for diffs
Thu Jul 21 03:45:56 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +50 -20 lines
Make complex RTM_CHANGE code understandable

Tests for route change added recently would reduce the possibility of
regressions.

Reviewed by ryo@

Revision 1.164.2.8: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:21 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.7: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.7: +8 -9 lines
Sync with HEAD

Revision 1.191: download - view: text, markup, annotated - select for diffs
Thu Jul 7 09:32:02 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +4 -4 lines
Switch the address list of intefaces to pslist(9)

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

Revision 1.190: download - view: text, markup, annotated - select for diffs
Thu Jun 16 02:38:40 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -6 lines
Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND

Revision 1.189: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:16 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -3 lines
Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.164.2.7: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:38 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.6: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.6: +137 -78 lines
Sync with HEAD

Revision 1.188: download - view: text, markup, annotated - select for diffs
Tue May 17 15:21:14 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +7 -7 lines
Fix RT_IN_PRINT

Revision 1.187: download - view: text, markup, annotated - select for diffs
Tue May 17 12:58:21 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +92 -63 lines
Tidy up route_output

Avoid jumping into the middle of a switch statement, use a function instead.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Thu May 12 02:24:16 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +30 -9 lines
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.185: download - view: text, markup, annotated - select for diffs
Mon Apr 25 15:43:49 2016 UTC (8 years, 7 months ago) by roy
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +4 -2 lines
Set rtm_pid = curproc->p_pid for a few more messages.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Mon Apr 25 14:38:08 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +8 -4 lines
Check error of rt_setgate and rt_settag

Revision 1.183: download - view: text, markup, annotated - select for diffs
Mon Apr 25 10:55:01 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +8 -5 lines
Fix errno on rt_setgate error

I bet it's not EDQUOT (Disc quota exceeded).

Revision 1.164.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:17 2016 UTC (8 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.5: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.5: +172 -6 lines
Sync with HEAD

Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri Apr 8 12:01:22 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -4 lines
- remove printf
- fix indent

Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Apr 7 21:41:02 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +11 -17 lines
Use sockaddr_dl_init

Revision 1.180: download - view: text, markup, annotated - select for diffs
Wed Apr 6 17:34:33 2016 UTC (8 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +9 -4 lines
Don't interpret routing requests by interface index as arp entry additions!

Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Apr 5 10:03:33 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +10 -2 lines
Unbreak build of kernels without INET

Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon Apr 4 07:37:07 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +166 -6 lines
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.164.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:32 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.4: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.4: +8 -12 lines
Sync with HEAD

Revision 1.177: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:41:29 2016 UTC (8 years, 10 months ago) by riastradh
Branches: MAIN
CVS tags: nick-nhusb-base-20160319
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +3 -2 lines
Revert previous: ran cvs commit when I meant cvs diff.  Sorry!

Hit up-arrow one too few times.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Thu Jan 21 15:27:48 2016 UTC (8 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +4 -5 lines
Give proper prototype to ip_output.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Wed Jan 20 21:43:59 2016 UTC (8 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +8 -12 lines
Eliminate struct protosw::pr_output.

You can't use this unless you know what it is a priori: the formal
prototype is variadic, and the different instances (e.g., ip_output,
route_output) have different real prototypes.

Convert the only user of it, raw_send in net/raw_cb.c, to take an
explicit callback argument.  Convert the only instances of it,
route_output and key_output, to such explicit callbacks for raw_send.
Use assertions to make sure the conversion to explicit callbacks is
warranted.

Discussed on tech-net with no objections:
https://mail-index.netbsd.org/tech-net/2016/01/16/msg005484.html

Revision 1.164.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:07 2015 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.3: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.3: +16 -2 lines
Sync with HEAD (as of 26th Dec)

Revision 1.174: download - view: text, markup, annotated - select for diffs
Tue Oct 13 21:28:34 2015 UTC (9 years, 1 month ago) by rjs
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +16 -2 lines
Add core networking support for SCTP.

Revision 1.164.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:10 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.2: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.2: +12 -7 lines
Sync with HEAD

Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri Aug 7 08:11:33 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +8 -4 lines
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.172: download - view: text, markup, annotated - select for diffs
Fri Jul 17 02:21:08 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +6 -5 lines
Reform use of rt_refcnt

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

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

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

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

Revision 1.164.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:25 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164.2.1: preferred, colored; branchpoint 1.164: preferred, colored
Changes since revision 1.164.2.1: +7 -41 lines
Sync with HEAD

Revision 1.171: download - view: text, markup, annotated - select for diffs
Sat May 2 17:18:03 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +4 -4 lines
make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}

Revision 1.170: download - view: text, markup, annotated - select for diffs
Sun Apr 26 21:40:48 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +2 -36 lines
remove pr_generic from struct pr_usrreqs and all implementations of
pr_generic in protocols.

bump to 7.99.13

approved by rmind@

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Apr 24 22:32:37 2015 UTC (9 years, 7 months ago) by rtr
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +5 -5 lines
make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19

Revision 1.164.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:22 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +19 -16 lines
Sync with HEAD

Revision 1.168: download - view: text, markup, annotated - select for diffs
Mon Apr 6 06:26:21 2015 UTC (9 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +4 -4 lines
Add hint comments for big ifdef

Revision 1.167: download - view: text, markup, annotated - select for diffs
Fri Apr 3 20:01:07 2015 UTC (9 years, 8 months ago) by rtr
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +3 -3 lines
* change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

Patch posted to tech-net@
  http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html

The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.

Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@

Revision 1.166: download - view: text, markup, annotated - select for diffs
Tue Dec 2 21:28:31 2014 UTC (10 years ago) by christos
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +4 -4 lines
fix debugging printf.

Revision 1.165: download - view: text, markup, annotated - select for diffs
Tue Dec 2 20:25:48 2014 UTC (10 years ago) by christos
Branches: MAIN
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +15 -12 lines
use the new printing code.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Fri Sep 5 06:00:05 2014 UTC (10 years, 3 months ago) by matt
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +3 -4 lines
Don't use C++ new keyword

Revision 1.140.6.2: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:35 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.140.6.1: preferred, colored; branchpoint 1.140: preferred, colored
Changes since revision 1.140.6.1: +280 -48 lines
Rebase to HEAD as of a few days ago.

Revision 1.143.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:16 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.143: preferred, colored; next MAIN 1.144: preferred, colored
Changes since revision 1.143: +281 -44 lines
Rebase.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Sat Aug 9 05:33:01 2014 UTC (10 years, 3 months ago) by rtr
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0, netbsd-7
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +22 -2 lines
split PRU_CONNECT2 & PRU_PURGEIF function out of pr_generic() usrreq
switches and put into separate functions

  - always KASSERT(solocked(so)) even if not implemented
    (for PRU_CONNECT2 only)

  - replace calls to pr_generic() with req = PRU_CONNECT2 with calls to
    pr_connect2()

  - replace calls to pr_generic() with req = PRU_PURGEIF with calls to
    pr_purgeif()

put common code from unp_connect2() (used by unp_connect() into
unp_connect1() and call out to it when needed

patch only briefly reviewed by rmind@

Revision 1.162: download - view: text, markup, annotated - select for diffs
Fri Aug 8 03:05:45 2014 UTC (10 years, 3 months ago) by rtr
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +12 -2 lines
split PRU_RCVD function out of pr_generic() usrreq switches and put into
separate functions

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_RCVD with calls to
    pr_rcvd()

Revision 1.161: download - view: text, markup, annotated - select for diffs
Tue Aug 5 07:55:31 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +20 -2 lines
split PRU_SEND function out of pr_generic() usrreq switches and put into
separate functions

   xxx_send(struct socket *, struct mbuf *, struct mbuf *,
       struct mbuf *, struct lwp *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_SEND with calls to
    pr_send()

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_send() PRUs

  - l2cap_send() -> l2cap_send_pcb()
  - sco_send() -> sco_send_pcb()
  - rfcomm_send() -> rfcomm_send_pcb()

patch reviewed by rmind

Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue Aug 5 05:24:26 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +5 -5 lines
revert the removal of struct lwp * parameter from bind, listen and connect
user requests.

this should resolve the issue relating to nfs client hangs presented
recently by wiz on current-users@

Revision 1.159: download - view: text, markup, annotated - select for diffs
Thu Jul 31 03:39:35 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +51 -2 lines
split PRU_DISCONNECT, PRU_SHUTDOWN and PRU_ABORT function out of
pr_generic() usrreq switches and put into separate functions

   xxx_disconnect(struct socket *)
   xxx_shutdown(struct socket *)
   xxx_abort(struct socket *)

   - always KASSERT(solocked(so)) even if not implemented
   - replace calls to pr_generic() with req =
PRU_{DISCONNECT,SHUTDOWN,ABORT}
     with calls to pr_{disconnect,shutdown,abort}() respectively

rename existing internal functions used to implement above functionality
to permit use of the names for xxx_{disconnect,shutdown,abort}().

   - {l2cap,sco,rfcomm}_disconnect() ->
{l2cap,sco,rfcomm}_disconnect_pcb()
   - {unp,rip,tcp}_disconnect() -> {unp,rip,tcp}_disconnect1()
   - unp_shutdown() -> unp_shutdown1()

patch reviewed by rmind

Revision 1.158: download - view: text, markup, annotated - select for diffs
Wed Jul 30 10:04:26 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +12 -2 lines
split PRU_CONNECT function out of pr_generic() usrreq switches and put
into seaparate functions

  xxx_listen(struct socket *, struct mbuf *)

  - always KASSERT(solocked(so)) and KASSERT(nam != NULL)
  - replace calls to pr_generic() with req = PRU_CONNECT with
    pr_connect()
  - rename existin {l2cap,sco,rfcomm}_connect() to
    {l2cap,sco,rfcomm}_connect_pcb() respectively to permit
    naming consistency with other protocols functions.
  - drop struct lwp * parameter from unp_connect() and at_pcbconnect()
    and use curlwp instead where appropriate.

patch reviewed by rmind

Revision 1.157: download - view: text, markup, annotated - select for diffs
Thu Jul 24 15:12:03 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +23 -3 lines
split PRU_BIND and PRU_LISTEN function out of pr_generic() usrreq
switches and put into separate functions
  xxx_bind(struct socket *, struct mbuf *)
  xxx_listen(struct socket *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_BIND with call to
    pr_bind()

  - replace calls to pr_generic() with req = PRU_LISTEN with call to
    pr_listen()

  - drop struct lwp * parameter from at_pcbsetaddr(), in_pcbbind() and
    unp_bind() and always use curlwp.

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_{bind,listen}() PRUs

  - l2cap_{bind,listen}() -> l2cap_{bind,listen}_pcb()
  - sco_{bind,listen}() -> sco_{bind,listen}_pcb()
  - rfcomm_{bind,listen}() -> rfcomm_{bind,listen}_pcb()

patch reviewed by rmind

welcome to netbsd 6.99.48

Revision 1.156: download - view: text, markup, annotated - select for diffs
Wed Jul 23 13:17:18 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +26 -2 lines
split PRU_SENDOOB and PRU_RCVOOB function out of pr_generic() usrreq
switches and put into separate functions
  xxx_sendoob(struct socket *, struct mbuf *, struct mbuf *)
  xxx_recvoob(struct socket *, struct mbuf *, int)

  - always KASSERT(solocked(so)) even if request is not implemented

  - replace calls to pr_generic() with req = PRU_{SEND,RCV}OOB with
    calls to pr_{send,recv}oob() respectively.

there is still some tweaking of m_freem(m) and m_freem(control) to come
for consistency.  not performed with this commit for clarity.

reviewed by rmind

Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Jul 9 14:41:42 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +14 -2 lines
* split PRU_ACCEPT function out of pr_generic() usrreq switches and put
  into a separate function xxx_accept(struct socket *, struct mbuf *)

note: future cleanup will take place to remove struct mbuf parameter
type and replace it with a more appropriate type.

patch reviewed by rmind

Revision 1.154: download - view: text, markup, annotated - select for diffs
Wed Jul 9 04:54:03 2014 UTC (10 years, 4 months ago) by rtr
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +38 -2 lines
* split PRU_PEERADDR and PRU_SOCKADDR function out of pr_generic()
  usrreq switches and put into separate functions
  xxx_{peer,sock}addr(struct socket *, struct mbuf *).

    - KASSERT(solocked(so)) always in new functions even if request
      is not implemented

    - KASSERT(pcb != NULL) and KASSERT(nam) if the request is
      implemented and not for tcp.

* for tcp roll #ifdef KPROF and #ifdef DEBUG code from tcp_usrreq() into
  easier to cut & paste functions tcp_debug_capture() and
tcp_debug_trace()

    - functions provided by rmind
    - remaining use of PRU_{PEER,SOCK}ADDR #define to be removed in a
      future commit.

* rename netbt functions to permit consistency of pru function names
  (as has been done with other requests already split out).

    - l2cap_{peer,sock}addr()  -> l2cap_{peer,sock}_addr_pcb()
    - rfcomm_{peer,sock}addr() -> rfcomm_{peer,sock}_addr_pcb()
    - sco_{peer,sock}addr()    -> sco_{peer,sock}_addr_pcb()

* split/refactor do_sys_getsockname(lwp, fd, which, nam) into
  two functions do_sys_get{peer,sock}name(fd, nam).

    - move PRU_PEERADDR handling into do_sys_getpeername() from
      do_sys_getsockname()
    - have svr4_stream directly call do_sys_get{sock,peer}name()
      respectively instead of providing `which' & fix a DPRINTF string
      that incorrectly wrote "getpeername" when it meant "getsockname"
    - fix sys_getpeername() and sys_getsockname() to call
      do_sys_get{sock,peer}name() without `which' and `lwp' & adjust
      comments
    - bump kernel version for removal of lwp & which parameters from
      do_sys_getsockname()

note: future cleanup to remove struct mbuf * abuse in
xxx_{peer,sock}name()
still to come, not done in this commit since it is easier to do post
split.

patch reviewed by rmind

welcome to 6.99.47

Revision 1.153: download - view: text, markup, annotated - select for diffs
Mon Jul 7 17:13:56 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -2 lines
* sprinkle KASSERT(solocked(so)); in all pr_stat() functions.
* fix remaining inconsistent struct socket parameter names.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Mon Jul 7 15:13:21 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +1 -1 lines
backout change that made pr_stat return EOPNOTSUPP for protocols that
were not filling in struct stat.

decision made after further discussion with rmind and investigation of
how other operating systems behave.  soo_stat() is doing just enough to
be able to call what gets returned valid and thus justifys a return of
success.

additional review will be done to determine of the pr_stat functions
that were already returning EOPNOTSUPP can be considered successful with
what soo_stat() is doing.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Mon Jul 7 10:18:20 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
return EOPNOTSUPP for pr_stat instead of returning success since we
don't fill in the struct stat passed to us.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun Jul 6 03:33:33 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +10 -2 lines
* split PRU_SENSE functionality out of xxx_usrreq() switches and place into
  separate xxx_stat(struct socket *, struct stat *) functions.
* replace calls using pr_generic with req == PRU_SENSE with pr_stat().

further change will follow that cleans up the pattern used to extract the
pcb and test for its presence.

reviewed by rmind

Revision 1.149: download - view: text, markup, annotated - select for diffs
Tue Jul 1 05:49:18 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +4 -4 lines
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.148: download - view: text, markup, annotated - select for diffs
Sun Jun 22 08:10:18 2014 UTC (10 years, 5 months ago) by rtr
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +11 -2 lines
* split PRU_CONTROL functionality out of xxx_userreq() switches and place
  into separate xxx_ioctl() functions.
* place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now
  inappropriate for req = PRU_CONTROL in xxx_userreq().
* replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl().
* remove & fixup references to PRU_CONTROL xxx_userreq() function comments.
* fix various comments references for xxx_userreq() that mentioned
  PRU_CONTROL as xxx_userreq() no longer handles the request.

a further change will follow to fix parameter and naming inconsistencies
retained from original code.

Reviewed by rmind@

Revision 1.137.2.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:09 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.137.2.1: preferred, colored; branchpoint 1.137: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137.2.1: +3 -11 lines
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.147: download - view: text, markup, annotated - select for diffs
Wed May 21 20:43:56 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +3 -2 lines
raw_detach: rawpcb may be embedded, free using the real size (saved in rcb).

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue May 20 19:04:00 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +6 -6 lines
Adjust PR_WRAP_USRREQS() to include the attach/detach functions.
We still need the kernel-lock for some corner cases.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Mon May 19 02:51:24 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +56 -42 lines
- Split off PRU_ATTACH and PRU_DETACH logic into separate functions.
- Replace malloc with kmem and eliminate M_PCB while here.
- Sprinkle more asserts.

Revision 1.141.6.3: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:12 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.141.6.2: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.6.2: +2 -8 lines
sync with head

Revision 1.144: download - view: text, markup, annotated - select for diffs
Sun May 18 14:46:16 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
CVS tags: rmind-smpnet-nbase, rmind-smpnet-base
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +7 -3 lines
Add struct pr_usrreqs with a pr_generic function and prepare for the
dismantling of pr_usrreq in the protocols; no functional change intended.
PRU_ATTACH/PRU_DETACH changes will follow soon.

Bump for struct protosw.  Welcome to 6.99.62!

Revision 1.143: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:12 2014 UTC (10 years, 9 months ago) by pooka
Branches: 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
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +2 -8 lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.141.6.2: download - view: text, markup, annotated - select for diffs
Wed Aug 28 23:59:36 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.141.6.1: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.6.1: +3 -2 lines
sync with head

Revision 1.141.6.1: download - view: text, markup, annotated - select for diffs
Wed Aug 28 15:21:48 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +62 -44 lines
Checkpoint work in progress:
- Initial split of the protocol user-request method into the following
  methods: pr_attach, pr_detach and pr_generic for old the pr_usrreq.
- Adjust socreate(9) and sonewconn(9) to call pr_attach without the
  socket lock held (as a preparation for the locking scheme adjustment).
- Adjust all pr_attach routines to assert that PCB is not set.
- Sprinkle various comments, document some routines and their locking.
- Remove M_PCB, replace with kmem(9).
- Fix few bugs spotted on the way.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Jul 24 15:31:04 2013 UTC (11 years, 4 months ago) by kefren
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +3 -2 lines
report about route tag in sysctl route walker

Revision 1.140.6.1: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:25 2013 UTC (11 years, 5 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +2 -5 lines
resync from head

Revision 1.141: download - view: text, markup, annotated - select for diffs
Fri Mar 1 18:25:57 2013 UTC (11 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +2 -5 lines
Retire OSI network stack. OK core@

Revision 1.137.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:38 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +24 -6 lines
sync with head

Revision 1.137.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:35:38 2012 UTC (12 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.137: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137: +24 -6 lines
merge to -current.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Mon Jan 30 20:02:55 2012 UTC (12 years, 10 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +13 -4 lines
- don't copy past the end of sockaddr if we are rounding, zero it out instead,
  from mlelstv@
- put a comment explaining the 6 nuls.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sat Dec 31 20:41:58 2011 UTC (12 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +6 -3 lines
- fix offsetof usage, and redundant defines
- kill pointer casts to 0

Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Dec 12 00:06:39 2011 UTC (12 years, 11 months ago) by roy
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +9 -3 lines
When adding or scrubbing a prefix, always notify userland even if the
prefix does not have IFA_ROUTE.
Don't scrub the interface in SIOCAIFADDR if the new address does't
have IFA_ROUTE. If more functions are added to in_ifscrub then this logic
might need to be revisited.

Fixes PR/26450.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Oct 31 12:50:50 2011 UTC (13 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +3 -3 lines
remove an unnecessary cast

Revision 1.136: download - view: text, markup, annotated - select for diffs
Sun Jul 17 20:54:52 2011 UTC (13 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +2 -4 lines
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.132.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:53 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.132: preferred, colored; next MAIN 1.133: preferred, colored
Changes since revision 1.132: +229 -172 lines
Sync with HEAD.

Revision 1.127.4.4: download - view: text, markup, annotated - select for diffs
Thu Apr 21 01:42:13 2011 UTC (13 years, 7 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.127.4.3: preferred, colored; branchpoint 1.127: preferred, colored; next MAIN 1.128: preferred, colored
Changes since revision 1.127.4.3: +2 -23 lines
sync with head

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu Mar 31 19:40:52 2011 UTC (13 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +4 -25 lines
Hide the radix-trie implementation of the forwarding table so that we
will have an easier time replacing it with something different, even if
it is a second radix-trie implementation.

sys/net/route.c and sys/net/rtsock.c no longer operate directly on
radix_nodes or radix_node_heads.

Hopefully this will reduce the temptation to implement multipath or
source-based routing using grotty hacks to the grotty old radix-trie
code, too. :-)

Revision 1.127.4.3: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:54 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.127.4.2: preferred, colored; branchpoint 1.127: preferred, colored
Changes since revision 1.127.4.2: +277 -202 lines
sync with head

Revision 1.132.4.2: download - view: text, markup, annotated - select for diffs
Thu Feb 17 12:00:49 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.132.4.1: preferred, colored; branchpoint 1.132: preferred, colored; next MAIN 1.133: preferred, colored
Changes since revision 1.132.4.1: +7 -2 lines
Sync with HEAD

Revision 1.134: download - view: text, markup, annotated - select for diffs
Thu Feb 10 07:42:18 2011 UTC (13 years, 9 months ago) by kefren
Branches: MAIN
CVS tags: bouyer-quota2-nbase, bouyer-quota2-base
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +7 -2 lines
Allow changing route flags. Should fix PR/40455
OK'ed: dyoung@

Revision 1.132.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 8 16:20:01 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +223 -150 lines
Sync with HEAD

Revision 1.133: download - view: text, markup, annotated - select for diffs
Tue Feb 1 01:39:20 2011 UTC (13 years, 10 months ago) by matt
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +223 -150 lines
Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Sat Dec 25 20:37:44 2010 UTC (13 years, 11 months ago) by christos
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +50 -60 lines
merge the length getting code from rt_msg1 and rt_msg2 and make it fail
when the compatibility ifinfo is missing instead of returning junk.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Fri Nov 12 16:30:26 2010 UTC (14 years ago) by roy
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +13 -6 lines
Add RTM_CHGADDR to signal that an address on the interface has changed.
This is mainly used for notifying userland about active link address changes.

Revision 1.127.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:45 2010 UTC (14 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.127: preferred, colored; next MAIN 1.128: preferred, colored
Changes since revision 1.127: +23 -8 lines
Sync with HEAD.

Revision 1.101.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:55 2010 UTC (14 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.101.2.4: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.2.4: +23 -8 lines
sync with head.

Revision 1.127.4.2: download - view: text, markup, annotated - select for diffs
Sat Jul 3 01:19:59 2010 UTC (14 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.127.4.1: preferred, colored; branchpoint 1.127: preferred, colored
Changes since revision 1.127.4.1: +16 -5 lines
sync with head

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Jun 28 17:26:11 2010 UTC (14 years, 5 months ago) by kefren
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +4 -2 lines
we need to set rt_ifp even if ifa is the same. Fixes the case when one
changes route to a different ifp but wants to keep the same ifa

Revision 1.129: download - view: text, markup, annotated - select for diffs
Sat Jun 26 14:24:28 2010 UTC (14 years, 5 months ago) by kefren
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +14 -5 lines
Add MPLS support, proposed on tech-net@ a couple of days ago

Welcome to 5.99.33

Revision 1.127.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:18:02 2010 UTC (14 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +9 -5 lines
sync with head

Revision 1.115.2.4.4.2: download - view: text, markup, annotated - select for diffs
Thu May 13 05:36:49 2010 UTC (14 years, 6 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.115.2.4.4.1: preferred, colored; branchpoint 1.115.2.4: preferred, colored; next MAIN 1.116: preferred, colored
Changes since revision 1.115.2.4.4.1: +7 -3 lines
Make sure all structure lengths are rounded via RT_ROUNDUP in routing messages.
This simplies the protocol since all items will now start on a RT_ROUNDUP
aligned address independent of the structure.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Sun May 2 19:17:56 2010 UTC (14 years, 7 months ago) by kefren
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +9 -5 lines
Permit the existence of a route with unlinked ifp and ifa,
enabling this way the posibility to send a packet on an interface with
source address from another interface.

Revision 1.115.2.4.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 27 23:09:07 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
Diff to: previous 1.115.2.4: preferred, colored
Changes since revision 1.115.2.4: +3 -2 lines
Make sure each rt_msg has an aligned length.

Revision 1.101.2.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:27 2010 UTC (14 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.101.2.3: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.2.3: +6 -3 lines
sync with head

Revision 1.127: download - view: text, markup, annotated - select for diffs
Wed Sep 16 15:23:04 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +6 -3 lines
Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL

Revision 1.101.2.3: download - view: text, markup, annotated - select for diffs
Wed Sep 16 13:38:01 2009 UTC (15 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.101.2.2: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.2.2: +6 -5 lines
sync with head

Revision 1.126: download - view: text, markup, annotated - select for diffs
Sat Sep 12 18:09:25 2009 UTC (15 years, 2 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base8
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +6 -5 lines
Make this compile with options RTSOCK_DEBUG.
Noticed by PR kern/41842, but fixed differently.

Revision 1.121.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:22:20 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.121: preferred, colored; next MAIN 1.122: preferred, colored
Changes since revision 1.121: +14 -38 lines
Sync with HEAD.

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

Revision 1.101.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:15 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.101.2.1: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.2.1: +236 -234 lines
sync with head.

Revision 1.113.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:17 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.113.2.2: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.2: +9 -34 lines
Sync with HEAD.

Revision 1.115.2.4: download - view: text, markup, annotated - select for diffs
Fri Apr 3 17:59:03 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-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-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Diff to: previous 1.115.2.3: preferred, colored; branchpoint 1.115: preferred, colored; next MAIN 1.116: preferred, colored
Changes since revision 1.115.2.3: +6 -10 lines
Pull up following revision(s) (requested by christos in ticket #650):
	sys/net/route.c: revision 1.117
	sys/net/route.h: revision 1.73
	sys/net/rtsock.c: revision 1.125
	usr.sbin/arp/arp.c: revision 1.48
	usr.sbin/pppd/pppd/sys-bsd.c: revision 1.59
Centralize the ROUNDUP and ADVANCE macro in a header file, give them an
RT_ prefix and use them appropriately, instead of making copies. Make
pppd use the RT_ROUNDUP macro; fixes proxyarp setting on 64 bit hosts.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Thu Apr 2 21:02:06 2009 UTC (15 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +6 -10 lines
Centralize the ROUNDUP and ADVANCE macro in a header file, give them an
RT_ prefix and use them appropriately, instead of making copies. Make
pppd use the RT_ROUNDUP macro; fixes proxyarp setting on 64 bit hosts.

XXX: All this should be pulled up to 5.0

Revision 1.115.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 15 20:00:30 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC3
Diff to: previous 1.115.2.2: preferred, colored; branchpoint 1.115: preferred, colored
Changes since revision 1.115.2.2: +5 -26 lines
Pull up following revision(s) (requested by roy in ticket #560):
	sys/net/rtsock.c: revision 1.124
Revert r1.119 as the implementation is broken.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Wed Mar 11 09:26:27 2009 UTC (15 years, 8 months ago) by roy
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +5 -26 lines
Revert r1.119 as the implementation is broken.

Revision 1.113.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:33:38 2009 UTC (15 years, 9 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.113.2.1: preferred, colored
Changes since revision 1.113.2.1: +7 -6 lines
Sync with HEAD.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Fri Feb 20 10:54:57 2009 UTC (15 years, 9 months ago) by yamt
Branches: MAIN
CVS tags: nick-hppapmap-base2
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +6 -5 lines
remove inline from some functions which are not small or critical.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Sat Feb 14 20:48:46 2009 UTC (15 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +3 -3 lines
mention when this will really break, not 2038 but 2145.

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:12 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +227 -214 lines
Sync with HEAD.

Revision 1.98.6.5: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:31 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.98.6.4: preferred, colored; branchpoint 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98.6.4: +231 -207 lines
Sync with HEAD.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Sun Jan 11 04:34:16 2009 UTC (15 years, 10 months ago) by christos
Branches: MAIN
CVS tags: mjf-devfs2-base
Branch point for: jym-xensuspend
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -3 lines
we need route_enqueue not to be static

Revision 1.120: download - view: text, markup, annotated - select for diffs
Sun Jan 11 02:45:54 2009 UTC (15 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +74 -104 lines
merge christos-time_t

Revision 1.115.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 9 02:58:58 2009 UTC (15 years, 10 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RC2, netbsd-5-0-RC1
Diff to: previous 1.115.2.1: preferred, colored; branchpoint 1.115: preferred, colored
Changes since revision 1.115.2.1: +26 -5 lines
Pull up following revision(s) (requested by roy in ticket #239):
	sys/net/rtsock.c: revision 1.119
When removing routes automatically added, remove the flag from the
associated address.
When changing routes automatically addded, move the flag to the new
assoicated address.

Revision 1.100.2.7: download - view: text, markup, annotated - select for diffs
Mon Dec 29 03:22:12 2008 UTC (15 years, 11 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.6: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.2.6: +4 -2 lines
protect with _KERNEL_OPT the compat netbsd option.

Revision 1.100.2.6: download - view: text, markup, annotated - select for diffs
Sun Dec 28 20:13:05 2008 UTC (15 years, 11 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.5: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.5: +4 -4 lines
ort_metrics -> rt_metrics
rt_metrics -> nrt_metrics
for userland compatibility

Revision 1.100.2.5: download - view: text, markup, annotated - select for diffs
Sat Dec 27 23:14:25 2008 UTC (15 years, 11 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.4: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.4: +39 -22 lines
merge with head.

Revision 1.115.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 23 03:53:37 2008 UTC (15 years, 11 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +14 -18 lines
Pull up following revision(s) (requested by christos in ticket #202):
	sys/net/rtsock.c: revision 1.117
RTAX_GENMASK and RTAX_AUTHOR could cause kernel memory corruption because
info struct members could be pointing to free'd memory. Fix from dyoung.
XXX: Pullup to 5.0

Revision 1.119: download - view: text, markup, annotated - select for diffs
Sun Dec 21 19:12:43 2008 UTC (15 years, 11 months ago) by roy
Branches: MAIN
CVS tags: christos-time_t-nbase, christos-time_t-base
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +26 -5 lines
When removing routes automatically added, remove the flag from the associated
address.
When changing routes automatically addded, move the flag to the new assoicated
address.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Wed Dec 17 20:51:37 2008 UTC (15 years, 11 months ago) by cegger
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +3 -3 lines
kill MALLOC and FREE macros.

Revision 1.109.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:26 2008 UTC (15 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.109.2.1: preferred, colored; branchpoint 1.109: preferred, colored; next MAIN 1.110: preferred, colored
Changes since revision 1.109.2.1: +136 -98 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Dec 12 22:34:58 2008 UTC (15 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +14 -18 lines
RTAX_GENMASK and RTAX_AUTHOR could cause kernel memory corruption because
info struct members could be pointing to free'd memory. Fix from dyoung.
XXX: Pullup to 5.0

Revision 1.100.2.4: download - view: text, markup, annotated - select for diffs
Sun Nov 9 23:57:23 2008 UTC (16 years ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.3: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.3: +24 -13 lines
merge with head.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Fri Nov 7 00:20:13 2008 UTC (16 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +24 -13 lines
*** 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.100.2.3: download - view: text, markup, annotated - select for diffs
Sat Nov 1 21:22:28 2008 UTC (16 years, 1 month ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.2: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.2: +143 -104 lines
Sync with head.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Tue Oct 28 11:41:23 2008 UTC (16 years, 1 month ago) by christos
Branches: MAIN
CVS tags: netbsd-5-base
Branch point for: netbsd-5
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +60 -34 lines
Fold long lines created by the previous commit. No functional change.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Tue Oct 28 02:03:06 2008 UTC (16 years, 1 month ago) by dyoung
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +58 -68 lines
Stop the "Sleazy use of local variables throughout file", replace
'dst' with 'info.rti_info[RTAX_DST]', et cetera.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Oct 25 17:34:00 2008 UTC (16 years, 1 month ago) by christos
Branches: MAIN
Branch point for: nick-hppapmap
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +13 -3 lines
Fix handling of RTAX_GENMASK. Since this has been removed, userland programs
that set it, ended up causing the kernel to reference random garbage. Ignore
it for compatibility, but add a DIAGNOSTIC message so that userland programs
that set it can be fixed. The only one so far is pppd. Hi dyoung!

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Oct 24 21:38:18 2008 UTC (16 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: matt-mips64-base2
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +9 -8 lines
Do not gratuitously cast to void *.  Remove excess parenthesization.
Do not "test truth" of pointers, but compare with NULL.

No functional change intended.

Revision 1.109.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:42 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +17 -19 lines
Sync with HEAD.

Revision 1.98.6.4: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:56 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.98.6.3: preferred, colored; branchpoint 1.98: preferred, colored
Changes since revision 1.98.6.3: +15 -17 lines
Sync with HEAD.

Revision 1.101.4.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:37:00 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.101.4.1: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.4.1: +17 -19 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Thu Aug 28 19:33:24 2008 UTC (16 years, 3 months ago) by christos
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, haad-dm-base1
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +12 -14 lines
- more void * removal
- bcopy -> memcpy
- memmove -> memcpy
- explicitly initialize size to 0 on memory allocation failure.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu Aug 28 18:43:58 2008 UTC (16 years, 3 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +7 -7 lines
Do not cast to void * unnecessarily.

Revision 1.98.6.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:19 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.98.6.2: preferred, colored; branchpoint 1.98: preferred, colored
Changes since revision 1.98.6.2: +2 -4 lines
Sync with HEAD.

Revision 1.101.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:58 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +12 -8 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:50 2008 UTC (16 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107: +4 -6 lines
Sync with head.

Revision 1.100.4.3: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:15:13 2008 UTC (16 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.100.4.2: preferred, colored; branchpoint 1.100: preferred, colored; next MAIN 1.101: preferred, colored
Changes since revision 1.100.4.2: +4 -6 lines
sync with head.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Jun 15 20:36:55 2008 UTC (16 years, 5 months ago) by cube
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -2 lines
Fix previous: a well hidden assignment was lost.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Jun 15 16:37:21 2008 UTC (16 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +3 -6 lines
- add if_alloc (ours just mallocs), and if_initname and use them (from FreeBSD)
- kill memsets where M_ZERO can be used.

Revision 1.100.4.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:48 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.100.4.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.4.1: +8 -2 lines
sync with head

Revision 1.98.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:23 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.98.6.1: preferred, colored; branchpoint 1.98: preferred, colored
Changes since revision 1.98.6.1: +17 -3 lines
Sync with HEAD.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sun Jun 1 22:05:47 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
CVS tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +4 -3 lines
Don't obliterate the whole message, preserve the data we have just written
and only zero out the rest.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu May 29 17:53:01 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +3 -2 lines
PR/38791: J.T. Conklin: routing socket event header not cleared

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun May 25 01:59:55 2008 UTC (16 years, 6 months ago) by dholland
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +3 -3 lines
fix typo

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sat May 24 18:51:41 2008 UTC (16 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +6 -2 lines
Coverity CID 5013: Add diagnostic test for bad cmd parameter.

Revision 1.100.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:28 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +13 -5 lines
sync with head.

Revision 1.101.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:41 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +4 -4 lines
sync with head.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Tue May 13 20:16:30 2008 UTC (16 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +3 -3 lines
Replace a call to rtrequest() with single dst, mask, gateway
arguments, with a call to rtrequest1() with the rt_addrinfo those
single arguments come from.  No functional change intended.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Sun May 11 20:14:41 2008 UTC (16 years, 6 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +3 -3 lines
Use memset, memmove, and memcmp instead of Bzero, Bcopy, and Bcmp,
respectively.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Thu Apr 24 11:38:37 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +11 -3 lines
Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.98.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:07 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +68 -17 lines
Sync with HEAD.

Revision 1.100.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 29 20:47:02 2008 UTC (16 years, 8 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.100.2.1: preferred, colored; branchpoint 1.100: preferred, colored
Changes since revision 1.100.2.1: +1235 -0 lines
Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.100.2.1
Sat Mar 29 13:00:43 2008 UTC (16 years, 8 months ago) by christos
Branches: christos-time_t
FILE REMOVED
Changes since revision 1.100: +0 -1270 lines
file rtsock.c was added on branch christos-time_t on 2008-03-29 20:47:02 +0000

Revision 1.100: download - view: text, markup, annotated - select for diffs
Sat Mar 29 13:00:43 2008 UTC (16 years, 8 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42, christos-time_t
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
route_intr: fill a correct member of sockproto.  (sp_family -> sp_protocol)

Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Mar 26 14:53:14 2008 UTC (16 years, 8 months ago) by ad
Branches: MAIN
CVS tags: ad-socklock-base1
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +68 -17 lines
Defer processing of routing messages to a soft interrupt. These can be
generated at IPL_VM and it's not safe to call directly into the socket
layer at that level. Reviewed by matt@.

Revision 1.95.6.2: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:05 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.95.6.1: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.6.1: +3 -3 lines
sync with HEAD

Revision 1.78.2.7: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:37:01 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.6: preferred, colored; branchpoint 1.78: preferred, colored; next MAIN 1.79: preferred, colored
Changes since revision 1.78.2.6: +3 -3 lines
sync with head.

Revision 1.98.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 22 02:53:33 2008 UTC (16 years, 9 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98: +34 -2 lines
imported Mobile IPv6 code developed by the SHISA project
(http://www.mobileip.jp/).

Revision 1.98: download - view: text, markup, annotated - select for diffs
Wed Feb 20 17:05:53 2008 UTC (16 years, 9 months ago) by matt
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +3 -3 lines
s/u_\(int[0-9]*_t\)/u\1/g
(change u_int*_t to uint*_t)

Revision 1.78.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:08 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.5: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.5: +8 -9 lines
sync with head

Revision 1.95.6.1: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:57:16 2008 UTC (16 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +8 -9 lines
sync with HEAD

Revision 1.96.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:57:12 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +8 -9 lines
Sync with HEAD

Revision 1.95.12.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:46:28 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.95.12.1: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.12.1: +8 -9 lines
Sync with HEAD.

Revision 1.95.14.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:51 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.95.14.1: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.14.1: +8 -9 lines
Sync with head.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Dec 20 19:53:31 2007 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: vmlocking2-base3, mjf-devfs-base, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +8 -9 lines
Poison struct route->ro_rt uses in the kernel by changing the name
to _ro_rt.  Use rtcache_getrt() to access a route cache's struct
rtentry *.

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

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

Make ND6_HINT an inline, lowercase subroutine, nd6_hint.

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

Revision 1.95.4.1: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:35 2007 UTC (16 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95: +7 -7 lines
Sync with HEAD.

Revision 1.95.12.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:21:08 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +7 -7 lines
Sync with HEAD.

Revision 1.95.14.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:54 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +7 -7 lines
Sync with head.

Revision 1.78.2.5: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:34:19 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.4: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.4: +7 -7 lines
sync with head

Revision 1.96: download - view: text, markup, annotated - select for diffs
Wed Dec 5 22:56:02 2007 UTC (17 years ago) by dyoung
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +7 -7 lines
Use IFADDR_FIRST(), IFADDR_NEXT().

Revision 1.78.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:42:25 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.3: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.3: +126 -141 lines
sync with head.

Revision 1.93.2.2: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:56 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.93.2.1: preferred, colored; branchpoint 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93.2.1: +97 -109 lines
Sync with HEAD.

Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:42 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94: +97 -109 lines
Sync with HEAD.

Revision 1.95.16.2: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:54 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
Diff to: previous 1.95.16.1: preferred, colored; branchpoint 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95.16.1: +1220 -0 lines
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.95.16.1
Thu Jul 19 20:48:53 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.95: +0 -1220 lines
file rtsock.c was added on branch matt-mips64 on 2007-07-19 20:48:54 +0000

Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:53 2007 UTC (17 years, 4 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking2-base1, vmlocking-nbase, vmlocking-base, nick-csl-alignment-base5, matt-mips64-base, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-mips64, matt-armv6, jmcneill-pm
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +97 -109 lines
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.93.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:27:56 2007 UTC (17 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +6 -9 lines
Sync with head.

Revision 1.93.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:11:03 2007 UTC (17 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.93: preferred, colored; next MAIN 1.94: preferred, colored
Changes since revision 1.93: +6 -9 lines
Sync with head.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Jun 9 03:07:22 2007 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +6 -9 lines
Get rid of radix_node_head.rnh_walktree, because it is only ever
set to rn_walktree.

Introduce rt_walktree(), which applies a subroutine to every route
in a particular address family.  Use it instead of rn_walktree()
virtually everywhere.  This helps to hide the routing table
implementation.

Revision 1.91.4.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:59:16 2007 UTC (17 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.91.4.1: preferred, colored; branchpoint 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91.4.1: +30 -30 lines
Sync with HEAD.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:18 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +30 -30 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.91.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:46 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +13 -8 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.78.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:37 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.2: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.2: +13 -8 lines
sync with head.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun Feb 18 22:46:32 2007 UTC (17 years, 9 months ago) by matt
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +13 -8 lines
Initialize routeswitch with structure initializers.

Revision 1.78.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:21 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78.2.1: preferred, colored; branchpoint 1.78: preferred, colored
Changes since revision 1.78.2.1: +64 -30 lines
sync with head.

Revision 1.88.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:01 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.88.2.1: preferred, colored; branchpoint 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88.2.1: +54 -23 lines
sync with head.

Revision 1.87.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:30 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.87: preferred, colored; next MAIN 1.88: preferred, colored
Changes since revision 1.87: +56 -26 lines
Sync with head.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Nov 13 19:16:01 2006 UTC (18 years ago) by dyoung
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +48 -16 lines
make the routing socket report the right source address in RTM_GET
responses when a source-address selection policy is in use.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Nov 13 05:13:41 2006 UTC (18 years ago) by dyoung
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +8 -9 lines
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.88.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:25 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3 lines
sync with head

Revision 1.89: download - view: text, markup, annotated - select for diffs
Tue Sep 19 21:42:29 2006 UTC (18 years, 2 months ago) by elad
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3 lines
Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.

Revision 1.81.2.5: download - view: text, markup, annotated - select for diffs
Thu Sep 14 12:31:55 2006 UTC (18 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.81.2.4: preferred, colored; branchpoint 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81.2.4: +4 -5 lines
sync with head.

Revision 1.80.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:58:06 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80: +26 -10 lines
sync with head

Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri Sep 8 20:58:58 2006 UTC (18 years, 3 months ago) by elad
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +4 -5 lines
First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.81.2.4: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:25:35 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.81.2.3: preferred, colored; branchpoint 1.81: preferred, colored
Changes since revision 1.81.2.3: +10 -7 lines
sync with head.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Sep 3 05:08:18 2006 UTC (18 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +10 -7 lines
use c99 initializers

Revision 1.81.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:46:16 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.81.2.2: preferred, colored; branchpoint 1.81: preferred, colored
Changes since revision 1.81.2.2: +4 -3 lines
sync with head

Revision 1.86: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:13 2006 UTC (18 years, 4 months ago) by ad
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +4 -3 lines
Use the LWP cached credentials where sane.

Revision 1.81.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:53:39 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.81.2.1: preferred, colored; branchpoint 1.81: preferred, colored
Changes since revision 1.81.2.1: +11 -3 lines
sync with head.

Revision 1.78.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:10:27 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +22 -10 lines
sync with head.

Revision 1.84.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:09:12 2006 UTC (18 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.84: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84: +11 -3 lines
Sync with head.

Revision 1.80.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:38 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.80.6.1: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80.6.1: +13 -4 lines
Sync with head.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Sat May 27 23:08:11 2006 UTC (18 years, 6 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +11 -3 lines
add sysctl for routing stats

Revision 1.81.6.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:44 2006 UTC (18 years, 6 months ago) by tron
Branches: peter-altq
Diff to: previous 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81: +6 -4 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.81.2.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:56 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +6 -4 lines
sync with head.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Sun May 14 21:19:33 2006 UTC (18 years, 6 months ago) by elad
Branches: MAIN
CVS tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -3 lines
integrate kauth.

Revision 1.81.4.4: download - view: text, markup, annotated - select for diffs
Sat May 6 23:31:59 2006 UTC (18 years, 7 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.81.4.3: preferred, colored; branchpoint 1.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81.4.3: +3 -2 lines
- 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.80.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:40:08 2006 UTC (18 years, 7 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +6 -3 lines
Sync with head.

Revision 1.81.4.3: download - view: text, markup, annotated - select for diffs
Wed Apr 19 04:46:10 2006 UTC (18 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.81.4.2: preferred, colored; branchpoint 1.81: preferred, colored
Changes since revision 1.81.4.2: +4 -3 lines
sync with head.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sat Apr 15 02:14:44 2006 UTC (18 years, 7 months ago) by christos
Branches: MAIN
CVS tags: elad-kernelauth-base
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -2 lines
Coverity CID 854: Add KASSERT before deref.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Sat Apr 15 02:07:34 2006 UTC (18 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Coverity CID 853: Prevent NULL deref.

Revision 1.81.4.2: download - view: text, markup, annotated - select for diffs
Fri Mar 10 15:05:23 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.81.4.1: preferred, colored; branchpoint 1.81: preferred, colored
Changes since revision 1.81.4.1: +3 -3 lines
generic_authorize() -> kauth_authorize_generic().

Revision 1.81.4.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:11:55 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Adapt to kernel authorization KPI.

Revision 1.80.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 1 09:28:47 2006 UTC (18 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.80: preferred, colored; next MAIN 1.81: preferred, colored
Changes since revision 1.80: +4 -2 lines
sync with head.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Feb 21 22:01:17 2006 UTC (18 years, 9 months ago) by rpaulo
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +4 -2 lines
In sysctl_iflist() don't assume TAILQ_FIRST() will never be NULL.
Prevents crash found by Uwe and fix confirmed working by Jeff Ito (all
on tech-net).

Revision 1.80: download - view: text, markup, annotated - select for diffs
Sat Dec 24 20:45:09 2005 UTC (18 years, 11 months ago) by perry
Branches: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -4 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:52 2005 UTC (18 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +5 -5 lines
merge ktrace-lwp.

Revision 1.63.2.9: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:10:33 2005 UTC (19 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.8: preferred, colored; next MAIN 1.64: preferred, colored
Changes since revision 1.63.2.8: +78 -24 lines
Sync with HEAD. Here we go again...

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Jun 22 06:16:02 2005 UTC (19 years, 5 months ago) by dyoung
Branches: 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
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +64 -10 lines
Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD.  Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]).  Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Thu Jun 9 02:19:59 2005 UTC (19 years, 6 months ago) by atatat
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -4 lines
Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
code.  I know it's not the prettiest code, but it seems to work rather
well in spite of itself.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun May 29 21:22:53 2005 UTC (19 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +18 -17 lines
- sprinkle const
- remove unneeded casts
- use more mem*() instead of b*() funcs.

Revision 1.67.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed May 18 18:28:39 2005 UTC (19 years, 6 months ago) by riz
Branches: netbsd-2
CVS tags: 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
Diff to: previous 1.67.2.1: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67.2.1: +14 -8 lines
Pull up revision 1.72 via patch (requested by christos in ticket #961):
PR/27286: Tom Ivar Helbekkmo: Allow RTM_GET to work with RTA_IFA|RTA_IFP set.
Quiting Tom: The problem is the special case of an RTM_GET message
that wants interface information included in the response, and
therefore include the RTA_IFA or RTA_IFP (or both) flags in the
bitmask that says what addresses are supplied in the message.  For
the RTM_GET message, it doesn't make sense to supply addresses
other than the one you're asking about, so those two other bits
are, in that specific case, overloaded with this meaning.
There is code in sys/net/rtsock.c to handle the case, but at some
time, extra sanity checking of the received message was added, that
failed to take this possibility into account.
The patch, is needed for the Asterisk software PBX to work properly
when it has multiple interfaces active: it needs to ask the kernel
for the IP address of the interface that will be used to communicate
with a given host.

Revision 1.72.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:32 2005 UTC (19 years, 7 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +8 -8 lines
sync with -current

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:32 2005 UTC (19 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74: +6 -6 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.63.2.8: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:53:00 2005 UTC (19 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.7: preferred, colored
Changes since revision 1.63.2.7: +6 -6 lines
Sync with HEAD.

Hi Perry!

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Feb 26 22:45:09 2005 UTC (19 years, 9 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +6 -6 lines
nuke trailing whitespace

Revision 1.63.2.7: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:44 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.6: preferred, colored
Changes since revision 1.63.2.6: +3 -3 lines
Sync with HEAD.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Mon Jan 24 21:25:09 2005 UTC (19 years, 10 months ago) by matt
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base
Branch point for: yamt-km
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -3 lines
Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.

Revision 1.63.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 24 08:35:53 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.5: preferred, colored
Changes since revision 1.63.2.5: +3 -3 lines
Sync with HEAD.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sun Jan 23 18:41:57 2005 UTC (19 years, 10 months ago) by matt
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
Change initialzie of domains to use link sets.  Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.

Revision 1.63.2.5: download - view: text, markup, annotated - select for diffs
Tue Nov 2 07:53:23 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.4: preferred, colored
Changes since revision 1.63.2.4: +13 -8 lines
Sync with HEAD.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Oct 23 19:13:22 2004 UTC (20 years, 1 month ago) by christos
Branches: MAIN
CVS tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +13 -8 lines
PR/27286: Tom Ivar Helbekkmo: Allow RTM_GET to work with RTA_IFA|RTA_IFP set.

Quiting Tom: The problem is the special case of an RTM_GET message
that wants interface information included in the response, and
therefore include the RTA_IFA or RTA_IFP (or both) flags in the
bitmask that says what addresses are supplied in the message.  For
the RTM_GET message, it doesn't make sense to supply addresses
other than the one you're asking about, so those two other bits
are, in that specific case, overloaded with this meaning.

There is code in sys/net/rtsock.c to handle the case, but at some
time, extra sanity checking of the received message was added, that
failed to take this possibility into account.

The patch, is needed for the Asterisk software PBX to work properly
when it has multiple interfaces active: it needs to ask the kernel
for the IP address of the interface that will be used to communicate
with a given host.

Revision 1.63.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:36:42 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.3: preferred, colored
Changes since revision 1.63.2.3: +5 -5 lines
Fix the sync with head I botched.

Revision 1.63.2.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:54:16 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.2: preferred, colored
Changes since revision 1.63.2.2: +5 -5 lines
Sync with HEAD.

Revision 1.63.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:54:20 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.63.2.1: preferred, colored
Changes since revision 1.63.2.1: +67 -85 lines
Sync with HEAD

Revision 1.67.2.1: download - view: text, markup, annotated - select for diffs
Fri May 28 07:23:33 2004 UTC (20 years, 6 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-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
Branch point for: netbsd-2
Diff to: previous 1.67: preferred, colored; next MAIN 1.68: preferred, colored
Changes since revision 1.67: +6 -4 lines
Pull up revision 1.71 (requested by atatat in ticket #391):
Sysctl descriptions under net subtree (net.key not done)

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue May 25 04:33:59 2004 UTC (20 years, 6 months ago) by atatat
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +6 -4 lines
Sysctl descriptions under net subtree (net.key not done)

Revision 1.70: download - view: text, markup, annotated - select for diffs
Thu Apr 22 01:01:40 2004 UTC (20 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -3 lines
Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Wed Apr 21 21:03:43 2004 UTC (20 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +34 -70 lines
ANSI-fy and some additional de-__P and constification.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed Apr 21 04:17:28 2004 UTC (20 years, 7 months ago) by matt
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +5 -5 lines
Constify if.c radix.c and route.c (and fix related fallout).

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed Mar 24 15:34:54 2004 UTC (20 years, 8 months ago) by atatat
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +8 -5 lines
Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Dec 28 22:36:37 2003 UTC (20 years, 11 months ago) by atatat
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -2 lines
Sysctl functions called for "generic" nodes should forward "query"
requests (where possible), rather than returning errors.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Dec 4 19:38:24 2003 UTC (21 years ago) by atatat
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +25 -11 lines
Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Aug 7 16:32:58 2003 UTC (21 years, 4 months ago) by agc
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +3 -7 lines
Move UCB-licensed code from 4-clause to 3-clause licence.

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

Revision 1.63.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:26:57 2003 UTC (21 years, 5 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +6 -6 lines
Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:31:53 2003 UTC (21 years, 5 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +4 -4 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:22:07 2003 UTC (21 years, 5 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +6 -6 lines
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.40.4.2: download - view: text, markup, annotated - select for diffs
Wed Jun 25 09:26:12 2003 UTC (21 years, 5 months ago) by msaitoh
Branches: netbsd-1-5
Diff to: previous 1.40.4.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.4.1: +17 -1 lines
Pullup reviosion 1.60 (requested by itojun in ticket #48):
  recover code that requires exact match on rtm_change/lock (lost in 1.16).
  without it "route change X" would change less-specific route by mistake.
  reported by jinmei@kame

Revision 1.55.10.1: download - view: text, markup, annotated - select for diffs
Tue Jun 24 09:55:37 2003 UTC (21 years, 5 months ago) by grant
Branches: netbsd-1-6
CVS tags: 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
Diff to: previous 1.55: preferred, colored; next MAIN 1.56: preferred, colored
Changes since revision 1.55: +18 -2 lines
Pull up revision 1.61 (requested by itojun in ticket #1336):

recover code that requires exact match on rtm_change/lock (lost in
1.16). without it "route change X" would change less-specific route by
mistake.  reported by jinmei@kame

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Jun 24 08:31:32 2003 UTC (21 years, 5 months ago) by itojun
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +18 -2 lines
recover code that requires exact match on rtm_change/lock (lost in 1.16).
without it "route change X" would change less-specific route by mistake.
reported by jinmei@kame

Revision 1.60: download - view: text, markup, annotated - select for diffs
Fri May 16 04:54:56 2003 UTC (21 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -3 lines
use strlcpy

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri May 2 03:15:25 2003 UTC (21 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +5 -6 lines
KNF

Revision 1.58: download - view: text, markup, annotated - select for diffs
Wed Feb 26 06:31:13 2003 UTC (21 years, 9 months ago) by matt
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +6 -4 lines
Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.45.2.11: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:46:34 2002 UTC (21 years, 11 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.45.2.10: preferred, colored; branchpoint 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.2.10: +1 -1 lines
Sync with HEAD.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Nov 24 11:38:51 2002 UTC (22 years ago) by scw
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +3 -3 lines
Quell an uninitialised variable warning.

Revision 1.45.2.10: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:15:06 2002 UTC (22 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.9: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.9: +3 -3 lines
Catch up to -current

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sat Nov 2 07:26:57 2002 UTC (22 years, 1 month ago) by perry
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
/*CONTCOND*/ while (0)'ed macros

Revision 1.45.2.9: download - view: text, markup, annotated - select for diffs
Fri Jul 12 01:40:31 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.8: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.8: +2 -3 lines
No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.45.2.8: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:11:43 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.7: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.7: +4 -4 lines
Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.47.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:02:09 2002 UTC (22 years, 8 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.47.2.2: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47.2.2: +6 -4 lines
Catch up with -current.

Revision 1.45.2.7: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:15:03 2002 UTC (22 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.6: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.6: +6 -4 lines
Catch up to -current.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Feb 22 17:26:31 2002 UTC (22 years, 9 months ago) by christos
Branches: MAIN
CVS tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, ifpoll-base, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -4 lines
PR/15703: Sean Boudreau: Case in route_output() where struct rtentry *rt
dereferenced after free.

Revision 1.47.2.2: download - view: text, markup, annotated - select for diffs
Thu Jan 10 20:02:21 2002 UTC (22 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.47.2.1: preferred, colored
Changes since revision 1.47.2.1: +11 -11 lines
Sync kqueue branch with -current.

Revision 1.45.2.6: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:17:31 2001 UTC (23 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.5: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.5: +10 -10 lines
Catch up to -current.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Nov 12 23:49:48 2001 UTC (23 years ago) by lukem
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +4 -1 lines
add RCSIDs

Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 12 21:19:21 2001 UTC (23 years ago) by thorpej
Branches: thorpej-mips-cache
Diff to: previous 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51: +7 -10 lines
Sync the thorpej-mips-cache branch with -current.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Nov 5 18:02:16 2001 UTC (23 years, 1 month ago) by matt
Branches: MAIN
CVS tags: thorpej-mips-cache-base
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +7 -7 lines
Switch to using queue access macros instead of refering to the member
fields explicitly.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Oct 29 07:02:32 2001 UTC (23 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +1 -4 lines
Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 1 12:47:38 2001 UTC (23 years, 2 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50: +2 -2 lines
Catch up with -current.

Revision 1.45.2.5: download - view: text, markup, annotated - select for diffs
Fri Sep 21 22:36:46 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.4: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.4: +2 -2 lines
Catch up to -current.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Sep 16 16:34:39 2001 UTC (23 years, 2 months ago) by wiz
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2
Branch point for: thorpej-mips-cache
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
Spell 'occurred' with two 'r's.

Revision 1.45.2.4: download - view: text, markup, annotated - select for diffs
Fri Aug 24 04:20:09 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.3: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.3: +2 -2 lines
A few files and lwp/proc conversions I missed in the last big update.
GENERIC runs again.

Revision 1.45.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:12:19 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.2: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.2: +19 -18 lines
Catch up with -current.

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:53 2001 UTC (23 years, 4 months ago) by lukem
Branches: kqueue
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +18 -17 lines
update to -current

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Jul 21 12:20:36 2001 UTC (23 years, 4 months ago) by itojun
Branches: MAIN
CVS tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +4 -2 lines
repair validation on RTAX_GENMASK insertion.  has been broken since 44bsd.
(freebsd3 has a fix since 1999, but has insufficient validation on sa_len)

Revision 1.49: download - view: text, markup, annotated - select for diffs
Thu Jul 19 00:12:09 2001 UTC (23 years, 4 months ago) by enami
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -2 lines
No need to clear part of struct rt_addrinfo in rt_xaddrs() since the only
caller clears whole the struct.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Wed Jul 18 16:43:10 2001 UTC (23 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +16 -16 lines
bzero -> memset

Revision 1.45.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:08:20 2001 UTC (23 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45.2.1: preferred, colored; branchpoint 1.45: preferred, colored
Changes since revision 1.45.2.1: +12 -2 lines
Catch up to -current.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Jun 4 08:57:58 2001 UTC (23 years, 6 months ago) by itojun
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +27 -64 lines
simplify previous change (mbuf length adjustment for rtsock response).

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Jun 4 01:30:11 2001 UTC (23 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +69 -22 lines
adjust routing socket response mbufs to the correct length.  sync with kame.

Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 5 22:49:55 2001 UTC (23 years, 9 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -3 lines
Initial commit of scheduler activations and lightweight process support.

Revision 1.31.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:23:54 2001 UTC (23 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.31.2.2: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.2.2: +14 -8 lines
Sync with head (for UBC+NFS fixes, mostly).

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Jan 17 04:05:42 2001 UTC (23 years, 10 months ago) by itojun
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +15 -9 lines
pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2 (UCB copyrighted).

have sys/net/route.c:rtrequest1(), which takes rt_addrinfo * as the argument.
pass rt_addrinfo all the way down to rtrequest, and ifa->ifa_rtrequest.
3rd arg of ifa->ifa_rtrequest is now rt_addrinfo * instead of sockaddr *
(almost noone is using it anyways).

benefit: the follwoing command now works.  previously we need two route(8)
invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0

remove unsafe typecast in rtrequest(), from rtentry * to sockaddr *.  it was
introduced by 4.3BSD-reno and never corrected.

XXX is eon_rtrequest() change correct regarding to 3rd arg?
eon_rtrequest() and rtrequest() were incorrect since 4.3BSD-reno,
so i do not have correct answer in the source code.
someone with more clue about netiso-over-ip, please help.

Revision 1.31.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 22 16:06:02 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.31.2.1: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.1: +19 -5 lines
Sync with HEAD.

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 18:10:11 2000 UTC (24 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +303 -183 lines
Update thorpej_scsipi to -current as of a month ago

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Nov 10 03:37:42 2000 UTC (24 years ago) by enami
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +19 -5 lines
Don't require the size of sockaddr to be rounded up if it was the last one
and was netmask.

Revision 1.40.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 19 13:38:13 2000 UTC (24 years, 1 month ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -2 lines
Pull up revision 1.43 (requested by itojun):
  Prevent stack overwrite due to bzero() argument mistake.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu Oct 19 01:07:42 2000 UTC (24 years, 1 month ago) by itojun
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +2 -2 lines
prevent stack overwrite due to bzero() arg mistake.  from msaitoh.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Sep 28 01:14:06 2000 UTC (24 years, 2 months ago) by erh
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +9 -4 lines
When grabbing address structures out of a character array make sure that the number of addresses and length of each match up with the size of the data we're handed.  Fixes arp on the alpha.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Wed Jun 28 02:53:49 2000 UTC (24 years, 5 months ago) by mrg
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -2 lines
<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Apr 15 17:51:28 2000 UTC (24 years, 7 months ago) by simonb
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +7 -4 lines
Remove some routing specific sysctl function declarations from
<sys/sysctl.h> and make them static in net/rtsock.c.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Mar 30 09:45:40 2000 UTC (24 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +40 -40 lines
Kill some more register declarations.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Mar 12 11:58:15 2000 UTC (24 years, 8 months ago) by itojun
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +2 -2 lines
initialize rn with 0, just to be sure

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Mar 10 14:47:13 2000 UTC (24 years, 9 months ago) by itojun
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +12 -8 lines
do not touch radix_node with RNF_ROOT on route_output().  this can
cause kernel panic (by non-root invocation of route(8)) on certain
routing table setup.
KAME PR: 217

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Mar 6 20:49:00 2000 UTC (24 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +32 -1 lines
- Add link status to if_data, so that routing daemons and other interested
  parties can easily know the state of a link.
- Define an interface announcement message for the routing socket so that
  routing daemons and other interested parties know when an interface
  is attached/detached.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Feb 17 04:28:00 2000 UTC (24 years, 9 months ago) by itojun
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +28 -85 lines
backout incomplete hack from KAME codebase (originally from bbn).

the hack tries to respect ifa or ifp passed to RTM_ADD.  However, the change
broke certain link-layers.  They include:
- midway ethernet card (en*), which uses sockaddr_dl in gateway portion
  to pass PVC information.  with the patch, the gateway portion will be
  overwritten by empty sockaddr_dl and PVC initialization will fail.
- IPv6, which can't set static ND table with the patch (ndp -s), for the
  similar reason as above.

There may be improved hack coming soon, hope the new one does not break others.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Feb 11 06:11:03 2000 UTC (24 years, 9 months ago) by itojun
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -2 lines
make assumption in rt_msg1 (len <= MHLEN + MLEN) explicit.
panic if not satisfied.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Feb 1 22:52:05 2000 UTC (24 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +16 -17 lines
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.31.8.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:36:12 1999 UTC (24 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +183 -51 lines
Pull up to last week's -current.

Revision 1.28.2.1.4.3: download - view: text, markup, annotated - select for diffs
Tue Nov 30 13:35:16 1999 UTC (25 years ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.28.2.1.4.2: preferred, colored; branchpoint 1.28.2.1: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1.4.2: +3 -1 lines
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.32: download - view: text, markup, annotated - select for diffs
Fri Nov 19 10:41:42 1999 UTC (25 years ago) by bouyer
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +183 -51 lines
Update protocoles and interfaces stats counters to 64bit.
RTM_IFINFO is now 0xf, 0xe is RTM_OIFINFO which returns the old (if_msghdr14)
struct with 32bit counters (binary compat, conditioned on COMPAT_14).
Same for sysctl: node 3 is renamed NET_RT_OIFLIST, NET_RT_IFLIST is now node 4.
Change rt_msg1() to add an mbuf to the mbuf chain instead of just panic()
when the message is larger than MHLEN.

Revision 1.28.2.1.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 2 22:32:29 1999 UTC (25 years, 4 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.28.2.1.2.2: preferred, colored; branchpoint 1.28.2.1: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28.2.1.2.2: +3 -1 lines
Update from trunk.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Fri Jul 9 23:41:16 1999 UTC (25 years, 5 months ago) by thorpej
Branches: MAIN
CVS tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -1 lines
defopt INET6, and put it in opt_inet.h (most places already include this
file, which is why the file list is so short).

Revision 1.28.2.1.4.2: download - view: text, markup, annotated - select for diffs
Tue Jul 6 11:02:41 1999 UTC (25 years, 5 months ago) by itojun
Branches: kame
CVS tags: kame_14_19990705
Diff to: previous 1.28.2.1.4.1: preferred, colored; branchpoint 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1.4.1: +28 -84 lines
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.28.2.1.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 1 23:45:20 1999 UTC (25 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.28.2.1.2.1: preferred, colored; branchpoint 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1.2.1: +120 -28 lines
Sync w/ -current.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Jul 1 08:12:49 1999 UTC (25 years, 5 months ago) by itojun
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +120 -28 lines
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.28.2.1.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 28 06:36:57 1999 UTC (25 years, 5 months ago) by itojun
Branches: kame
CVS tags: kame_14_19990628
Diff to: previous 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1: +176 -28 lines
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.28.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:27:37 1999 UTC (25 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.28.2.1: preferred, colored
Changes since revision 1.28.2.1: +1 -1 lines
Sync w/ -current.

Revision 1.28.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 2 22:41:08 1999 UTC (25 years, 8 months ago) by chopps
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Branch point for: kame, chs-ubc2
Diff to: previous 1.28: preferred, colored; next MAIN 1.29: preferred, colored
Changes since revision 1.28: +63 -21 lines
pull-up revision 1.29

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Apr 2 17:22:21 1999 UTC (25 years, 8 months ago) by chopps
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +63 -21 lines
deal with failure of malloc NOWAIT by restarting after mallocing with WAIT.
don't write beyond the users given buffer size (this happened if there was
	enough space for the initial malloc to succeed).

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sat Dec 12 17:26:09 1998 UTC (25 years, 11 months ago) by christos
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
fix thinko in previous change.

Revision 1.26.6.1: download - view: text, markup, annotated - select for diffs
Fri Dec 11 04:53:06 1998 UTC (26 years ago) by kenh
Branches: kenh-if-detach
Diff to: previous 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26: +28 -10 lines
The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Dec 10 15:52:40 1998 UTC (26 years ago) by christos
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +26 -20 lines
IPX counters and centralize statistics routine.

Revision 1.1.1.4 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:56:13 1998 UTC (26 years, 9 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: post-lite-2
Diff to: previous 1.1.1.3: preferred, colored
Changes since revision 1.1.1.3: +4 -2 lines
Import some files that were changed after Lite2

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:25:05 1998 UTC (26 years, 9 months ago) by fvdl
Branches: MAIN
CVS tags: kenh-if-detach-base, eeh-paddr_t-base, eeh-paddr_t, chs-ubc-base, chs-ubc
Branch point for: kenh-if-detach
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +5 -3 lines
Merge with Lite2 + local changes

Revision 1.1.1.3 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:13:24 1998 UTC (26 years, 9 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-2
Diff to: previous 1.1.1.2: preferred, colored
Changes since revision 1.1.1.2: +27 -23 lines
Import 4.4BSD-Lite2

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 1 02:10:10 1998 UTC (26 years, 9 months ago) by fvdl
Branches: WFJ-920714, CSRG
CVS tags: lite-1, date-03-may-96
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +461 -286 lines
Import 4.4BSD-Lite for reference

Revision 1.24.8.1: download - view: text, markup, annotated - select for diffs
Mon Dec 15 06:36:46 1997 UTC (26 years, 11 months ago) by mellon
Branches: netbsd-1-3
CVS tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +2 -2 lines
Pull rev 1.25 up from trunk (christos)

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Dec 10 00:47:57 1997 UTC (27 years ago) by christos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
PR/2733: Bill Sommerfeld: route change command can crash system. Actually
the case mentioned in the PR was fixed as part of PR/2582. There was a similar
case though that was not handled as part of my initial fix, which was fixed
in FreeBSD. I applied the remaining part from FreeBSD and the code matches
now the FreeBSD respective version. [this probably should be pulled up for 1.3]

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Mar 27 20:38:20 1997 UTC (27 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, netbsd-1-3-BETA, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Branch point for: netbsd-1-3
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -54 lines
m_copyback() is now in uipc_mbuf.c

Revision 1.22.4.1: download - view: text, markup, annotated - select for diffs
Wed Mar 12 15:57:00 1997 UTC (27 years, 8 months ago) by is
Branches: is-newarp
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +25 -2 lines
Merge in changes from The Trunk

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Feb 22 03:47:01 1997 UTC (27 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: is-newarp-before-merge
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +25 -2 lines
Allow non-superuser to open, listen to, and send safe commands on the
routing socket.  Superuser priviledge is required for all commands
but RTM_GET.

Revision 1.18.4.2: download - view: text, markup, annotated - select for diffs
Wed Dec 11 09:39:36 1996 UTC (28 years ago) by mycroft
Branches: netbsd-1-2
CVS tags: netbsd-1-2-PATCH001
Diff to: previous 1.18.4.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.4.1: +28 -31 lines
From trunk:
Fix null pointer dereference when attempting to change the default route
without specifying a gateway.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Dec 11 09:37:42 1996 UTC (28 years ago) by mycroft
Branches: MAIN
CVS tags: thorpej-setroot, mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +6 -4 lines
Undo silly part of previous change.

Revision 1.18.4.1: download - view: text, markup, annotated - select for diffs
Wed Dec 11 03:43:56 1996 UTC (28 years ago) by mycroft
Branches: netbsd-1-2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -4 lines
From trunk:
Eliminate SS_PRIV; instead, pass down a proc pointer to the usrreq methods
that need it.
Fix numerous memory leaks and bogus return values.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jul 1 01:12:32 1996 UTC (28 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +29 -34 lines
- Fix PR/2582: default route change without specifying gateway kills system.

While I was there:
- Fix KNF style problem.
- Remove bogus casts to 0, and (caddr_t).

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu May 23 18:30:57 1996 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -2 lines
We must indirect through the higher-level protocol for
PRU_{BIND,CONNECT} so that it can check the sockaddr.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed May 22 13:55:18 1996 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +4 -3 lines
Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Mar 29 00:32:10 1996 UTC (28 years, 8 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
make this version of ROUNDUP() consistent with the others in this directory.
(only makes a diff on the alpha.)

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Feb 13 22:00:52 1996 UTC (28 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +47 -26 lines
Net prototypes

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Aug 19 07:48:14 1995 UTC (29 years, 3 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +29 -25 lines
Update to latest code from CSRG.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Aug 17 02:57:23 1995 UTC (29 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
so_pcb should be a void *.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Aug 12 23:59:27 1995 UTC (29 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
splnet --> splsoftnet

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Jun 12 00:46:57 1995 UTC (29 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -6 lines
Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Mar 8 02:57:16 1995 UTC (29 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
fixed sized types, where appropriate.  when casting pointers to
integers to do math on them, cast to long.  ioctl commands are
u_longs.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:36:46 1994 UTC (30 years, 5 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri May 13 06:03:22 1994 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +446 -275 lines
Update to 4.4-Lite networking code, with a few local changes.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed May 11 09:26:51 1994 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -5 lines
Update to RTM version 3.  Add prototypes.  Add some new constants which are
not used yet.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat May 7 04:26:58 1994 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +3 -1 lines
kill kinfo stuff, for now

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Feb 10 17:25:06 1994 UTC (30 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -2 lines
Deprecate af.h.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Jan 16 02:22:57 1994 UTC (30 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
include <machine/cpu.h> not <machine/mtpr.h>

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sat Dec 18 00:41:04 1993 UTC (30 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +16 -16 lines
Canonicalize all #includes.

Revision 1.4.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 8 20:37:43 1993 UTC (31 years, 1 month ago) by mycroft
Branches: magnum
Diff to: previous 1.4.2.2: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.2: +13 -14 lines
Remove references to af.h.

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Sat Oct 16 10:49:33 1993 UTC (31 years, 1 month ago) by mycroft
Branches: magnum
Diff to: previous 1.4.2.1: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.2.1: +1 -2 lines
Nuke references to machine/mtpr.h.

Revision 1.4.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 24 08:54:10 1993 UTC (31 years, 2 months ago) by mycroft
Branches: magnum
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -3 lines
Make all files using spl*() #include cpu.h.  Changes from trunk.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Sep 4 00:00:20 1993 UTC (31 years, 3 months ago) by jtc
Branches: MAIN
CVS tags: magnum-base
Branch point for: magnum
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -1 lines
include systm.h to get prototypes (and possibly inlines) of *max functions.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sat May 22 11:42:21 1993 UTC (31 years, 6 months ago) by cgd
Branches: MAIN
CVS tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -2 lines
add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 18 18:20:03 1993 UTC (31 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: WFJ-920714, CSRG
CVS tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>