The NetBSD Project

CVS log for src/sys/netinet6/ip6_var.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.94 / (download) - annotate - [select for diffs], Fri Feb 9 22:08:37 2024 UTC (3 weeks, 2 days ago) by andvar
Branch: MAIN
CVS Tags: HEAD
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

fix spelling mistakes, mainly in comments and log messages.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (16 months ago) by ozaki-r
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.92: +6 -6 lines
Diff to previous 1.92 (colored)

inpcb: integrate data structures of PCB into one

Data structures of network protocol control blocks (PCBs), i.e.,
struct inpcb, in6pcb and inpcb_hdr, are not organized well.  Users of
the data structures have to handle them separately and thus the code
is cluttered and duplicated.

The commit integrates the data structures into one, struct inpcb.  As a
result, users of PCBs only have to handle just one data structure, so
the code becomes simple.

One drawback is that the data size of PCB for IPv4 increases by 40 bytes
(from 248 bytes to 288 bytes).

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

Fix PR kern/57037

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

Revision 1.91 / (download) - annotate - [select for diffs], Tue Aug 17 22:00:32 2021 UTC (2 years, 6 months ago) by andvar
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.90: +2 -2 lines
Diff to previous 1.90 (colored)

fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:02 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.87: +26 -4 lines
Diff to previous 1.87 (colored) next main 1.88 (colored)

Sync with HEAD.

Revision 1.90 / (download) - annotate - [select for diffs], Thu Mar 11 11:10:22 2021 UTC (2 years, 11 months ago) by ryo
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

flowlabel will never return anything other than 1 or 0.
s/&&/&/

Revision 1.89 / (download) - annotate - [select for diffs], Mon Mar 8 18:22:16 2021 UTC (2 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.88: +16 -4 lines
Diff to previous 1.88 (colored)

no need for ip6_id.c...

Revision 1.74.6.4 / (download) - annotate - [select for diffs], Sun Mar 7 19:13:23 2021 UTC (2 years, 11 months ago) by martin
Branch: netbsd-8
Changes since 1.74.6.3: +11 -1 lines
Diff to previous 1.74.6.3 (colored) to branchpoint 1.74 (colored) next main 1.75 (colored)

Pull up following revision(s) (requested by christos in ticket #1661):

	sys/netinet6/ip6_id.c: revision 1.19-1.21
	sys/netinet6/ip6_var.h: revision 1.88
	sys/netinet/ip_input.c: revision 1.400
	sys/netinet/tcp_subr.c: revision 1.285
	sys/netinet/ip6.h: revision 1.30

netinet: Enable random IP fragment ids by default (from riastradh)

netinet: Enable RFC 1948 pseudorandom TCP ISS selection by default.
(from riastradh)

netinet6: Mark randomid unused.

Will make merging and bisection easier if anything goes wrong with
flow label or fragment id randomization changes.
(from riastradh)

netinet/netinet6: Add necessary includes to make these standalone.
(from riastradh)

Replace randomid() by cprng_fast32()

Revision 1.82.2.1 / (download) - annotate - [select for diffs], Sun Mar 7 19:04:31 2021 UTC (2 years, 11 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.82: +11 -1 lines
Diff to previous 1.82 (colored) next main 1.83 (colored)

Pull up following revision(s) (requested by christos in ticket #1226):

	sys/netinet6/ip6_id.c: revision 1.19-1.21
	sys/netinet6/ip6_var.h: revision 1.88
	sys/netinet/ip_input.c: revision 1.400
	sys/netinet/tcp_subr.c: revision 1.285
	sys/netinet/ip6.h: revision 1.30

netinet: Enable random IP fragment ids by default (from riastradh)

netinet: Enable RFC 1948 pseudorandom TCP ISS selection by default.
(from riastradh)

netinet6: Mark randomid unused.

Will make merging and bisection easier if anything goes wrong with
flow label or fragment id randomization changes.
(from riastradh)

netinet/netinet6: Add necessary includes to make these standalone.
(from riastradh)

Replace randomid() by cprng_fast32()

Revision 1.88 / (download) - annotate - [select for diffs], Sun Mar 7 15:01:35 2021 UTC (2 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.87: +11 -1 lines
Diff to previous 1.87 (colored)

netinet/netinet6: Add necessary includes to make these standalone.
(from riastradh)

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 28 06:32:24 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.86: +7 -2 lines
Diff to previous 1.86 (colored)

inet6: reduce silent packet discards

Revision 1.86 / (download) - annotate - [select for diffs], Fri Aug 28 06:28:58 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

inet6: pass rcvif to ip6_forward to avoid extra psref_acquire

Revision 1.85 / (download) - annotate - [select for diffs], Fri Aug 28 06:19:13 2020 UTC (3 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.84: +4 -2 lines
Diff to previous 1.84 (colored)

inet, inet6: count packets dropped by IPsec

The counters count packets dropped due to security policy checks.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Jun 19 16:08:06 2020 UTC (3 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.83: +1 -5 lines
Diff to previous 1.83 (colored)

localify

Revision 1.83 / (download) - annotate - [select for diffs], Fri Jun 12 11:04:45 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.82: +1 -8 lines
Diff to previous 1.82 (colored)

Remove in-kernel handling of Router Advertisements

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

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

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

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

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

Sync with HEAD

Revision 1.82 / (download) - annotate - [select for diffs], Mon May 13 07:47:59 2019 UTC (4 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Changes since 1.81: +4 -2 lines
Diff to previous 1.81 (colored)

Count packets dropped by pfil

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

Sync with HEAD, resolve a few conflicts

Revision 1.81 / (download) - annotate - [select for diffs], Thu Nov 29 09:51:21 2018 UTC (5 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, isaki-audio2-base, isaki-audio2
Changes since 1.80: +8 -1 lines
Diff to previous 1.80 (colored)

Introduce and use ip_dad_enabled() and ip6_dad_enabled() functions

Revision 1.74.6.3 / (download) - annotate - [select for diffs], Thu Sep 27 15:57:07 2018 UTC (5 years, 5 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.74.6.2: +2 -1 lines
Diff to previous 1.74.6.2 (colored) to branchpoint 1.74 (colored)

Additional change needed for ticket #1041:

	sys/netinet6/ip6_var.h (apply patch)

When reassembling IPv4/IPv6 packets, ensure each fragment has been subject
to the same IPsec processing. That is to say, that all fragments are ESP,
or AH, or AH+ESP, or none.

Add ipsec flags to struct ip6q.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Feb 14 05:29:39 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored)

Re-make ip6_nexthdr global, it will be used in soon-to-be-added code...

Revision 1.74.6.2 / (download) - annotate - [select for diffs], Sun Feb 11 21:17:34 2018 UTC (6 years ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.74.6.1: +3 -2 lines
Diff to previous 1.74.6.1 (colored) to branchpoint 1.74 (colored)

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

Revision 1.58.6.2 / (download) - annotate - [select for diffs], Tue Jan 30 18:47:35 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-6-0
Changes since 1.58.6.1: +2 -2 lines
Diff to previous 1.58.6.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Pull up following revision(s) (requested by maxv in ticket #1523):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
	sys/netinet6/ah_input.c: adjust other callers (patch)
	sys/netinet6/esp_input.c: adjust other callers (patch)
	sys/netinet6/ipcomp_input.c: adjust other callers (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.58.8.2 / (download) - annotate - [select for diffs], Tue Jan 30 18:45:59 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-6-1
Changes since 1.58.8.1: +2 -2 lines
Diff to previous 1.58.8.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Pull up following revision(s) (requested by maxv in ticket #1523):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
	sys/netinet6/ah_input.c: adjust other callers (patch)
	sys/netinet6/esp_input.c: adjust other callers (patch)
	sys/netinet6/ipcomp_input.c: adjust other callers (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.58.2.2 / (download) - annotate - [select for diffs], Tue Jan 30 18:44:22 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-6
Changes since 1.58.2.1: +2 -2 lines
Diff to previous 1.58.2.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Pull up following revision(s) (requested by maxv in ticket #1523):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
	sys/netinet6/ah_input.c: adjust other callers (patch)
	sys/netinet6/esp_input.c: adjust other callers (patch)
	sys/netinet6/ipcomp_input.c: adjust other callers (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.62.2.1.2.1 / (download) - annotate - [select for diffs], Tue Jan 30 18:31:53 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-7-0
Changes since 1.62.2.1: +2 -2 lines
Diff to previous 1.62.2.1 (colored) next main 1.62.2.2 (colored)

Pull up following revision(s) (requested by maxv in ticket #1560):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.62.2.1.6.1 / (download) - annotate - [select for diffs], Tue Jan 30 18:30:31 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-7-1
CVS Tags: netbsd-7-1-2-RELEASE
Changes since 1.62.2.1: +2 -2 lines
Diff to previous 1.62.2.1 (colored) next main 1.62.2.2 (colored)

Pull up following revision(s) (requested by maxv in ticket #1560):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.62.2.2 / (download) - annotate - [select for diffs], Tue Jan 30 18:28:45 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.62.2.1: +2 -2 lines
Diff to previous 1.62.2.1 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Pull up following revision(s) (requested by maxv in ticket #1560):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160 (patch)
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.74.6.1 / (download) - annotate - [select for diffs], Tue Jan 30 18:21:09 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Pull up following revision(s) (requested by maxv in ticket #527):
	sys/netinet6/frag6.c: revision 1.65
	sys/netinet6/ip6_input.c: revision 1.187
	sys/netinet6/ip6_var.h: revision 1.78
	sys/netinet6/raw_ip6.c: revision 1.160
Fix a buffer overflow in ip6_get_prevhdr. Doing
        mtod(m, char *) + len
is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.
The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.
But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.
However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.
As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.
Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.
Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.
This place is still fragile.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jan 30 15:54:02 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.78: +1 -2 lines
Diff to previous 1.78 (colored)

Style, localify, remove dead code, and fix typos. No functional change.

Revision 1.78 / (download) - annotate - [select for diffs], Tue Jan 30 14:49:25 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

Fix a buffer overflow in ip6_get_prevhdr. Doing

	mtod(m, char *) + len

is wrong, an option is allowed to be located in another mbuf of the chain.
If the offset of an option within the chain is bigger than the length of
the first mbuf in that chain, we are reading/writing one byte of packet-
controlled data beyond the end of the first mbuf.

The length of this first mbuf depends on the layout the network driver
chose. In the most difficult case, it will allocate a 2KB cluster, which
is bigger than the Ethernet MTU.

But there is at least one way of exploiting this case: by sending a
special combination of nested IPv6 fragments, the packet can control a
good bunch of 'len'. By luck, the memory pool containing clusters does not
embed the pool header in front of the items, so it is not straightforward
to predict what is located at 'mtod(m, char *) + len'.

However, by sending offending fragments in a loop, it is possible to
crash the kernel - at some point we will hit important data structures.

As far as I can tell, PF protects against this difficult case, because
it kicks nested fragments. NPF does not protect against this. IPF I don't
know.

Then there are the more easy cases, if the MTU is bigger than a cluster,
or if the network driver did not allocate a cluster, or perhaps if the
fragments are received via a tunnel; I haven't investigated these cases.

Change ip6_get_prevhdr so that it returns an offset in the chain, and
always use IP6_EXTHDR_GET to get a writable pointer. IP6_EXTHDR_GET
leaves M_PKTHDR untouched.

This place is still fragile.

Revision 1.77 / (download) - annotate - [select for diffs], Mon Jan 29 10:57:13 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.76: +1 -4 lines
Diff to previous 1.76 (colored)

Start cleaning up ip6_input.c. Several pieces of code have evolved but
their neighboring comments were not updated. So update them, and remove
code that has been disabled for years (it has no use anyway).

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jan 25 15:33:06 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.75: +1 -42 lines
Diff to previous 1.75 (colored)

Several changes:

 * Move the structure definitions into frag6.c, they should not be used
   elsewhere.

 * Rename ip6af_mff -> ip6af_more, and switch it to bool, easier to
   understand.

 * Remove IP6_REASS_MBUF, no point in keeping this.

 * Remove ip6q_arrive and ip6q_nxtp, unused.

 * Style.

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

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

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

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

Revision 1.59.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.59.2.1: +24 -15 lines
Diff to previous 1.59.2.1 (colored) to branchpoint 1.59 (colored) next main 1.60 (colored)

update from HEAD

Revision 1.63.2.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:12 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.63.2.5: +8 -7 lines
Diff to previous 1.63.2.5 (colored) to branchpoint 1.63 (colored) next main 1.64 (colored)

Sync with HEAD

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

Sync with HEAD

Revision 1.67.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:51 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.67.2.2: +8 -7 lines
Diff to previous 1.67.2.2 (colored) to branchpoint 1.67 (colored) next main 1.68 (colored)

Sync with HEAD

Revision 1.74 / (download) - annotate - [select for diffs], Fri Mar 3 07:13:06 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.73: +3 -5 lines
Diff to previous 1.73 (colored)

Pass inpcb/in6pcb instead of socket to ip_output/ip6_output

- Passing a socket to Layer 3 is layer violation and even unnecessary
- The change makes codes of callers and IPsec a bit simple

Revision 1.73 / (download) - annotate - [select for diffs], Thu Mar 2 05:24:23 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

Make usages of ifp MP-safe in some functions of IP multicast

Revision 1.72 / (download) - annotate - [select for diffs], Tue Feb 14 03:05:06 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.71: +4 -1 lines
Diff to previous 1.71 (colored)

Do ND in L2_output in the same manner as arpresolve

The benefits of this change are:
- The flow is consistent with IPv4 (and FreeBSD and OpenBSD)
  - old: ip6_output => nd6_output (do ND if needed) => L2_output (lookup a stored cache)
  - new: ip6_output => L2_output (lookup a cache. Do ND if cache not found)
- We can remove some workarounds in nd6_output
- We can move L2 specific operations to their own place
- The performance slightly improves because one cache lookup is reduced

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

Sync with HEAD

Revision 1.67.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.67.2.1: +3 -4 lines
Diff to previous 1.67.2.1 (colored) to branchpoint 1.67 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Thu Dec 8 05:16:34 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

Add rtcache_unref to release points of rtentry stemming from rtcache

In the MP-safe world, a rtentry stemming from a rtcache can be freed at any
points. So we need to protect rtentries somehow say by reference couting or
passive references. Regardless of the method, we need to call some release
function of a rtentry after using it.

The change adds a new function rtcache_unref to release a rtentry. At this
point, this function does nothing because for now we don't add a reference
to a rtentry when we get one from a rtcache. We will add something useful
in a further commit.

This change is a part of changes for MP-safe routing table. It is separated
to avoid one big change that makes difficult to debug by bisecting.

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

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Thu Nov 10 04:13:53 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.69: +2 -3 lines
Diff to previous 1.69 (colored)

Tidy up in6_select*

This change tidies up in6_select* functions, especially
selectroute.

selectroute is annoying because:
- It returns both/either of a rtentry and/or an ifp
  - Yes, it may return only an ifp!
    - It is valid but selectroute shouldn't handle the case
  - Such conditional behavior makes it difficult
    to apply locking/psref thingy
- It may return a rtentry even if error
- It may use opt->ip6po_nextroute rtcache implicitly
  - The caller can know if it is used
    by rtcache_validate(&opt->ip6po_nextroute)
    but it's racy in MP-safe world
  - Even if it uses opt->ip6po_nextroute, it may
    return a rtentry that isn't derived from the rtcache

The change includes:
- Rename selectroute to in6_selectroute
  - Let a remaining caller of selectroute, in6_selectif,
    use in6_selectroute instead
- Let in6_selectroute return only an rtentry
  - If error, it doesn't return an rtentry
  - A caller gets an ifp from a returned rtentry
- Allow in6_selectroute to modify a passed rtcache
  and a caller can know if opt->ip6po_nextroute is
  used via the rtcache
- Let callers (ip6_output and in6_selectif) handle
  the case that only an ifp is required

Inspired by OpenBSD
Proposed on tech-kern and tech-net
LGTM by roy@

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

Sync with HEAD

Revision 1.69 / (download) - annotate - [select for diffs], Mon Oct 31 04:16:25 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Fix race condition of in6_selectsrc

in6_selectsrc returned a pointer to in6_addr that wan't guaranteed to be
safe by pserialize (or psref), which was racy. Let callers pass a pointer
to in6_addr and in6_selectsrc copy a result to it inside pserialize
critical sections.

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

Sync with HEAD

Revision 1.68 / (download) - annotate - [select for diffs], Tue Aug 23 09:59:20 2016 UTC (7 years, 6 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.67: +4 -3 lines
Diff to previous 1.67 (colored)

improve fast-forward performance when the number of flows exceeds ip6_maxflows.

This is porting of ip_flow.c:r1.76

In ip6flow case, the before degradation is about 45%, the after degradation is
bout 55%.

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

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Tue Jun 21 10:25:27 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

Make sure returning ifp from in6_select* functions psref-ed

To this end, callers need to pass struct psref to the functions
and the fuctions acquire a reference of ifp with it. In some cases,
we can simply use if_get_byindex, however, in other cases
(say rt->rt_ifp and ia->ifa_ifp), we have no MP-safe way for now.
In order to take a reference anyway we use non MP-safe function
if_acquire_NOMPSAFE for the latter cases. They should be fixed in
the future somehow.

Revision 1.66 / (download) - annotate - [select for diffs], Tue Jun 21 03:28:27 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

Replace ifp of ip_moptions and ip6_moptions with if_index

The motivation is the same as the mbuf's rcvif case; avoid having a pointer
of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.

ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6
that's life time is different from ifnet one and so an ifnet object can be
disappeared anytime we get it via them. Thus we need to look up an ifnet
object by if_index every time for safe.

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

Avoid storing a pointer of an interface in a mbuf

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

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

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

Proposed on tech-kern and tech-net.

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

Sync with HEAD

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Fri Jan 23 09:27:15 2015 UTC (9 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0
Changes since 1.62: +6 -1 lines
Diff to previous 1.62 (colored)

Pull up following revision(s) (requested by pettai in ticket #441):
	sys/netinet6/ip6_var.h: revision 1.64
	sys/netinet6/in6.h: revision 1.82
	sys/netinet6/in6_src.c: revision 1.56
	sys/netinet6/mld6.c: revision 1.62
	sys/netinet6/ip6_input.c: revision 1.150
	sys/netinet6/ip6_output.c: revision 1.161
Add net.inet6.ip6.prefer_tempaddr sysctl knob so that we can prefer
IPv6 temporary addresses as the source address.
Fixes PR kern/47100 based on a patch by Dieter Roelants.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Jan 20 21:27:36 2015 UTC (9 years, 1 month ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.63: +6 -1 lines
Diff to previous 1.63 (colored)

Add net.inet6.ip6.prefer_tempaddr sysctl knob so that we can prefer
IPv6 temporary addresses as the source address.

Fixes PR kern/47100 based on a patch by Dieter Roelants.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Oct 12 19:00:21 2014 UTC (9 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.62: +5 -2 lines
Diff to previous 1.62 (colored)

Refactor the multicast membership code so that we can handle v4 mapped
addresses using the v6 membership ioctls.

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:36 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

Rebase to HEAD as of a few days ago.

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

Rebase.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Jun 5 23:48:16 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.61: +1 -2 lines
Diff to previous 1.61 (colored)

- Implement pktqueue interface for lockless IP input queue.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().

Discussed on tech-net.

Revision 1.61 / (download) - annotate - [select for diffs], Mon May 19 02:51:25 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.60: +2 -1 lines
Diff to previous 1.60 (colored)

- 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.60 / (download) - annotate - [select for diffs], Sun May 18 14:46:16 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.59: +2 -1 lines
Diff to previous 1.59 (colored)

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.59.4.1 / (download) - annotate - [select for diffs], Wed Aug 28 15:21:48 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.59: +3 -1 lines
Diff to previous 1.59 (colored) next main 1.60 (colored)

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.58.8.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:56 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.58.6.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:34 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.58.2.1 / (download) - annotate - [select for diffs], Mon Jul 8 07:40:07 2013 UTC (10 years, 7 months ago) by jdc
Branch: netbsd-6
Changes since 1.58: +5 -1 lines
Diff to previous 1.58 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.55.4.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:49 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.55.4.2: +6 -1 lines
Diff to previous 1.55.4.2 (colored) to branchpoint 1.55 (colored) next main 1.56 (colored)

sync with head

Revision 1.59 / (download) - annotate - [select for diffs], Sat Jun 23 03:14:04 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy, rmind-smpnet
Changes since 1.58: +6 -1 lines
Diff to previous 1.58 (colored)

4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.55.4.2 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:44 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.55.4.1: +2 -4 lines
Diff to previous 1.55.4.1 (colored) to branchpoint 1.55 (colored)

sync with head

Revision 1.56.4.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:43 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.56: +2 -4 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

merge to -current.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jan 19 13:19:34 2012 UTC (12 years, 1 month ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-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: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.57: +1 -2 lines
Diff to previous 1.57 (colored)

Remove ip6f_start from ip6f struct

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 10 20:01:56 2012 UTC (12 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.56: +2 -3 lines
Diff to previous 1.56 (colored)

add patch from Arnaud Degroote to handle IPv6 extended options with
(FAST_)IPSEC, tested lightly with a DSTOPTS header consisting
of PAD1

Revision 1.55.4.1 / (download) - annotate - [select for diffs], Thu Nov 10 14:31:51 2011 UTC (12 years, 3 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

sync with head

Revision 1.56 / (download) - annotate - [select for diffs], Fri Nov 4 00:22:33 2011 UTC (12 years, 4 months ago) by zoltan
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: jmcneill-usbmp
Changes since 1.55: +2 -1 lines
Diff to previous 1.55 (colored)

Change the IPv6 reassembly mechanism to use mutex(9).
Also add ip6_reass_packet() to be used by NPF.

Revision 1.53.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:59 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.53: +4 -1 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

Sync with HEAD.

Revision 1.53.4.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:09 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.53: +4 -1 lines
Diff to previous 1.53 (colored) next main 1.54 (colored)

sync with head

Revision 1.55 / (download) - annotate - [select for diffs], Tue May 24 18:07:11 2011 UTC (12 years, 9 months ago) by spz
Branch: MAIN
CVS Tags: yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.54: +2 -1 lines
Diff to previous 1.54 (colored)

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

Revision 1.54 / (download) - annotate - [select for diffs], Tue May 3 17:44:30 2011 UTC (12 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

*_drain() routines may be called with locks held, so instead of doing
any work in *_drain(), set a drain-needed flag.  Do the work in the
fasttimo handler.

Contributed by Coyote Point Systems, Inc.

Revision 1.50.2.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:50 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.50.2.1: +2 -2 lines
Diff to previous 1.50.2.1 (colored) to branchpoint 1.50 (colored) next main 1.51 (colored)

sync with head

Revision 1.51.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:29 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.51: +3 -2 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

Sync with HEAD.

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

Revision 1.53 / (download) - annotate - [select for diffs], Wed May 6 21:41:59 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Remove some usage of "priv" and "privileged" variables and instead pass
around credentials. Also push down kauth(9) calls closer to where the
operation is done.

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/30/msg001270.html

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:19 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.50: +7 -5 lines
Diff to previous 1.50 (colored)

sync with head.

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:23 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored) next main 1.52 (colored)

Sync with HEAD.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 23 18:43:20 2009 UTC (14 years, 11 months ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

Init ip6flow pool dynamically instead of using a linkset.

Revision 1.50.8.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:52 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.50: +6 -5 lines
Diff to previous 1.50 (colored) next main 1.51 (colored)

Sync with HEAD.

Revision 1.46.16.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:59 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.46.16.2: +5 -4 lines
Diff to previous 1.46.16.2 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored)

Sync with HEAD.

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

Sync with wrstuden-revivesa-base-2.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 7 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, nick-hppapmap-base2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, jym-xensuspend
Changes since 1.50: +6 -5 lines
Diff to previous 1.50 (colored)

Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core

Revision 1.46.16.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:27 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.46.16.1: +64 -65 lines
Diff to previous 1.46.16.1 (colored) to branchpoint 1.46 (colored)

Sync with HEAD.

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:35 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored) next main 1.50 (colored)

sync with head.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:38 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa, haad-dm
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

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.49 / (download) - annotate - [select for diffs], Tue Apr 15 03:57:04 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.48: +3 -8 lines
Diff to previous 1.48 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Apr 8 23:37:43 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.47: +63 -59 lines
Diff to previous 1.47 (colored)

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

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

Revision 1.46.16.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:09 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)

Sync with HEAD.

Revision 1.33.12.5 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:10 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.33.12.4: +1 -2 lines
Diff to previous 1.33.12.4 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

sync with head.

Revision 1.46.12.2 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:24 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.46.12.1: +1 -2 lines
Diff to previous 1.46.12.1 (colored) to branchpoint 1.46 (colored) next main 1.47 (colored)

sync with head.

Revision 1.45.6.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:07 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.45.6.1: +1 -2 lines
Diff to previous 1.45.6.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

sync with HEAD

Revision 1.47 / (download) - annotate - [select for diffs], Wed Mar 19 08:10:18 2008 UTC (15 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.46: +1 -2 lines
Diff to previous 1.46 (colored)

No code ever sets struct ip6_pktopts member ip6po_m, so get rid of
it.

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

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

Revision 1.33.12.4 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:13 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.33.12.3: +5 -3 lines
Diff to previous 1.33.12.3 (colored) to branchpoint 1.33 (colored)

sync with head.

Revision 1.45.10.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:58 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.45: +5 -3 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Sync with HEAD

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

sync with HEAD

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Wed Oct 31 23:14:11 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.45: +5 -3 lines
Diff to previous 1.45 (colored) next main 1.46 (colored)

Sync with HEAD.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Oct 29 16:54:43 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, mjf-devfs, matt-armv6-base, jmcneill-pm-base, jmcneill-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.45: +5 -3 lines
Diff to previous 1.45 (colored)

The IPv6 stack labels incoming packets with an m_tag whose payload
is a struct ip6aux.  A struct ip6aux used to contain a pointer to
an in6_ifaddr, but that pointer could become a dangling reference
in the lifetime of the m_tag, because ip6_setdstifaddr() did not
increase the in6_ifaddr's reference count.  I have removed the
pointer from ip6aux.  I load it with the interesting fields from
the in6_ifaddr (an IPv6 address, a scope ID, and some flags),
instead.

Revision 1.33.12.3 / (download) - annotate - [select for diffs], Mon Sep 3 14:43:38 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.33.12.2: +42 -5 lines
Diff to previous 1.33.12.2 (colored) to branchpoint 1.33 (colored)

sync with head.

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:06 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.39.2.2: +3 -2 lines
Diff to previous 1.39.2.2 (colored) next main 1.40 (colored)

Sync with HEAD.

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:51 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.44: +3 -2 lines
Diff to previous 1.44 (colored) next main 1.45 (colored)

Sync with HEAD.

Revision 1.45.12.2 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:58 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.45.12.1: +393 -0 lines
Diff to previous 1.45.12.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

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

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

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

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

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

Cosmetic:

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

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

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

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

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

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

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

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

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

Revision 1.45.12.1, Thu Jul 19 20:48:57 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.45: +0 -393 lines
FILE REMOVED

file ip6_var.h was added on branch matt-mips64 on 2007-07-19 20:48:58 +0000

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:57 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.44: +3 -2 lines
Diff to previous 1.44 (colored)

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

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

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

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

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

Cosmetic:

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

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

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

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

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

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

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

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

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

Revision 1.39.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:45 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.39: +11 -8 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Sync with head.

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:56 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.39.2.1: +8 -6 lines
Diff to previous 1.39.2.1 (colored)

Sync with head.

Revision 1.32.6.1 / (download) - annotate - [select for diffs], Mon Jun 4 19:26:08 2007 UTC (16 years, 9 months ago) by bouyer
Branch: netbsd-2-1
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11330):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Mon Jun 4 19:24:35 2007 UTC (16 years, 9 months ago) by bouyer
Branch: netbsd-2-0
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11330):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf

Revision 1.32.4.1 / (download) - annotate - [select for diffs], Mon Jun 4 19:22:53 2007 UTC (16 years, 9 months ago) by bouyer
Branch: netbsd-2
Changes since 1.32: +4 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored)

Pull up following revision(s) (requested by adrianp in ticket #11330):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf

Revision 1.37.14.5 / (download) - annotate - [select for diffs], Thu May 17 13:41:52 2007 UTC (16 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.37.14.4: +1 -2 lines
Diff to previous 1.37.14.4 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

sync with head.

Revision 1.44 / (download) - annotate - [select for diffs], Thu May 17 11:48:42 2007 UTC (16 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (colored)

remove net.inet6.ip6.rht0 sysctl.
it's too dangerous compared to its benefit.

strongly requested by itojun@.  ok'ed by core@.

Revision 1.37.14.4 / (download) - annotate - [select for diffs], Mon May 7 10:56:06 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.37.14.3: +9 -6 lines
Diff to previous 1.37.14.3 (colored) to branchpoint 1.37 (colored)

sync with head.

Revision 1.43 / (download) - annotate - [select for diffs], Wed May 2 20:40:27 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.42: +8 -6 lines
Diff to previous 1.42 (colored)

Eliminate address family-specific route caches (struct route, struct
route_in6, struct route_iso), replacing all caches with a struct
route.

The principle benefit of this change is that all of the protocol
families can benefit from route cache-invalidation, which is
necessary for correct routing.  Route-cache invalidation fixes an
ancient PR, kern/3508, at long last; it fixes various other PRs,
also.

Discussions with and ideas from Joerg Sonnenberger influenced this
work tremendously.  Of course, all design oversights and bugs are
mine.

DETAILS

1 I added to each address family a pool of sockaddrs.  I have
  introduced routines for allocating, copying, and duplicating,
  and freeing sockaddrs:

        struct sockaddr *sockaddr_alloc(sa_family_t af, int flags);
        struct sockaddr *sockaddr_copy(struct sockaddr *dst,
                                       const struct sockaddr *src);
        struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags);
        void sockaddr_free(struct sockaddr *sa);

  sockaddr_alloc() returns either a sockaddr from the pool belonging
  to the specified family, or NULL if the pool is exhausted.  The
  returned sockaddr has the right size for that family; sa_family
  and sa_len fields are initialized to the family and sockaddr
  length---e.g., sa_family = AF_INET and sa_len = sizeof(struct
  sockaddr_in).  sockaddr_free() puts the given sockaddr back into
  its family's pool.

  sockaddr_dup() and sockaddr_copy() work analogously to strdup()
  and strcpy(), respectively.  sockaddr_copy() KASSERTs that the
  family of the destination and source sockaddrs are alike.

  The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is
  passed directly to pool_get(9).

2 I added routines for initializing sockaddrs in each address
  family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(),
  etc.  They are fairly self-explanatory.

3 structs route_in6 and route_iso are no more.  All protocol families
  use struct route.  I have changed the route cache, 'struct route',
  so that it does not contain storage space for a sockaddr.  Instead,
  struct route points to a sockaddr coming from the pool the sockaddr
  belongs to.  I added a new method to struct route, rtcache_setdst(),
  for setting the cache destination:

        int rtcache_setdst(struct route *, const struct sockaddr *);

  rtcache_setdst() returns 0 on success, or ENOMEM if no memory is
  available to create the sockaddr storage.

  It is now possible for rtcache_getdst() to return NULL if, say,
  rtcache_setdst() failed.  I check the return value for NULL
  everywhere in the kernel.

4 Each routing domain (struct domain) has a list of live route
  caches, dom_rtcache.  rtflushall(sa_family_t af) looks up the
  domain indicated by 'af', walks the domain's list of route caches
  and invalidates each one.

Revision 1.37.12.1 / (download) - annotate - [select for diffs], Sat Apr 28 18:30:13 2007 UTC (16 years, 10 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, 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, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Pull up following revision(s) (requested by christos in ticket #587):
	sys/netinet6/ip6_input.c: revision 1.102
	sys/netinet6/route6.c: revision 1.18
	sys/netinet6/ip6_var.h: revision 1.41
	sys/netinet6/ip6_var.h: revision 1.42
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.

Revision 1.33.22.1 / (download) - annotate - [select for diffs], Thu Apr 26 06:55:44 2007 UTC (16 years, 10 months ago) by ghen
Branch: netbsd-3-1
CVS Tags: netbsd-3-1-1-RELEASE
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by christos in ticket #1766):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revision 1.41 via patch
	sys/netinet6/ip6_var.h: revision 1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.

Revision 1.33.20.1 / (download) - annotate - [select for diffs], Thu Apr 26 06:55:37 2007 UTC (16 years, 10 months ago) by ghen
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by christos in ticket #1766):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revision 1.41 via patch
	sys/netinet6/ip6_var.h: revision 1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.

Revision 1.33.10.1 / (download) - annotate - [select for diffs], Thu Apr 26 06:55:11 2007 UTC (16 years, 10 months ago) by ghen
Branch: netbsd-3
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored) next main 1.34 (colored)

Pull up following revision(s) (requested by christos in ticket #1766):
	sys/netinet6/ip6_input.c: revision 1.102 via patch
	sys/netinet6/route6.c: revision 1.18 via patch
	sys/netinet6/ip6_var.h: revision 1.41 via patch
	sys/netinet6/ip6_var.h: revision 1.42 via patch
	sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
        http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.

Revision 1.42 / (download) - annotate - [select for diffs], Sun Apr 22 20:06:07 2007 UTC (16 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

fix typo.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Apr 22 19:47:41 2007 UTC (16 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored)

Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).

Information from:
	http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf

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

Sync with head.

Revision 1.39.6.1 / (download) - annotate - [select for diffs], Thu Mar 29 19:28:00 2007 UTC (16 years, 11 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored) next main 1.40 (colored)

Pullup to -current

Revision 1.37.14.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:12 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.37.14.2: +4 -3 lines
Diff to previous 1.37.14.2 (colored) to branchpoint 1.37 (colored)

sync with head.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Mar 23 14:24:22 2007 UTC (16 years, 11 months ago) by liamjfoy
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.39: +4 -3 lines
Diff to previous 1.39 (colored)

Add a new sysctl net.inet6.ip6.hashsize to control the hash table size.

The sysctl handler will ensure this value is a power of 2

ok dyoung@

Revision 1.37.14.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:58 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.37.14.1: +34 -1 lines
Diff to previous 1.37.14.1 (colored) to branchpoint 1.37 (colored)

Sync with HEAD.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 7 22:20:04 2007 UTC (17 years ago) by liamjfoy
Branch: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.38: +34 -1 lines
Diff to previous 1.38 (colored)

Add IPv6 Fast Forward - the IPv4 counterpart:

If ip6_forward successfully forwards a packet, a cache, in this case a
ip6flow struct entry, will be created. ether_input and friends will
then be able to call ip6flow_fastforward with the packet which will then
be passed to if_output (unless an issue is found - in that case the packet
is passed back to ip6_input).

ok matt@ christos@ dyoung@ and joerg@

Revision 1.37.14.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:03 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.37: +69 -66 lines
Diff to previous 1.37 (colored)

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

Revision 1.33.12.2 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:52 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.33.12.1: +69 -66 lines
Diff to previous 1.33.12.1 (colored) to branchpoint 1.33 (colored)

sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:14 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.37: +69 -66 lines
Diff to previous 1.37 (colored)

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

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

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

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

Constify:

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

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

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

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

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:55 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.35.2.1: +34 -4 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync with head

Revision 1.33.12.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:09 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.33: +57 -5 lines
Diff to previous 1.33 (colored)

sync with head.

Revision 1.35.4.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:03 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.35.4.1: +29 -3 lines
Diff to previous 1.35.4.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

Sync with head.

Revision 1.36.4.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:45 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.36: +29 -3 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

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

Revision 1.35.6.2 / (download) - annotate - [select for diffs], Wed May 24 10:59:09 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.35.6.1: +29 -3 lines
Diff to previous 1.35.6.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

sync with head.

Revision 1.36.2.1 / (download) - annotate - [select for diffs], Thu May 11 23:31:35 2006 UTC (17 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.36: +29 -3 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

sync with head

Revision 1.37 / (download) - annotate - [select for diffs], Fri May 5 00:03:22 2006 UTC (17 years, 10 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, post-newlock2-merge, newlock2-nbase, newlock2-base, newlock2, netbsd-4-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-idlelwp, netbsd-4
Changes since 1.36: +29 -3 lines
Diff to previous 1.36 (colored)

Add support for RFC 3542 Adv. Socket API for IPv6 (which obsoletes 2292).
* RFC 3542 isn't binary compatible with RFC 2292.
* RFC 2292 support is on by default but can be disabled.
* update ping6, telnet and traceroute6 to the new API.

From the KAME project (www.kame.net).
Reviewed by core.

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

Sync with head.

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

sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Mar 5 23:47:08 2006 UTC (18 years ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Changes since 1.35: +5 -1 lines
Diff to previous 1.35 (colored)

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

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

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

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

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Tue Feb 7 04:51:49 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

in6pcb -> inpcb.

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:42 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.34: +24 -2 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

sync with head.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:36 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.34: +24 -2 lines
Diff to previous 1.34 (colored)

Better support of IPv6 scoped addresses.

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

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

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

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

merge ktrace-lwp.

Revision 1.26.2.5 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:18 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.26.2.4: +1 -2 lines
Diff to previous 1.26.2.4 (colored) next main 1.27 (colored)

Sync with HEAD

Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 18 01:43:43 2004 UTC (19 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, 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-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-2-RELEASE, netbsd-3-0-1-RELEASE, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf, netbsd-3-1, netbsd-3-0, netbsd-3
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

ip6_flow_seq is no longer available.

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

Fix the sync with head I botched.

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

Sync with HEAD.

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

Sync with HEAD

Revision 1.18.10.1 / (download) - annotate - [select for diffs], Thu Oct 2 20:30:32 2003 UTC (20 years, 5 months ago) by tron
Branch: 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
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

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

Revision 1.32 / (download) - annotate - [select for diffs], Sat Sep 6 03:36:33 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2-0, netbsd-2
Changes since 1.31: +4 -1 lines
Diff to previous 1.31 (colored)

randomize IPv4/v6 fragment ID and IPv6 flowlabel.  avoids predictability
of these fields.  ip_id.c is from openbsd.  ip6_id.c is adapted by kame.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Aug 22 21:53:09 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

change the additional arg to be passed to ip{,6}_output to struct socket *.

this fixes KAME policy lookup which was broken by the previous commit.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Aug 22 20:49:03 2003 UTC (20 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

(Accidentally-omitted change): update for ip6_output() to match commit below.

replace the set_socket() method of passing an extra struct socket*
argument to ip6_output() with a new explicit struct in6pcb* argument.
(The underlying socket can be obtained via in6pcb->inp6_socket.)

In preparation for fast-ipsec.  Reviewed by itojun.

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

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

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

Revision 1.28 / (download) - annotate - [select for diffs], Thu Aug 7 08:52:33 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

make net.inet6.ip6.redirect actually work.  from Tomoyuki Sahara via kame

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jul 8 07:20:11 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

prototype must not have variable name

Revision 1.26.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:01 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.26: +2 -2 lines
Diff to previous 1.26 (colored)

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.26 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:02 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.25: +1 -1 lines
Diff to previous 1.25 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:12 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

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.24 / (download) - annotate - [select for diffs], Tue Jan 28 22:35:21 2003 UTC (21 years, 1 month ago) by wiz
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

success, not sucess. Noted by mjl.

Revision 1.15.4.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:20 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.15.4.3: +2 -2 lines
Diff to previous 1.15.4.3 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

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

Revision 1.15.2.5 / (download) - annotate - [select for diffs], Tue Sep 17 21:23:26 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.15.2.4: +1 -1 lines
Diff to previous 1.15.2.4 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Catch up to -current.

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

correct signedness mixup in pointer passing.  sync w/kame

Revision 1.15.4.3 / (download) - annotate - [select for diffs], Fri Sep 6 08:49:34 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.15.4.2: +7 -1 lines
Diff to previous 1.15.4.2 (colored) to branchpoint 1.15 (colored)

sync kqueue branch with HEAD

Revision 1.15.2.4 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:52 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.15.2.3: +7 -1 lines
Diff to previous 1.15.2.3 (colored) to branchpoint 1.15 (colored)

Catch up to -current.

Revision 1.18.8.3 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:06 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18.8.2: +7 -1 lines
Diff to previous 1.18.8.2 (colored) to branchpoint 1.18 (colored) next main 1.19 (colored)

catch up with -current.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 30 22:40:40 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.21: +7 -1 lines
Diff to previous 1.21 (colored)

Changes to allow the IPv4 and IPv6 layers to align headers themseves,
as necessary:
* Implement a new mbuf utility routine, m_copyup(), is is like
  m_pullup(), except that it always prepends and copies, rather
  than only doing so if the desired length is larger than m->m_len.
  m_copyup() also allows an offset into the destination mbuf, which
  allows space for packet headers, in the forwarding case.
* Add *_HDR_ALIGNED_P() macros for IP, IPv6, ICMP, and IGMP.  These
  macros expand to 1 if __NO_STRICT_ALIGNMENT is defined, so that
  architectures which do not have strict alignment constraints don't
  pay for the test or visit the new align-if-needed path.
* Use the new macros to check if a header needs to be aligned, or to
  assert that it already is, as appropriate.

Note: This code is still somewhat experimental.  However, the new
code path won't be visited if individual device drivers continue
to guarantee that packets are delivered to layer 3 already properly
aligned (which are rules that are already in use).

Revision 1.15.4.2 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:17 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.15.4.1: +11 -3 lines
Diff to previous 1.15.4.1 (colored) to branchpoint 1.15 (colored)

catch up with -current on kqueue branch

Revision 1.18.8.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:47 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.18.8.1: +9 -3 lines
Diff to previous 1.18.8.1 (colored) to branchpoint 1.18 (colored)

catch up with -current.

Revision 1.15.2.3 / (download) - annotate - [select for diffs], Thu Jun 20 03:49:23 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.15.2.2: +11 -3 lines
Diff to previous 1.15.2.2 (colored) to branchpoint 1.15 (colored)

Catch up to -current.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 8 21:22:33 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.20: +8 -3 lines
Diff to previous 1.20 (colored)

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

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jun 7 22:03:02 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

sync IPV6_CHECKSUM handling with kame.

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

Catch up with -current.

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 28 03:04:07 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

limit number of IPv6 fragments (not the fragment queue size) to
fight against lots-of-frags DoS attacks.  sync w/kame

Revision 1.15.4.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:03:23 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.15: +3 -5 lines
Diff to previous 1.15 (colored)

Sync kqueue branch with -current.

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:22 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.15.2.1: +2 -2 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored)

Catch up to -current.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Dec 21 03:58:15 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

move in6_gif_hlim decl to in6_gif.c.  sync with kame

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

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

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

Catch up to -current.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Oct 15 09:51:17 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache
Changes since 1.15: +2 -4 lines
Diff to previous 1.15 (colored)

implement IPV6_V6ONLY socket option from draft-ietf-ipngwg-rfc2553bis-03.txt.
IPV6_BINDV6ONLY (netbsd only) is deprecated, but still work just like before.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:54 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.4: +104 -63 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Sun Aug 27 01:25:08 2000 UTC (23 years, 6 months ago) by itojun
Branch: 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
Changes since 1.12.4.1: +7 -2 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

pullup (approved by releng-1-5)

 > implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable.

 > cvs rdiff -r1.67 -r1.68 basesrc/lib/libc/gen/sysctl.3
 > cvs rdiff -r1.53 -r1.54 basesrc/sbin/sysctl/sysctl.8
 > cvs rdiff -r1.18 -r1.19 syssrc/sys/netinet6/in6.h
 > cvs rdiff -r1.29 -r1.30 syssrc/sys/netinet6/in6_pcb.c
 > cvs rdiff -r1.3 -r1.4 syssrc/sys/netinet6/in6_src.c
 > cvs rdiff -r1.25 -r1.26 syssrc/sys/netinet6/ip6_input.c
 > cvs rdiff -r1.14 -r1.15 syssrc/sys/netinet6/ip6_var.h

Revision 1.15 / (download) - annotate - [select for diffs], Sat Aug 26 11:03:46 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: nathanw_sa, kqueue
Changes since 1.14: +6 -1 lines
Diff to previous 1.14 (colored)

implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable.

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Fri Jul 14 06:14:34 2000 UTC (23 years, 7 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.12: +1 -15 lines
Diff to previous 1.12 (colored)

pullup (approved by releng-1-5)

remove m_pulldown statistics code.  it is highly experimental and belong
to kame tree only (not for *bsd).

1.4 -> 1.5	syssrc/sys/kern/uipc_mbuf2.c
1.8 -> 1.9	syssrc/sys/netinet/ip6.h
1.13 -> 1.14	syssrc/sys/netinet6/ip6_var.h

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jul 13 05:34:22 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.13: +1 -15 lines
Diff to previous 1.13 (colored)

remove m_pulldown statistics code.  it is highly experimental and belong
to kame tree only (not for *bsd).

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jul 6 12:36:19 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.12: +7 -4 lines
Diff to previous 1.12 (colored)

- do not use bitfield for router renumbering header.
- add protection mechanism against ND cache corruption due to bad NUD hints.
- more stats
- icmp6 pps limitation.  TOOD: should implement ppsratecheck(9).

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 21 23:53:31 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.11: +4 -2 lines
Diff to previous 1.11 (colored)

cleanup AH/policy processing.
- parse IPv6 header by using common function, ip6_{last,next}hdr.
- fix behaivior in multiple AH cases.
  make strict boundary checks on mbuf chasing.
(sync with latest kame)

Revision 1.11 / (download) - annotate - [select for diffs], Sat Feb 26 09:09:18 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

implement rip6_ctlinput, to cope with routing changes correctly.
(IMHO we need rip_ctlinput as well)

Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 26 08:39:20 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.9: +36 -1 lines
Diff to previous 1.9 (colored)

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

Revision 1.9 / (download) - annotate - [select for diffs], Thu Feb 3 18:13:02 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.8: +26 -27 lines
Diff to previous 1.8 (colored)

- Don't reuse ip6 header portion as reassembly pointer, to be friendly
  with LP64 arch.  (not tested on LP64, sorry)
- add comment on reass rule
- some other cleanups

NetBSD PR: 9340
From: iwamoto@sat.t.u-tokyo.ac.jp
(in sync with kame)

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

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

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

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jan 6 06:41:20 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)

make IPV6_BINDV6ONLY setsockopt available.  it controls behavior of
AF_INET6 wildcard listening socket.  heavily documented in ip6(4).
net.inet6.ip6.bindv6only defines default value.  default is 1.

"options INET6_BINDV6ONLY" removes any code fragment that supports
IPV6_BINDV6ONLY == 0 case (not defopt'ed as use of this is rare).

Revision 1.4.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:26 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.4: +75 -34 lines
Diff to previous 1.4 (colored) next main 1.5 (colored)

Pull up to last week's -current.

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

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

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

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

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

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

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

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

Revision 1.5 / (download) - annotate - [select for diffs], Fri Nov 19 10:41:43 1999 UTC (24 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.4: +32 -32 lines
Diff to previous 1.4 (colored)

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.2.2.3 / (download) - annotate - [select for diffs], Mon Aug 2 22:36:05 1999 UTC (24 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.2.2.2: +4 -2 lines
Diff to previous 1.2.2.2 (colored) next main 1.3 (colored)

Update from trunk.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jul 22 03:59:42 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

change unnecessary u_long/long into u_int32_t or something relevant.
more fixes should follow.

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

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

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

RCS ID police.

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

Sync w/ -current.

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

file ip6_var.h was added on branch chs-ubc2 on 1999-07-01 23:48:28 +0000

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

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

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

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

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

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

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

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

file ip6_var.h was initially added on branch kame.

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




CVSweb <webmaster@jp.NetBSD.org>