The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.256 / (download) - annotate - [select for diffs], Sat Feb 24 21:41:13 2024 UTC (2 days, 19 hours ago) by mlelstv
Branch: MAIN
CVS Tags: HEAD
Changes since 1.255: +6 -4 lines
Diff to previous 1.255 (colored)

Deliver timestamps also to raw sockets.
Fixes PR 57955

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

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

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

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

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

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

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

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

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

XXX  pullup-10 - hopefully before RC2

Revision 1.254 / (download) - annotate - [select for diffs], Fri Oct 28 05:25:36 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-RC1
Branch point for: netbsd-10
Changes since 1.253: +12 -12 lines
Diff to previous 1.253 (colored)

inpcb: separate inpcb again to reduce the size of PCB for IPv4

The data size of PCB for IPv4 increased because of the merge of
struct in6pcb.  The change decreases the size to the original size by
separating struct inpcb (again).  struct in4pcb and in6pcb that embed
struct inpcb are introduced.

Even after the separation, users don't need to realize the separation
and only have to use some macros to access dedicated data.  For example,
inp->inp_laddr is now accessed through in4p_laddr(inp).

Revision 1.253 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (16 months ago) by ozaki-r
Branch: MAIN
Changes since 1.252: +27 -28 lines
Diff to previous 1.252 (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.252 / (download) - annotate - [select for diffs], Mon Aug 29 09:14:02 2022 UTC (17 months, 4 weeks ago) by knakahara
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.251: +14 -2 lines
Diff to previous 1.251 (colored)

Add sysctl entry to control to send routing message for RTM_DYNAMIC.

Some routing daemons require such routing message to keep coherency.

If we want to let kernel send such message, set net.inet.icmp.dynamic_rt_msg=1
for IPv4, net.inet6.icmp6.dynamic_rt_msg=1 for IPv6.
Default(=0) is the same as before, that is, not send such routing message.

Revision 1.251 / (download) - annotate - [select for diffs], Mon Aug 22 09:25:55 2022 UTC (18 months ago) by knakahara
Branch: MAIN
Changes since 1.250: +15 -3 lines
Diff to previous 1.250 (colored)

Add sysctl entry to enable/disable to use path MTU discovery for icmpv6 reflecting.

If we want to use path MTU discovery for icmp reflecting set
net.inet6.icmp6.reflect_pmtu=1.  Default(=0) is the same as before, that is,
use IPV6_MINMTU.

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

Sync with HEAD.

Revision 1.250 / (download) - annotate - [select for diffs], Fri Feb 19 14:52:00 2021 UTC (3 years ago) by christos
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.249: +4 -4 lines
Diff to previous 1.249 (colored)

- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
  correct because it works with non-primitive types and provides the ABI
  alignment for the type the compiler will use.
- Remove all the *_HDR_ALIGNMENT macros and asserts
- Replace POINTER_ALIGNED_P with ACCESSIBLE_POINTER which is identical to
  ALIGNED_POINTER, but returns that the pointer is always aligned if the
  CPU supports unaligned accesses.
[ as proposed in tech-kern ]

Revision 1.249 / (download) - annotate - [select for diffs], Mon Feb 15 10:13:45 2021 UTC (3 years ago) by martin
Branch: MAIN
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored)

Fix the build.
Maybe there should be a ICMP6_HDR_ALIGNMENT, but for now there is
only IP6_HDR_ALIGNMENT.

Revision 1.248 / (download) - annotate - [select for diffs], Sun Feb 14 20:58:35 2021 UTC (3 years ago) by christos
Branch: MAIN
Changes since 1.247: +4 -4 lines
Diff to previous 1.247 (colored)

- centralize header align and pullup into a single inline function
- use a single macro to align pointers and expose the alignment, instead
  of hard-coding 3 in 1/2 the macros.
- fix an issue in the ipv6 lt2p where it was aligning for ipv4 and pulling
  for ipv6.

Revision 1.247 / (download) - annotate - [select for diffs], Fri Sep 11 15:03:33 2020 UTC (3 years, 5 months ago) by roy
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.246: +24 -24 lines
Diff to previous 1.246 (colored)

inet6: Use generic Neighor Detection rather than IPv6 specific

No functional change intended.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Jul 27 14:52:55 2020 UTC (3 years, 7 months ago) by roy
Branch: MAIN
Changes since 1.245: +28 -2 lines
Diff to previous 1.245 (colored)

icmp6: Remove __packed attribute from icmp6 structures

They should naturally align.
Add compile time assertations to icmp6.c to prove this.

Revision 1.245 / (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.244: +19 -23 lines
Diff to previous 1.244 (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.238.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:17 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.238.2.2: +2 -3 lines
Diff to previous 1.238.2.2 (colored) to branchpoint 1.238 (colored) next main 1.239 (colored)

Mostly merge changes from HEAD upto 20200411

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

Merge changes from current as of 20200406

Revision 1.244 / (download) - annotate - [select for diffs], Mon Mar 9 21:20:56 2020 UTC (3 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.243: +4 -3 lines
Diff to previous 1.243 (colored)

route: RTM_MISS now puts the message source address in RTA_AUTHOR

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

Revision 1.243 / (download) - annotate - [select for diffs], Sun Oct 6 02:30:58 2019 UTC (4 years, 4 months ago) by uwe
Branch: MAIN
CVS Tags: phil-wifi-20191119, is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.242: +4 -5 lines
Diff to previous 1.242 (colored)

icmp6_notify_error - fix ctlfunc typedef to match pr_ctlinput,
drop the cast that is no longer necessary.

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

Sync with HEAD

Revision 1.223.2.8 / (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.223.2.7: +4 -4 lines
Diff to previous 1.223.2.7 (colored) to branchpoint 1.223 (colored) next main 1.224 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.242 / (download) - annotate - [select for diffs], Sat Dec 22 14:07:54 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, isaki-audio2-base, isaki-audio2
Changes since 1.241: +3 -3 lines
Diff to previous 1.241 (colored)

Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.

Revision 1.241 / (download) - annotate - [select for diffs], Sat Dec 22 13:11:38 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.240: +3 -3 lines
Diff to previous 1.240 (colored)

Replace: M_MOVE_PKTHDR -> m_move_pkthdr. No functional change, since the
former is a macro to the latter.

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

Sync with HEAD, resolve a couple of conflicts

Revision 1.211.6.8 / (download) - annotate - [select for diffs], Thu Oct 25 18:32:54 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.211.6.7: +2 -3 lines
Diff to previous 1.211.6.7 (colored) to branchpoint 1.211 (colored) next main 1.212 (colored)

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

	sys/netinet6/icmp6.c: revision 1.240

Remove a leftover debug printf

Pointed out by hannken@

Revision 1.240 / (download) - annotate - [select for diffs], Thu Oct 25 02:40:45 2018 UTC (5 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.239: +2 -3 lines
Diff to previous 1.239 (colored)

Remove a leftover debug printf

Pointed out by hannken@

Revision 1.223.2.6 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:45 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223.2.5: +3 -3 lines
Diff to previous 1.223.2.5 (colored) to branchpoint 1.223 (colored)

Sync with HEAD

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

Revision 1.239 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:36 2018 UTC (5 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.238: +3 -3 lines
Diff to previous 1.238 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

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

Sync with HEAD

Revision 1.211.6.7 / (download) - annotate - [select for diffs], Sat Jun 23 11:03:27 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.211.6.6: +6 -39 lines
Diff to previous 1.211.6.6 (colored) to branchpoint 1.211 (colored)

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

	sys/netinet6/icmp6.c: revision 1.228,1.230

Remove the RH0 code from ICMPv6. RH0 is deprecated by RFC5095 (2007) for
security reasons. We already removed it in Route6.

In addition there was an mbuf bug here: calling IP6_EXTHDR_GET twice with
the same offset, but still using the pointer from the first call, which
could have been made invalid. By luck, m_pulldown leaves zero-sized mbufs
in place, instead of freeing them.

And in general, using a 'finaldst' pointer on the mbuf, and then modifying
that mbuf with IP6_EXTHDR_GET with a smaller offset, was really error-
prone.

Fix 'icmp6len', it shouldn't be ip6_plen, because we may not be at the
beginning of the packet (off+ip6_plen is beyond the end of the mbuf). By
luck, the IP6_EXTHDR_GET that follows will fail and prevent buffer
overflows in non-jumbogram packets.

For jumbograms we will probably be in trouble here; but it doesn't seem
possible to craft reliably a jumbogram for a non-jumbogram-enabled device.

So I don't think it's a huge problem.

Revision 1.211.6.6 / (download) - annotate - [select for diffs], Fri Jun 8 10:14:33 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
Changes since 1.211.6.5: +11 -4 lines
Diff to previous 1.211.6.5 (colored) to branchpoint 1.211 (colored)

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

	sys/netinet6/icmp6.c: revision 1.238
	sys/netinet/ip_icmp.c: revision 1.171
	sys/net/route.c: revision 1.210

Fix _rt_free via rtrequest(RTM_DELETE) hangs in rt_timer handlers

A rt_timer handler is passed a rtentry with an extra reference that avoids the
rtentry is accidentally released.  So rt_timer handers must release
the reference of a passed rtentry by themselves (but they didn't).

Revision 1.238 / (download) - annotate - [select for diffs], Fri Jun 1 07:13:35 2018 UTC (5 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.237: +11 -4 lines
Diff to previous 1.237 (colored)

Fix _rt_free via rtrequest(RTM_DELETE) hangs in rt_timer handlers

A rt_timer handler is passed a rtentry with an extra reference that avoids the
rtentry is accidentally released.  So rt_timer handers must release the reference
of a passed rtentry by themselves (but they didn't).

Revision 1.223.2.4 / (download) - annotate - [select for diffs], Mon May 21 04:36:16 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223.2.3: +4 -4 lines
Diff to previous 1.223.2.3 (colored) to branchpoint 1.223 (colored)

Sync with HEAD

Revision 1.237 / (download) - annotate - [select for diffs], Mon May 7 10:21:08 2018 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.236: +4 -4 lines
Diff to previous 1.236 (colored)

Remove misleading comments.

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

Synch with HEAD

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

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

Revision 1.235 / (download) - annotate - [select for diffs], Sun Apr 29 07:05:13 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.234: +11 -11 lines
Diff to previous 1.234 (colored)

Replace
	m_copym(m, 0, M_COPYALL, M_DONTWAIT)
by
	m_copypacket(m, M_DONTWAIT)
when it is obvious that 'm' has M_PKTHDR set.

Revision 1.234 / (download) - annotate - [select for diffs], Sat Apr 28 13:26:57 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.233: +2 -3 lines
Diff to previous 1.233 (colored)

Remove unused ipsec_var.h includes.

Revision 1.233 / (download) - annotate - [select for diffs], Fri Apr 27 09:02:16 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.232: +3 -3 lines
Diff to previous 1.232 (colored)

Fix a bug introduced in rev1.154 (2009). mcl_cache still has a size of
MCLBYTES, so the area allocated is still too small.

I think it should have been MEXTMALLOC, and of course I can't test my
change.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Apr 26 19:50:09 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.231: +3 -3 lines
Diff to previous 1.231 (colored)

Stop using m_copy(), use m_copym() directly. m_copy is useless,
undocumented and confusing.

Revision 1.231 / (download) - annotate - [select for diffs], Thu Apr 26 07:28:21 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.230: +3 -4 lines
Diff to previous 1.230 (colored)

Use M_UNWRITABLE, no functional change.

Revision 1.223.2.2 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:09 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223.2.1: +69 -105 lines
Diff to previous 1.223.2.1 (colored) to branchpoint 1.223 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.230 / (download) - annotate - [select for diffs], Sat Apr 14 17:55:47 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0422, pgoyette-compat-0415
Changes since 1.229: +3 -3 lines
Diff to previous 1.229 (colored)

Fix 'icmp6len', it shouldn't be ip6_plen, because we may not be at the
beginning of the packet (off+ip6_plen is beyond the end of the mbuf). By
luck, the IP6_EXTHDR_GET that follows will fail and prevent buffer
overflows in non-jumbogram packets.

For jumbograms we will probably be in trouble here; but it doesn't seem
possible to craft reliably a jumbogram for a non-jumbogram-enabled device.

So I don't think it's a huge problem.

Revision 1.229 / (download) - annotate - [select for diffs], Sat Apr 14 14:59:58 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.228: +39 -38 lines
Diff to previous 1.228 (colored)

Cosmetic, and remove one XXX (no problem).

Revision 1.228 / (download) - annotate - [select for diffs], Sat Apr 14 08:03:33 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.227: +5 -38 lines
Diff to previous 1.227 (colored)

Remove the RH0 code from ICMPv6. RH0 is deprecated by RFC5095 (2007) for
security reasons. We already removed it in Route6.

In addition there was an mbuf bug here: calling IP6_EXTHDR_GET twice with
the same offset, but still using the pointer from the first call, which
could have been made invalid. By luck, m_pulldown leaves zero-sized mbufs
in place, instead of freeing them.

And in general, using a 'finaldst' pointer on the mbuf, and then modifying
that mbuf with IP6_EXTHDR_GET with a smaller offset, was really error-
prone.

Revision 1.227 / (download) - annotate - [select for diffs], Sat Apr 14 06:45:17 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.226: +2 -8 lines
Diff to previous 1.226 (colored)

Remove dead code. It is the same as the non-obsolete one, since
ICMP6_DST_UNREACH_NOTNEIGHBOR == ICMP6_DST_UNREACH_BEYONDSCOPE,
and the code leads to the same errno value (EHOSTUNREACH).

Revision 1.226 / (download) - annotate - [select for diffs], Thu Apr 12 07:28:10 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.225: +28 -23 lines
Diff to previous 1.225 (colored)

Synchronize the code between raw_ip6.c<->icmp6.c<->raw_ip.c, so that it is
the same everywhere.

Revision 1.225 / (download) - annotate - [select for diffs], Thu Apr 12 06:49:39 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.224: +2 -5 lines
Diff to previous 1.224 (colored)

Remove misleading comment; we're just checking the SP, not verifying the
AH/ESP payload. While here style a bit.

Revision 1.211.6.5 / (download) - annotate - [select for diffs], Mon Apr 9 13:34:10 2018 UTC (5 years, 10 months ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.211.6.4: +4 -3 lines
Diff to previous 1.211.6.4 (colored) to branchpoint 1.211 (colored)

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

Revision 1.211.6.4 / (download) - annotate - [select for diffs], Sat Mar 31 10:27:40 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
Changes since 1.211.6.3: +32 -38 lines
Diff to previous 1.211.6.3 (colored) to branchpoint 1.211 (colored)

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

	sys/netinet6/icmp6.c: revision 1.215

Style, and four fixes:

 * Remove the (disabled) IPPROTO_ESP check. If the packet was decrypted it
   will have M_DECRYPTED, and this is already checked.
 * Memory leaks in icmp6_error2. They seem hardly triggerable.
 * Fix miscomputation in _icmp6_input, the ICMP6 header is not guaranteed
   to be located right after the IP6 header. ok mlelstv@
 * Memory leak in _icmp6_input. This one seems to be impossible to trigger.

Revision 1.223.2.1 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:51 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223: +4 -3 lines
Diff to previous 1.223 (colored)

Synch with HEAD, resolve conflicts

Revision 1.224 / (download) - annotate - [select for diffs], Wed Mar 21 14:23:54 2018 UTC (5 years, 11 months ago) by roy
Branch: MAIN
CVS Tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Changes since 1.223: +4 -3 lines
Diff to previous 1.223 (colored)

Sprinkle more soroverflow().

Revision 1.223 / (download) - annotate - [select for diffs], Wed Feb 28 11:23:24 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.222: +2 -4 lines
Diff to previous 1.222 (colored)

Remove unused ipsec_private.h includes.

Revision 1.222 / (download) - annotate - [select for diffs], Mon Feb 26 09:13:00 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.221: +3 -4 lines
Diff to previous 1.221 (colored)

Remove redundant condition (harmless). PR/53030.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Feb 26 09:04:29 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.220: +4 -4 lines
Diff to previous 1.220 (colored)

Dedup: merge ipsec4_in_reject and ipsec6_in_reject into ipsec_in_reject.
While here fix misleading comment.

ok ozaki-r@

Revision 1.220 / (download) - annotate - [select for diffs], Mon Feb 12 12:52:12 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.219: +6 -6 lines
Diff to previous 1.219 (colored)

Replace bcopy -> memcpy when it is obvious that the areas don't overlap.
Rearrange ip6_splithdr() for clarity.

Revision 1.219 / (download) - annotate - [select for diffs], Tue Jan 23 10:55:38 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.218: +45 -43 lines
Diff to previous 1.218 (colored)

Style, localify, remove XXX when there's no issue, and switch 'extra'
to int.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Jan 23 10:46:59 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.217: +8 -3 lines
Diff to previous 1.217 (colored)

Fix the check on 'maxlen', we are not creating struct icmp6_hdr but
struct nd_redirect (which is bigger). Also, make sure we can add a
struct nd_opt_rd_hdr.

Normally this doesn't change anything, since the mbuf has IPV6_MMTU
bytes, and it's always way bigger than what we need.

Revision 1.217 / (download) - annotate - [select for diffs], Tue Jan 23 10:32:50 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.216: +7 -3 lines
Diff to previous 1.216 (colored)

Fix info leak. We are allocating a slot of size:

	roundup(sizeof(*nd_opt) + ifp->if_addrlen, 8)

But we are not filling in the padding caused by the roundup, and therefore
several bytes are leaked, in the mbuf we're about to send to the network.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jan 23 09:21:59 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.215: +8 -14 lines
Diff to previous 1.215 (colored)

Fix twice the same mistake: 'last' can't be null, so there's no point in
having this misleading branch.

Revision 1.215 / (download) - annotate - [select for diffs], Tue Jan 23 07:02:57 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.214: +32 -38 lines
Diff to previous 1.214 (colored)

Style, and four fixes:

 * Remove the (disabled) IPPROTO_ESP check. If the packet was decrypted it
   will have M_DECRYPTED, and this is already checked.

 * Memory leaks in icmp6_error2. They seem hardly triggerable.

 * Fix miscomputation in _icmp6_input, the ICMP6 header is not guaranteed
   to be located right after the IP6 header. ok mlelstv@

 * Memory leak in _icmp6_input. This one seems to be impossible to trigger.

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

update from HEAD

Revision 1.211.6.3 / (download) - annotate - [select for diffs], Wed Nov 8 22:24:55 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.211.6.2: +4 -3 lines
Diff to previous 1.211.6.2 (colored) to branchpoint 1.211 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #350):
	sys/netinet6/icmp6.c: revision 1.214
	sys/netinet6/raw_ip6.c: revision 1.158
Fix usages of ipsec_used
If IPsec isn't used, we must go back to the normal path.
PR kern/52659

Revision 1.214 / (download) - annotate - [select for diffs], Sun Nov 5 07:03:37 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.213: +4 -3 lines
Diff to previous 1.213 (colored)

Fix usages of ipsec_used

If IPsec isn't used, we must go back to the normal path.

PR kern/52659

Revision 1.211.6.2 / (download) - annotate - [select for diffs], Sat Oct 21 19:43:54 2017 UTC (6 years, 4 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.211.6.1: +25 -2 lines
Diff to previous 1.211.6.1 (colored) to branchpoint 1.211 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #300):
	crypto/dist/ipsec-tools/src/setkey/parse.y: 1.19
	crypto/dist/ipsec-tools/src/setkey/token.l: 1.20
	distrib/sets/lists/tests/mi: 1.754, 1.757, 1.759
	doc/TODO.smpnet: 1.12-1.13
	sys/net/pfkeyv2.h: 1.32
	sys/net/raw_cb.c: 1.23-1.24, 1.28
	sys/net/raw_cb.h: 1.28
	sys/net/raw_usrreq.c: 1.57-1.58
	sys/net/rtsock.c: 1.228-1.229
	sys/netinet/in_proto.c: 1.125
	sys/netinet/ip_input.c: 1.359-1.361
	sys/netinet/tcp_input.c: 1.359-1.360
	sys/netinet/tcp_output.c: 1.197
	sys/netinet/tcp_var.h: 1.178
	sys/netinet6/icmp6.c: 1.213
	sys/netinet6/in6_proto.c: 1.119
	sys/netinet6/ip6_forward.c: 1.88
	sys/netinet6/ip6_input.c: 1.181-1.182
	sys/netinet6/ip6_output.c: 1.193
	sys/netinet6/ip6protosw.h: 1.26
	sys/netipsec/ipsec.c: 1.100-1.122
	sys/netipsec/ipsec.h: 1.51-1.61
	sys/netipsec/ipsec6.h: 1.18-1.20
	sys/netipsec/ipsec_input.c: 1.44-1.51
	sys/netipsec/ipsec_netbsd.c: 1.41-1.45
	sys/netipsec/ipsec_output.c: 1.49-1.64
	sys/netipsec/ipsec_private.h: 1.5
	sys/netipsec/key.c: 1.164-1.234
	sys/netipsec/key.h: 1.20-1.32
	sys/netipsec/key_debug.c: 1.18-1.21
	sys/netipsec/key_debug.h: 1.9
	sys/netipsec/keydb.h: 1.16-1.20
	sys/netipsec/keysock.c: 1.59-1.62
	sys/netipsec/keysock.h: 1.10
	sys/netipsec/xform.h: 1.9-1.12
	sys/netipsec/xform_ah.c: 1.55-1.74
	sys/netipsec/xform_esp.c: 1.56-1.72
	sys/netipsec/xform_ipcomp.c: 1.39-1.53
	sys/netipsec/xform_ipip.c: 1.50-1.54
	sys/netipsec/xform_tcp.c: 1.12-1.16
	sys/rump/librump/rumpkern/Makefile.rumpkern: 1.170
	sys/rump/librump/rumpnet/net_stub.c: 1.27
	sys/sys/protosw.h: 1.67-1.68
	tests/net/carp/t_basic.sh: 1.7
	tests/net/if_gif/t_gif.sh: 1.11
	tests/net/if_l2tp/t_l2tp.sh: 1.3
	tests/net/ipsec/Makefile: 1.7-1.9
	tests/net/ipsec/algorithms.sh: 1.5
	tests/net/ipsec/common.sh: 1.4-1.6
	tests/net/ipsec/t_ipsec_ah_keys.sh: 1.2
	tests/net/ipsec/t_ipsec_esp_keys.sh: 1.2
	tests/net/ipsec/t_ipsec_gif.sh: 1.6-1.7
	tests/net/ipsec/t_ipsec_l2tp.sh: 1.6-1.7
	tests/net/ipsec/t_ipsec_misc.sh: 1.8-1.18
	tests/net/ipsec/t_ipsec_sockopt.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_tcp.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_transport.sh: 1.5-1.6
	tests/net/ipsec/t_ipsec_tunnel.sh: 1.9
	tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh: 1.1-1.2
	tests/net/ipsec/t_ipsec_tunnel_odd.sh: 1.3
	tests/net/mcast/t_mcast.sh: 1.6
	tests/net/net/t_ipaddress.sh: 1.11
	tests/net/net_common.sh: 1.20
	tests/net/npf/t_npf.sh: 1.3
	tests/net/route/t_flags.sh: 1.20
	tests/net/route/t_flags6.sh: 1.16
	usr.bin/netstat/fast_ipsec.c: 1.22
Do m_pullup before mtod

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

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

Original outputs were organized like this:

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

New outputs are organized like this:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

It simplifies further changes.
---
Fix indentation

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

KEY_SA_UNREF is still key_freesav so no functional change for now.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

A typical ussage of localcount_drain looks like this:

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

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

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

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

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

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

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

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

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

isr->saidx was modified accidentally in ipsec_nextisr.

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

Revision 1.170.2.8 / (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.170.2.7: +93 -22 lines
Diff to previous 1.170.2.7 (colored) to branchpoint 1.170 (colored) next main 1.171 (colored)

Sync with HEAD

Revision 1.213 / (download) - annotate - [select for diffs], Wed Aug 2 02:18:17 2017 UTC (6 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170825
Changes since 1.212: +25 -2 lines
Diff to previous 1.212 (colored)

Add missing IPsec policy checks to icmp6_rip6_input

icmp6_rip6_input is quite similar to rip6_input and the same checks exist
in rip6_input.

Revision 1.211.6.1 / (download) - annotate - [select for diffs], Fri Jul 7 09:46:40 2017 UTC (6 years, 7 months ago) by martin
Branch: netbsd-8
Changes since 1.211: +11 -2 lines
Diff to previous 1.211 (colored)

Pull up following revision(s) (requested by knakahara in ticket #106):
	sys/netinet6/icmp6.c: revision 1.212
fix PR kern/52353. implemented by ozaki-r@n.o. I just commit by proxy.
XXX need to pullup to -8.

Revision 1.212 / (download) - annotate - [select for diffs], Fri Jul 7 00:55:15 2017 UTC (6 years, 7 months ago) by knakahara
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.211: +11 -2 lines
Diff to previous 1.211 (colored)

fix PR kern/52353. implemented by ozaki-r@n.o. I just commit by proxy.

XXX need to pullup to -8.

Revision 1.204.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.204: +119 -49 lines
Diff to previous 1.204 (colored) next main 1.205 (colored)

Sync with HEAD

Revision 1.192.2.5 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:51 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.192.2.4: +122 -52 lines
Diff to previous 1.192.2.4 (colored) to branchpoint 1.192 (colored) next main 1.193 (colored)

Sync with HEAD

Revision 1.211 / (download) - annotate - [select for diffs], Tue Mar 14 04:24:04 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.210: +3 -6 lines
Diff to previous 1.210 (colored)

Replace DIAGNOSTIC + panic with CTASSERT

Revision 1.210 / (download) - annotate - [select for diffs], Fri Feb 17 03:57:17 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.209: +3 -3 lines
Diff to previous 1.209 (colored)

Rename if_acquire_NOMPSAFE to if_acquire

It can be used in MP-safe ways. So let's remove the confusing postfix.
If it's used in a unsafe way, warn NOMPSAFE in a comment.

Revision 1.209 / (download) - annotate - [select for diffs], Mon Feb 13 07:18:20 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.208: +53 -17 lines
Diff to previous 1.208 (colored)

Protect mtudisc and redirect stuffs of icmp/icmp6 with mutex

We have to run pr_init of icmp and icmp6 prior to tcp and tcp6 ones
for mutex initialization.

Revision 1.208 / (download) - annotate - [select for diffs], Tue Feb 7 02:38:08 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.207: +8 -2 lines
Diff to previous 1.207 (colored)

Add missing NULL checks for m_get_rcvif

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

Sync with HEAD

Revision 1.207 / (download) - annotate - [select for diffs], Thu Feb 2 02:52:10 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.206: +22 -8 lines
Diff to previous 1.206 (colored)

Defer some pr_input to workqueue

pr_input is currently called in softint. Some pr_input such as ICMP, ICMPv6
and CARP can add/delete/update IP addresses and routing table entries. For
example, icmp6_redirect_input updates an a routing table entry and
nd6_ra_input may delete an IP address.

Basically such operations shouldn't be done in softint. That aside, we have
a reason to avoid the situation; psz/psref waits cannot be used in softint,
however they are required to work in such pr_input in the MP-safe world.

The change implements the workqueue pr_input framework called wqinput which
provides a means to defer pr_input of a protocol to workqueue easily.
Currently icmp_input, icmp6_input, carp_proto_input and carp6_proto_input
are deferred to workqueue by the framework.

Proposed and discussed on tech-kern and tech-net

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

ip6_sprintf -> IN6_PRINT so that we pass the size.

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

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

Reviewed by ozaki-r@

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jan 13 10:38:37 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.203: +4 -4 lines
Diff to previous 1.203 (colored)

Tweak icmp6_input; always use off, not *offp

Revision 1.192.2.4 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.192.2.3: +28 -12 lines
Diff to previous 1.192.2.3 (colored) to branchpoint 1.192 (colored)

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

Revision 1.203 / (download) - annotate - [select for diffs], Mon Dec 12 03:55:57 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.202: +10 -10 lines
Diff to previous 1.202 (colored)

Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

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

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

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

The locking order is rtcache_lock first and rt_lock is next.

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

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

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

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

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

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

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

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

See the next section for destructions of rtentries by rt_free.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Revision 1.202 / (download) - annotate - [select for diffs], Sun Dec 11 07:35:42 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.201: +6 -4 lines
Diff to previous 1.201 (colored)

Correct sanity checks of icmp6_redirect_output

- rt->rt_ifp is always non-NULL
- Checking RTF_UP here is just racy and meaningless
- The arguments should be non-NULL (at least for now)

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

Sync with HEAD

Revision 1.201 / (download) - annotate - [select for diffs], Tue Nov 15 20:50:28 2016 UTC (7 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.200: +16 -2 lines
Diff to previous 1.200 (colored)

Enforce alignment requirements that are violated in some cases.
For machines that don't need strict alignment (i386,amd64,vax,m68k) this
is a no-op.

Fixes PR kern/50766 but should be improved.

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

Sync with HEAD

Revision 1.200 / (download) - annotate - [select for diffs], Mon Oct 31 04:16:25 2016 UTC (7 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.199: +15 -11 lines
Diff to previous 1.199 (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.199 / (download) - annotate - [select for diffs], Tue Oct 25 02:45:10 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.198: +3 -4 lines
Diff to previous 1.198 (colored)

Remove unnecessary argument

No functional change.

Revision 1.198 / (download) - annotate - [select for diffs], Tue Oct 18 02:46:21 2016 UTC (7 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.197: +2 -3 lines
Diff to previous 1.197 (colored)

Remove unnecessary pserialize_read_enter

Revision 1.170.2.5 / (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.170.2.4: +68 -51 lines
Diff to previous 1.170.2.4 (colored) to branchpoint 1.170 (colored)

Sync with HEAD

Revision 1.197 / (download) - annotate - [select for diffs], Fri Aug 26 21:48:31 2016 UTC (7 years, 6 months ago) by dholland
Branch: MAIN
CVS Tags: nick-nhusb-base-20161004, localcount-20160914
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

PR 51434 David Binderman: remove redundant test.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Aug 19 12:26:01 2016 UTC (7 years, 6 months ago) by roy
Branch: MAIN
Changes since 1.195: +9 -19 lines
Diff to previous 1.195 (colored)

Revert r1.148
IP6_EXTHDR_GET ensures that a icmp6 header can be fetched from the mbuf
so m_pullup does not need to be called.

While here, we can safely increament interface error stats even with an
invalidated mbuf because we have a saved reference to the interface.

Revision 1.192.2.2 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:10 2016 UTC (7 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.192.2.1: +47 -18 lines
Diff to previous 1.192.2.1 (colored) to branchpoint 1.192 (colored)

Sync with HEAD

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

Apply pserialize and psref to struct ifaddr and its variants

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

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

Sync with HEAD

Revision 1.194 / (download) - annotate - [select for diffs], Fri Jul 15 07:40:09 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.193: +12 -14 lines
Diff to previous 1.193 (colored)

Use sin6tosa and sin6tocsa macros

No functional change.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Jul 15 07:33:41 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

Use ifatoia6 macro

No functional change.

Revision 1.170.2.4 / (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.170.2.3: +77 -34 lines
Diff to previous 1.170.2.3 (colored) to branchpoint 1.170 (colored)

Sync with HEAD

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

Switch the address list of intefaces to pslist(9)

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

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

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

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

No functional change.

Revision 1.190 / (download) - annotate - [select for diffs], Tue Jun 28 02:02:56 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.189: +5 -2 lines
Diff to previous 1.189 (colored)

Add missing NULL checks for m_get_rcvif_psref

Revision 1.189 / (download) - annotate - [select for diffs], Tue Jun 21 10:25:27 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.188: +3 -3 lines
Diff to previous 1.188 (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.188 / (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.187: +53 -13 lines
Diff to previous 1.187 (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.187 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:16 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.186: +5 -5 lines
Diff to previous 1.186 (colored)

Introduce m_set_rcvif and m_reset_rcvif

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

No functional change.

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

Sync with HEAD

Revision 1.186 / (download) - annotate - [select for diffs], Wed May 18 08:40:51 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.185: +3 -3 lines
Diff to previous 1.185 (colored)

Don't try to get outif unnecessarily from in6_selectsrc

The got outif is unused.

Revision 1.185 / (download) - annotate - [select for diffs], Tue May 17 03:27:02 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.184: +26 -25 lines
Diff to previous 1.184 (colored)

Get rcvif once and reuse it

No functional change.

Revision 1.184 / (download) - annotate - [select for diffs], Tue May 17 03:24:46 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.183: +5 -5 lines
Diff to previous 1.183 (colored)

Make sure icmp6_redirect_input frees mbuf before return

Revision 1.183 / (download) - annotate - [select for diffs], Thu May 12 02:24:17 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
Changes since 1.182: +5 -5 lines
Diff to previous 1.182 (colored)

Protect ifnet list with psz and psref

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

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

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

Sync with HEAD

Revision 1.182 / (download) - annotate - [select for diffs], Mon Apr 4 07:37:07 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.181: +9 -14 lines
Diff to previous 1.181 (colored)

Separate nexthop caches from the routing table

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

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

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

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

Revision 1.181 / (download) - annotate - [select for diffs], Fri Apr 1 09:16:02 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.180: +5 -6 lines
Diff to previous 1.180 (colored)

Remove unnecessary casts and do s/0/NULL/ for rtrequest

Revision 1.180 / (download) - annotate - [select for diffs], Fri Apr 1 08:12:00 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.179: +41 -49 lines
Diff to previous 1.179 (colored)

Refine nd6log

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

Revision 1.179 / (download) - annotate - [select for diffs], Thu Jan 21 15:41:30 2016 UTC (8 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.178: +2 -1 lines
Diff to previous 1.178 (colored)

Revert previous: ran cvs commit when I meant cvs diff.  Sorry!

Hit up-arrow one too few times.

Revision 1.178 / (download) - annotate - [select for diffs], Thu Jan 21 15:27:48 2016 UTC (8 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.177: +3 -4 lines
Diff to previous 1.177 (colored)

Give proper prototype to ip_output.

Revision 1.159.2.2 / (download) - annotate - [select for diffs], Sun Nov 15 17:49:31 2015 UTC (8 years, 3 months ago) by bouyer
Branch: netbsd-6
Changes since 1.159.2.1: +36 -3 lines
Diff to previous 1.159.2.1 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1327):
	sys/netinet6/icmp6.c: revision 1.177
Update icmp6_redirect_timeout_q when changing net.inet6.icmp6.redirtimeout
We have to update icmp6_redirect_timeout_q as well as icmp6_redirtimeout
when changing net.inet6.icmp6.redirtimeout via sysctl. The updating logic
is copied from sysctl_net_inet_icmp_redirtimeout.
This change is from s-yamaguchi@IIJ (with KNF by ozaki-r) and fixes
PR kern/50240.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Thu Nov 5 20:36:03 2015 UTC (8 years, 3 months ago) by riz
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1
Changes since 1.169: +36 -3 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #982):
	sys/netinet6/icmp6.c: revision 1.177
Update icmp6_redirect_timeout_q when changing net.inet6.icmp6.redirtimeout
We have to update icmp6_redirect_timeout_q as well as icmp6_redirtimeout
when changing net.inet6.icmp6.redirtimeout via sysctl. The updating logic
is copied from sysctl_net_inet_icmp_redirtimeout.
This change is from s-yamaguchi@IIJ (with KNF by ozaki-r) and fixes
PR kern/50240.

Revision 1.170.2.1 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.170: +54 -12 lines
Diff to previous 1.170 (colored)

Sync with HEAD

Revision 1.177 / (download) - annotate - [select for diffs], Mon Sep 14 05:34:28 2015 UTC (8 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.176: +36 -3 lines
Diff to previous 1.176 (colored)

Update icmp6_redirect_timeout_q when changing net.inet6.icmp6.redirtimeout

We have to update icmp6_redirect_timeout_q as well as icmp6_redirtimeout
when changing net.inet6.icmp6.redirtimeout via sysctl. The updating logic
is copied from sysctl_net_inet_icmp_redirtimeout.

This change is from s-yamaguchi@IIJ (with KNF by ozaki-r) and fixes
PR kern/50240.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Aug 31 06:25:15 2015 UTC (8 years, 5 months ago) by ozaki-r
Branch: MAIN
Changes since 1.175: +10 -6 lines
Diff to previous 1.175 (colored)

Make rt_refcnt take into account rt_timer

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

sprinkle _KERNEL_OPT

Revision 1.174 / (download) - annotate - [select for diffs], Mon Aug 24 09:45:29 2015 UTC (8 years, 6 months ago) by ozaki-r
Branch: MAIN
Changes since 1.173: +4 -4 lines
Diff to previous 1.173 (colored)

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

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

Use time_uptime instead of time_second to avoid time leaps

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

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

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

Discussed on tech-kern and tech-net.

Revision 1.172 / (download) - annotate - [select for diffs], Fri Jul 24 07:36:29 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.171: +4 -4 lines
Diff to previous 1.171 (colored)

Fix rtfree-ing wrong rtentry

Revision 1.171 / (download) - annotate - [select for diffs], Fri Jul 17 02:21:08 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.170: +6 -3 lines
Diff to previous 1.170 (colored)

Reform use of rt_refcnt

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

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

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

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

Revision 1.170 / (download) - annotate - [select for diffs], Tue Nov 25 19:51:17 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.169: +4 -2 lines
Diff to previous 1.169 (colored)

CID 977389: Out of bounds access.

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

Rebase to HEAD as of a few days ago.

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

Rebase.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Jun 6 01:02:47 2014 UTC (9 years, 8 months ago) by rmind
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Branch point for: netbsd-7
Changes since 1.168: +7 -7 lines
Diff to previous 1.168 (colored)

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

Revision 1.168 / (download) - annotate - [select for diffs], Fri May 30 01:39:03 2014 UTC (9 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.167: +4 -3 lines
Diff to previous 1.167 (colored)

Introduce 2 new variables: ipsec_enabled and ipsec_used.
Ipsec enabled is controlled by sysctl and determines if is allowed.
ipsec_used is set automatically based on ipsec being enabled, and
rules existing.

Revision 1.157.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:10 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.157.2.2: +7 -10 lines
Diff to previous 1.157.2.2 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

sync with head.

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

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

Revision 1.167 / (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.166: +4 -7 lines
Diff to previous 1.166 (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.162.2.3 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.162.2.2: +5 -8 lines
Diff to previous 1.162.2.2 (colored) to branchpoint 1.162 (colored) next main 1.163 (colored)

sync with head

Revision 1.166 / (download) - annotate - [select for diffs], Sun May 18 00:10:11 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.165: +3 -3 lines
Diff to previous 1.165 (colored)

Use IFNET_FIRST() rather than open coding ifnet access.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:12 2014 UTC (10 years ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.164: +2 -7 lines
Diff to previous 1.164 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

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

Revision 1.164 / (download) - annotate - [select for diffs], Thu Feb 20 13:36:06 2014 UTC (10 years ago) by joerg
Branch: MAIN
Changes since 1.163: +4 -2 lines
Diff to previous 1.163 (colored)

Bail out in case m_pulldown failed.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Nov 23 14:20:22 2013 UTC (10 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

convert from CIRCLEQ to TAILQ.

Revision 1.162.2.2 / (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.162.2.1: +4 -7 lines
Diff to previous 1.162.2.1 (colored) to branchpoint 1.162 (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.162.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.162: +5 -3 lines
Diff to previous 1.162 (colored)

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

Revision 1.159.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.159: +4 -2 lines
Diff to previous 1.159 (colored) next main 1.160 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.159.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.159: +4 -2 lines
Diff to previous 1.159 (colored) next main 1.160 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

Revision 1.159.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.159: +4 -2 lines
Diff to previous 1.159 (colored)

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

  4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

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

resync from head

Revision 1.162 / (download) - annotate - [select for diffs], Wed Jun 5 19:01:26 2013 UTC (10 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.161: +4 -4 lines
Diff to previous 1.161 (colored)

IPSEC has not come in two speeds for a long time now (IPSEC == kame,
FAST_IPSEC). Make everything refer to IPSEC to avoid confusion.

Revision 1.157.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:47 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.157.2.1: +4 -2 lines
Diff to previous 1.157.2.1 (colored) to branchpoint 1.157 (colored)

sync with head

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

4 new sysctls to avoid ipv6 DoS attacks from OpenBSD

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

sync with head

Revision 1.157.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:45 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.157.6.1: +3 -8 lines
Diff to previous 1.157.6.1 (colored) to branchpoint 1.157 (colored) next main 1.158 (colored)

sync to latest -current.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:40 2012 UTC (11 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.159: +3 -8 lines
Diff to previous 1.159 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.157.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:41 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.157: +5 -9 lines
Diff to previous 1.157 (colored)

merge to -current.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Dec 31 20:41:59 2011 UTC (12 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.158: +3 -7 lines
Diff to previous 1.158 (colored)

- fix offsetof usage, and redundant defines
- kill pointer casts to 0

Revision 1.158 / (download) - annotate - [select for diffs], Mon Dec 19 11:59:57 2011 UTC (12 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.157: +4 -4 lines
Diff to previous 1.157 (colored)

rename the IPSEC in-kernel CPP variable and config(8) option to
KAME_IPSEC, and make IPSEC define it so that existing kernel
config files work as before
Now the default can be easily be changed to FAST_IPSEC just by
setting the IPSEC alias to FAST_IPSEC.

Revision 1.157 / (download) - annotate - [select for diffs], Wed Aug 31 18:31:03 2011 UTC (12 years, 6 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.156: +4 -5 lines
Diff to previous 1.156 (colored)

NULL does not need a cast

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

sync with head

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Fri Oct 22 07:22:40 2010 UTC (13 years, 4 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.155: +4 -2 lines
Diff to previous 1.155 (colored) next main 1.156 (colored)

Sync with HEAD (-D20101022).

Revision 1.146.2.4 / (download) - annotate - [select for diffs], Sat Oct 9 03:32:38 2010 UTC (13 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.146.2.3: +4 -2 lines
Diff to previous 1.146.2.3 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored)

sync with head

Revision 1.156 / (download) - annotate - [select for diffs], Sun Sep 12 16:04:57 2010 UTC (13 years, 5 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.155: +4 -2 lines
Diff to previous 1.155 (colored)

avoid NULL dereference in error case

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

sync with head

Revision 1.155 / (download) - annotate - [select for diffs], Sun Oct 18 22:57:05 2009 UTC (14 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base10, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored)

fix the sun2 case for real.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Oct 12 22:32:23 2009 UTC (14 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.153: +9 -6 lines
Diff to previous 1.153 (colored)

unbreak sun2.

Revision 1.153 / (download) - annotate - [select for diffs], Wed Sep 16 15:23:05 2009 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
Changes since 1.152: +7 -4 lines
Diff to previous 1.152 (colored)

Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

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

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

Sync with HEAD.

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

Revision 1.146.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:18 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.146.2.1: +42 -44 lines
Diff to previous 1.146.2.1 (colored) to branchpoint 1.146 (colored)

sync with head.

Revision 1.150.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.150: +12 -12 lines
Diff to previous 1.150 (colored) next main 1.151 (colored)

Sync with HEAD.

Revision 1.152 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.151: +8 -8 lines
Diff to previous 1.151 (colored)

bzero -> memset

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

bcmp -> memcmp

Revision 1.148.6.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.148: +32 -34 lines
Diff to previous 1.148 (colored) next main 1.149 (colored)

Sync with HEAD.

Revision 1.148.2.2 / (download) - annotate - [select for diffs], Fri Oct 10 22:35:43 2008 UTC (15 years, 4 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.148.2.1: +19 -2 lines
Diff to previous 1.148.2.1 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored)

Sync with HEAD.

Revision 1.141.12.4 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:33 2008 UTC (15 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.141.12.3: +17 -0 lines
Diff to previous 1.141.12.3 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with HEAD.

Revision 1.108.10.1 / (download) - annotate - [select for diffs], Fri Oct 3 09:21:16 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3-1
Changes since 1.108: +19 -2 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Pull up revision 1.150 (requested by adrianp in ticket #1966).

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.108.8.1 / (download) - annotate - [select for diffs], Fri Oct 3 09:21:02 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3-0
Changes since 1.108: +19 -2 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Pull up revision 1.150 (requested by adrianp in ticket #1966).

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.108.6.1 / (download) - annotate - [select for diffs], Fri Oct 3 09:20:48 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-3
Changes since 1.108: +19 -2 lines
Diff to previous 1.108 (colored) next main 1.109 (colored)

Pull up revision 1.150 (requested by adrianp in ticket #1966).

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.123.2.2.4.1 / (download) - annotate - [select for diffs], Fri Oct 3 09:05:06 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-4-0
CVS Tags: netbsd-4-0-1-RELEASE
Changes since 1.123.2.2: +19 -2 lines
Diff to previous 1.123.2.2 (colored) next main 1.123.2.3 (colored)

Pull up revision 1.150 (requested by adrianp in ticket #1209).

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Fri Oct 3 09:04:30 2008 UTC (15 years, 4 months ago) by jdc
Branch: netbsd-4
Changes since 1.123.2.2: +19 -2 lines
Diff to previous 1.123.2.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

Pull up revision 1.150 (requested by adrianp in ticket #1209).

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.150 / (download) - annotate - [select for diffs], Fri Oct 3 08:23:06 2008 UTC (15 years, 4 months ago) by adrianp
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, 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.149: +19 -2 lines
Diff to previous 1.149 (colored)

Fix for CVE-2008-3530 from matt@
Implement improved checking for MTU values on ICMP 'Packet Too Big Messages'

Revision 1.141.12.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:58 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.141.12.2: +13 -32 lines
Diff to previous 1.141.12.2 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

Revision 1.148.2.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.148: +15 -34 lines
Diff to previous 1.148 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 6 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.148: +15 -34 lines
Diff to previous 1.148 (colored)

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

approved by core

Revision 1.141.12.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:26 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.141.12.1: +82 -50 lines
Diff to previous 1.141.12.1 (colored) to branchpoint 1.141 (colored)

Sync with HEAD.

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

sync with head.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:45 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.146: +11 -10 lines
Diff to previous 1.146 (colored)

sync with head.

Revision 1.148 / (download) - annotate - [select for diffs], Wed May 7 11:28:37 2008 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.147: +10 -4 lines
Diff to previous 1.147 (colored)

Sync with ipv4 icmp_input(): make sure the mbuf is writable and
contains the entire icmp message befre calling icmp6_input().
should fix "panic: mbuf too short for IPv6 header" seen by several peoples.

Revision 1.147 / (download) - annotate - [select for diffs], Sun May 4 07:22:15 2008 UTC (15 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.146: +3 -8 lines
Diff to previous 1.146 (colored)

Simplify the interface to netstat_sysctl() and allocate space for
the collated counters using kmem_alloc().

PR kern/38577

Revision 1.146 / (download) - annotate - [select for diffs], Wed Apr 23 05:26:50 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.145: +7 -27 lines
Diff to previous 1.145 (colored)

Use <net/net_stats.h> / netstat_sysctl().

Revision 1.145 / (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.144: +101 -50 lines
Diff to previous 1.144 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.144 / (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.143: +3 -3 lines
Diff to previous 1.143 (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.143 / (download) - annotate - [select for diffs], Tue Apr 8 15:04:35 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.142: +49 -49 lines
Diff to previous 1.142 (colored)

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

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

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

Sync with HEAD.

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

sync with head.

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

sync with HEAD

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

sync with head.

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

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

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

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

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

sync with HEAD

Revision 1.135.4.6 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:37 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.135.4.5: +5 -10 lines
Diff to previous 1.135.4.5 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

Sync with HEAD.

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:15 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.140: +5 -10 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Sync with HEAD.

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

Sync with head.

Revision 1.109.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:34 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.6: +5 -10 lines
Diff to previous 1.109.2.6 (colored)

sync with head

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

Use IFNET_FOREACH() and IFADDR_FOREACH().

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

sync with head.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:52 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.137: +57 -79 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

Sync with HEAD

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

sync with HEAD

Revision 1.135.4.5 / (download) - annotate - [select for diffs], Sun Nov 4 21:03:40 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.135.4.4: +22 -22 lines
Diff to previous 1.135.4.4 (colored) to branchpoint 1.135 (colored)

Sync with HEAD.

Revision 1.140 / (download) - annotate - [select for diffs], Thu Nov 1 20:33:56 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base1, vmlocking-nbase, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2, mjf-devfs
Changes since 1.139: +22 -22 lines
Diff to previous 1.139 (colored)

De-__P().

Revision 1.135.4.4 / (download) - annotate - [select for diffs], Wed Oct 31 23:14:10 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.135.4.3: +27 -24 lines
Diff to previous 1.135.4.3 (colored) to branchpoint 1.135 (colored)

Sync with HEAD.

Revision 1.139 / (download) - annotate - [select for diffs], Mon Oct 29 16:54:42 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.138: +27 -24 lines
Diff to previous 1.138 (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.109.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:10 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.4: +14 -42 lines
Diff to previous 1.109.2.4 (colored)

sync with head.

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

Sync with HEAD.

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

Revision 1.138 / (download) - annotate - [select for diffs], Wed Oct 24 06:37:20 2007 UTC (16 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.137: +12 -37 lines
Diff to previous 1.137 (colored)

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

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

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

Revision 1.131.2.4 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:53 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.131.2.3: +4 -7 lines
Diff to previous 1.131.2.3 (colored) to branchpoint 1.131 (colored) next main 1.132 (colored)

Sync with head.

Revision 1.135.4.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:21 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.135.4.1: +4 -7 lines
Diff to previous 1.135.4.1 (colored) to branchpoint 1.135 (colored)

Sync with HEAD.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Sep 19 04:33:44 2007 UTC (16 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base
Branch point for: bouyer-xenamd64
Changes since 1.136: +4 -7 lines
Diff to previous 1.136 (colored)

1) Introduce a new socket option, (SOL_SOCKET, SO_NOHEADER), that
   tells a socket that it should both add a protocol header to tx'd
   datagrams and remove the header from rx'd datagrams:

        int onoff = 1, s = socket(...);
        setsockopt(s, SOL_SOCKET, SO_NOHEADER, &onoff);

2) Add an implementation of (SOL_SOCKET, SO_NOHEADER) for raw IPv4
   sockets.

3) Reorganize the protocols' pr_ctloutput implementations a bit.
   Consistently return ENOPROTOOPT when an option is unsupported,
   and EINVAL if a supported option's arguments are incorrect.
   Reorganize the flow of code so that it's more clear how/when
   options are passed down the stack until they are handled.

   Shorten some pr_ctloutput staircases for readability.

4) Extract common mbuf code into subroutines, add new sockaddr
   methods, and introduce a new subroutine, fsocreate(), for reuse
   later; use it first in sys_socket():

struct mbuf *m_getsombuf(struct socket *so)

        Create an mbuf and make its owner the socket `so'.

struct mbuf *m_intopt(struct socket *so, int val)

        Create an mbuf, make its owner the socket `so', put the
        int `val' into it, and set its length to sizeof(int).


int fsocreate(..., int *fd)

        Create a socket, a la socreate(9), put the socket into the
        given LWP's descriptor table, return the descriptor at `fd'
        on success.

void *sockaddr_addr(struct sockaddr *sa, socklen_t *slenp)
const void *sockaddr_const_addr(const struct sockaddr *sa, socklen_t *slenp)

        Extract a pointer to the address part of a sockaddr.  Write
        the length of the address  part at `slenp', if `slenp' is
        not NULL.

socklen_t sockaddr_getlen(const struct sockaddr *sa)

        Return the length of a sockaddr.  This just evaluates to
        sa->sa_len.  I only add this for consistency with code that
        appears in a portable userland library that I am going to
        import.

const struct sockaddr *sockaddr_any(const struct sockaddr *sa)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

const void *sockaddr_anyaddr(const struct sockaddr *sa, socklen_t *slenp)

        Return the "don't care" sockaddr in the same family as
        `sa'.  This is the address a client should sobind(9) if it
        does not care the source address and, if applicable, the
        port et cetera that it uses.

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

sync with head.

Revision 1.131.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 21:28:02 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.131.2.2: +7 -7 lines
Diff to previous 1.131.2.2 (colored) to branchpoint 1.131 (colored)

Sync with HEAD.

Revision 1.135.4.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:47 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.135: +5 -5 lines
Diff to previous 1.135 (colored)

Sync with HEAD.

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

Sync with HEAD.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Aug 10 22:44:05 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Branch point for: matt-armv6
Changes since 1.135: +5 -5 lines
Diff to previous 1.135 (colored)

Constify.  bcopy -> memcpy.

Revision 1.135.6.2 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:56 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.135.6.1: +2924 -0 lines
Diff to previous 1.135.6.1 (colored) to branchpoint 1.135 (colored) next main 1.136 (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.135.6.1, Thu Jul 19 20:48:55 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.135: +0 -2924 lines
FILE REMOVED

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

Revision 1.135 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:55 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

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

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

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

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

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

Cosmetic:

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

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

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

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

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

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

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

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

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

Revision 1.131.2.2 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:59 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.131.2.1: +6 -8 lines
Diff to previous 1.131.2.1 (colored) to branchpoint 1.131 (colored)

Sync with head.

Revision 1.131.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:35 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.131: +32 -66 lines
Diff to previous 1.131 (colored) next main 1.132 (colored)

Sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Wed Jun 13 05:03:19 2007 UTC (16 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.133: +6 -8 lines
Diff to previous 1.133 (colored)

Persuasive programming: check M_UNWRITABLE(m, len) instead of
m->m_len<len before pulling up, because that helps make it clear
that we m_pullup() in order to guarantee that the contiguous region
is *writable*.

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

Sync with head.

Revision 1.123.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 4 01:54:24 2007 UTC (16 years, 8 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.123.2.1: +9 -3 lines
Diff to previous 1.123.2.1 (colored) next main 1.123.2.2 (colored)

Update to today's netbsd-4.

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Thu May 24 19:13:14 2007 UTC (16 years, 9 months ago) by pavel
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.123.2.1: +9 -3 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored)

Pull up following revision(s) (requested by degroote in ticket #667):
	sys/netinet/tcp_input.c: revision 1.260
	sys/netinet/tcp_output.c: revision 1.154
	sys/netinet/tcp_subr.c: revision 1.210
	sys/netinet6/icmp6.c: revision 1.129
	sys/netinet6/in6_proto.c: revision 1.70
	sys/netinet6/ip6_forward.c: revision 1.54
	sys/netinet6/ip6_input.c: revision 1.94
	sys/netinet6/ip6_output.c: revision 1.114
	sys/netinet6/raw_ip6.c: revision 1.81
	sys/netipsec/ipcomp_var.h: revision 1.4
	sys/netipsec/ipsec.c: revision 1.26 via patch,1.31-1.32
	sys/netipsec/ipsec6.h: revision 1.5
	sys/netipsec/ipsec_input.c: revision 1.14
	sys/netipsec/ipsec_netbsd.c: revision 1.18,1.26
	sys/netipsec/ipsec_output.c: revision 1.21 via patch
	sys/netipsec/key.c: revision 1.33,1.44
	sys/netipsec/xform_ipcomp.c: revision 1.9
	sys/netipsec/xform_ipip.c: revision 1.15
	sys/opencrypto/deflate.c: revision 1.8
Commit my SoC work
Add ipv6 support for fast_ipsec
Note that currently, packet with extensions headers are not correctly
supported
Change the ipcomp logic

Add sysctl tree to modify the fast_ipsec options related to ipv6. Similar
to the sysctl kame interface.

Choose the good default policy, depending of the adress family of the
desired policy

Increase the refcount for the default ipv6 policy so nobody can reclaim it

Always compute the sp index even if we don't have any sp in spd. It will
let us to choose the right default policy (based on the adress family
requested).
While here, fix an error message

Use dynamic array instead of an static array to decompress. It lets us to
decompress any data, whatever is the radio decompressed data / compressed
data.
It fixes the last issues with fast_ipsec and ipcomp.
While here, bzero -> memset, bcopy -> memcpy, FREE -> free
Reviewed a long time ago by sam@

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

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

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Sat May 12 14:56:38 2007 UTC (16 years, 9 months ago) by pavel
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.123: +3 -4 lines
Diff to previous 1.123 (colored)

Pull up following revision(s) (requested by degroote in ticket #631):
	sys/netinet6/icmp6.c: revision 1.126
Fix an infinite loop ( and local dos ) in the case where the ip6_hdr and
the icmp6_hdr are not in the same mbuf.
Fix pr/34994 and probably pr/35333
Ok @rpaulo

Revision 1.129.2.3 / (download) - annotate - [select for diffs], Mon May 7 10:56:01 2007 UTC (16 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.129.2.2: +5 -6 lines
Diff to previous 1.129.2.2 (colored) next main 1.130 (colored)

sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Wed May 2 20:40:25 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.131: +5 -6 lines
Diff to previous 1.131 (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.129.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:56 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.129.2.1: +8 -8 lines
Diff to previous 1.129.2.1 (colored)

Sync with HEAD.

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

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

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

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

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:47 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.2: +16 -11 lines
Diff to previous 1.109.2.2 (colored)

sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:12 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.129: +5 -6 lines
Diff to previous 1.129 (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.129 / (download) - annotate - [select for diffs], Sat Feb 10 09:43:05 2007 UTC (17 years ago) by degroote
Branch: MAIN
Branch point for: yamt-idlelwp
Changes since 1.128: +9 -3 lines
Diff to previous 1.128 (colored)

Commit my SoC work
Add ipv6 support for fast_ipsec
Note that currently, packet with extensions headers are not correctly
supported
Change the ipcomp logic

Revision 1.121.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:44 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.121.2.2: +6 -6 lines
Diff to previous 1.121.2.2 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored)

Sync with head.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jan 29 06:02:26 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored)

bzero -> memset

Revision 1.127 / (download) - annotate - [select for diffs], Mon Jan 15 21:49:56 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.126: +4 -3 lines
Diff to previous 1.126 (colored)

Cosmetic: indent using ASCII horizontal tab, insert space following
comma, wrap line.

Revision 1.126 / (download) - annotate - [select for diffs], Mon Jan 15 19:11:48 2007 UTC (17 years, 1 month ago) by degroote
Branch: MAIN
Changes since 1.125: +3 -4 lines
Diff to previous 1.125 (colored)

Fix an infinite loop ( and local dos ) in the case where the ip6_hdr and
the icmp6_hdr are not in the same mbuf.
Fix pr/34994 and probably pr/35333
Ok @rpaulo

Revision 1.121.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:15 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.121.2.1: +3 -5 lines
Diff to previous 1.121.2.1 (colored) to branchpoint 1.121 (colored)

Sync with head.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:38 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.1: +27 -68 lines
Diff to previous 1.109.2.1 (colored)

sync with head.

Revision 1.121.4.3 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:21 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.121.4.2: +3 -4 lines
Diff to previous 1.121.4.2 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored)

sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Dec 15 21:18:54 2006 UTC (17 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.124: +3 -4 lines
Diff to previous 1.124 (colored)

Introduce new helper functions to abstract the route caching.
rtcache_init and rtcache_init_noclone lookup ro_dst and store
the result in ro_rt, taking care of the reference counting and
calling the domain specific route cache.
rtcache_free checks if a route was cashed and frees the reference.
rtcache_copy copies ro_dst of the given struct route, checking that
enough space is available and incrementing the reference count of the
cached rtentry if necessary.
rtcache_check validates that the cached route is still up. If it isn't,
it tries to look it up again. Afterwards ro_rt is either a valid again
or NULL.
rtcache_copy is used internally.

Adjust to callers of rtalloc/rtflush in the tree to check the sanity of
ro_dst first (if necessary). If it doesn't fit the expectations, free
the cache, otherwise check if the cached route is still valid. After
that combination, a single check for ro_rt == NULL is enough to decide
whether a new lookup needs to be done with a different ro_dst.
Make the route checking in gre stricter by repeating the loop check
after revalidation.
Remove some unused RADIX_MPATH code in in6_src.c. The logic is slightly
changed here to first validate the route and check RTF_GATEWAY
afterwards. This is sementically equivalent though.
etherip doesn't need sc_route_expire similiar to the gif changes from
dyoung@ earlier.

Based on the earlier patch from dyoung@, reviewed and discussed with
him.

Revision 1.121.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:14 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.121.4.1: +11 -12 lines
Diff to previous 1.121.4.1 (colored) to branchpoint 1.121 (colored)

sync with head.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Dec 9 05:33:07 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.123: +4 -5 lines
Diff to previous 1.123 (colored)

Here are various changes designed to protect against bad IPv4
routing caused by stale route caches (struct route).  Route caches
are sprinkled throughout PCBs, the IP fast-forwarding table, and
IP tunnel interfaces (gre, gif, stf).

Stale IPv6 and ISO route caches will be treated by separate patches.

Thank you to Christoph Badura for suggesting the general approach
to invalidating route caches that I take here.

Here are the details:

Add hooks to struct domain for tracking and for invalidating each
domain's route caches: dom_rtcache, dom_rtflush, and dom_rtflushall.

Introduce helper subroutines, rtflush(ro) for invalidating a route
cache, rtflushall(family) for invalidating all route caches in a
routing domain, and rtcache(ro) for notifying the domain of a new
cached route.

Chain together all IPv4 route caches where ro_rt != NULL.  Provide
in_rtcache() for adding a route to the chain.  Provide in_rtflush()
and in_rtflushall() for invalidating IPv4 route caches.  In
in_rtflush(), set ro_rt to NULL, and remove the route from the
chain.  In in_rtflushall(), walk the chain and remove every route
cache.

In rtrequest1(), call rtflushall() to invalidate route caches when
a route is added.

In gif(4), discard the workaround for stale caches that involves
expiring them every so often.

Replace the pattern 'RTFREE(ro->ro_rt); ro->ro_rt = NULL;' with a
call to rtflush(ro).

Update ipflow_fastforward() and all other users of route caches so
that they expect a cached route, ro->ro_rt, to turn to NULL.

Take care when moving a 'struct route' to rtflush() the source and
to rtcache() the destination.

In domain initializers, use .dom_xxx tags.

KNF here and there.

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

Sync with head.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:45 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.122: +9 -9 lines
Diff to previous 1.122 (colored)

__unused removal on arguments; approved by core.

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

sync with head

Revision 1.122 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:38 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.121: +14 -20 lines
Diff to previous 1.121 (colored)

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

Revision 1.114.2.6 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:59 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.114.2.5: +3 -15 lines
Diff to previous 1.114.2.5 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

sync with head.

Revision 1.113.2.3 / (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.113.2.2: +50 -87 lines
Diff to previous 1.113.2.2 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored)

sync with head

Revision 1.121 / (download) - annotate - [select for diffs], Tue Sep 5 16:11:26 2006 UTC (17 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.120: +3 -15 lines
Diff to previous 1.120 (colored)

Simplify and repair icmp6_input() to stop the kernel from panicking
in m_copydata() when an ICMP6_ECHO_REQUEST is received, as reported
by Tatoku Ogaito on current-users@.

Revision 1.114.2.5 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:42 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.114.2.4: +16 -38 lines
Diff to previous 1.114.2.4 (colored) to branchpoint 1.114 (colored)

sync with head.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Sep 1 02:44:46 2006 UTC (17 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8
Changes since 1.119: +15 -37 lines
Diff to previous 1.119 (colored)

Vastly simplify the code that copies an ICMP6 packet to two data
paths: ICMP6 reply path, and socket path.

Revision 1.119 / (download) - annotate - [select for diffs], Wed Aug 30 15:25:08 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

declare the type of code.

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

sync with head

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:50:06 2006 UTC (17 years, 7 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.117: +3 -2 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Merge from HEAD.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Jul 11 22:13:56 2006 UTC (17 years, 7 months ago) by tron
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.117: +3 -2 lines
Diff to previous 1.117 (colored)

Clear mbuf checksum flags before passing it to ip6_output(). We might
recycle a mbuf which contained a hardware provided checksum. This
fixes "traceroute6" to a machine which is using a wm(4) interface
that has UDP or TCP checksum offload enabled.

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

sync with head.

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

sync with head.

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

Sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:02 2006 UTC (17 years, 8 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.116: +5 -4 lines
Diff to previous 1.116 (colored)

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

Revision 1.115.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.115: +9 -17 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

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

Revision 1.114.2.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.114.2.1: +9 -17 lines
Diff to previous 1.114.2.1 (colored) to branchpoint 1.114 (colored)

sync with head.

Revision 1.113.4.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:11 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.113.4.1: +34 -40 lines
Diff to previous 1.113.4.1 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored)

Sync with head.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Wed Apr 19 04:46:11 2006 UTC (17 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.115: +9 -17 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Sat Apr 15 00:24:12 2006 UTC (17 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.115: +9 -17 lines
Diff to previous 1.115 (colored)

Coverity CID 740: Change constant comparisons to MCLBYTES to KASSERT and remove
extraneous tests.

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

sync with head.

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

Fix typos in comments.

From: the KAME project via SUZUKI Shinsuke.

Revision 1.113.2.2 / (download) - annotate - [select for diffs], Thu Feb 23 16:09:01 2006 UTC (18 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.113.2.1: +8 -8 lines
Diff to previous 1.113.2.1 (colored) to branchpoint 1.113 (colored)

Another round of s/in6pcb/inpcb/.

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

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

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Thu Feb 2 22:16:11 2006 UTC (18 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.113: +19 -21 lines
Diff to previous 1.113 (colored)

Adapt to in6pcb -> inpcb changes.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:41 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.112: +110 -113 lines
Diff to previous 1.112 (colored) next main 1.113 (colored)

sync with head.

Revision 1.113 / (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
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.112: +110 -113 lines
Diff to previous 1.112 (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.112 / (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.111: +2 -2 lines
Diff to previous 1.111 (colored)

merge ktrace-lwp.

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

Sync with HEAD. Here we go again...

Revision 1.106.2.1.4.1 / (download) - annotate - [select for diffs], Fri Oct 28 23:10:38 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2-1
Changes since 1.106.2.1: +3 -2 lines
Diff to previous 1.106.2.1 (colored) next main 1.106.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5938):
	sys/netinet6/icmp6.c: revision 1.111
In icmp6_redirect_output(), sip6 is initialised to point to the data area of
m0. But m0 may be freed later, so trying to use sip6 at the end of this
function is wrong. My guess is that we want to reference the data area
of m (the mbuf about to be send) instead at this point.
Fix a panic on Xen (where a data area of a mbuf may be unmapped when the
mbuf is freed), and probably potential data/pool corruption in other cases.

Revision 1.106.2.1.2.1 / (download) - annotate - [select for diffs], Fri Oct 28 23:00:11 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2
Changes since 1.106.2.1: +3 -2 lines
Diff to previous 1.106.2.1 (colored) next main 1.106.2.2 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5938):
	sys/netinet6/icmp6.c: revision 1.111
In icmp6_redirect_output(), sip6 is initialised to point to the data area of
m0. But m0 may be freed later, so trying to use sip6 at the end of this
function is wrong. My guess is that we want to reference the data area
of m (the mbuf about to be send) instead at this point.
Fix a panic on Xen (where a data area of a mbuf may be unmapped when the
mbuf is freed), and probably potential data/pool corruption in other cases.

Revision 1.106.2.2 / (download) - annotate - [select for diffs], Fri Oct 28 22:58:43 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2-0
CVS Tags: netbsd-2-0-3-RELEASE
Changes since 1.106.2.1: +3 -2 lines
Diff to previous 1.106.2.1 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5938):
	sys/netinet6/icmp6.c: revision 1.111
In icmp6_redirect_output(), sip6 is initialised to point to the data area of
m0. But m0 may be freed later, so trying to use sip6 at the end of this
function is wrong. My guess is that we want to reference the data area
of m (the mbuf about to be send) instead at this point.
Fix a panic on Xen (where a data area of a mbuf may be unmapped when the
mbuf is freed), and probably potential data/pool corruption in other cases.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Wed Oct 26 08:32:52 2005 UTC (18 years, 4 months ago) by yamt
Branch: yamt-vop
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored) next main 1.111 (colored)

sync with head

Revision 1.111 / (download) - annotate - [select for diffs], Wed Oct 19 20:42:54 2005 UTC (18 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored)

In icmp6_redirect_output(), sip6 is initialised to point to the data area of
m0. But m0 may be freed later, so trying to use sip6 at the end of this
function is wrong. My guess is that we want to reference the data area
of m (the mbuf about to be send) instead at this point.
Fix a panic on Xen (where a data area of a mbuf may be unmapped when the
mbuf is freed), and probably potential data/pool corruption in other cases.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Aug 18 00:30:59 2005 UTC (18 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base
Branch point for: yamt-vop
Changes since 1.109: +4 -5 lines
Diff to previous 1.109 (colored)

- introduce M_MOVE_PKTHDR and use it where appropriate.
  intended to be mostly API compatible with openbsd/freebsd.
- remove a glue #define in netipsec/ipsec_osdep.h.

Revision 1.109 / (download) - annotate - [select for diffs], Sun May 29 21:43:51 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.108: +4 -3 lines
Diff to previous 1.108 (colored)

- avoid shadowed variables
- sprinkle const.

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

sync with -current

Revision 1.94.2.4 / (download) - annotate - [select for diffs], Mon Jan 17 19:32:54 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.94.2.3: +2 -4 lines
Diff to previous 1.94.2.3 (colored)

Sync with HEAD.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Jan 17 10:16:07 2005 UTC (19 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, kent-audio2-base
Branch point for: netbsd-3-1, netbsd-3-0, netbsd-3
Changes since 1.107: +2 -4 lines
Diff to previous 1.107 (colored)

shouldn't check code field on "packet too big" icmp6 message.

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

Fix the sync with head I botched.

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

Sync with HEAD.

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

Sync with HEAD

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Fri May 28 07:24:47 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
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-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2
Changes since 1.106: +36 -19 lines
Diff to previous 1.106 (colored)

Pull up revision 1.107 (requested by atatat in ticket #391):
Sysctl descriptions under net subtree (net.key not done)

Revision 1.107 / (download) - annotate - [select for diffs], Tue May 25 04:34:00 2004 UTC (19 years, 9 months ago) by atatat
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.106: +36 -19 lines
Diff to previous 1.106 (colored)

Sysctl descriptions under net subtree (net.key not done)

Revision 1.106 / (download) - annotate - [select for diffs], Fri Mar 26 03:35:02 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.105: +4 -3 lines
Diff to previous 1.105 (colored)

do not touch m->m_pkthdr.rcvif after m becomes invalid.  Patrick Latifi

Revision 1.105 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:54 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
Changes since 1.104: +44 -23 lines
Diff to previous 1.104 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Dec 17 18:49:38 2003 UTC (20 years, 2 months ago) by lha
Branch: MAIN
Changes since 1.103: +5 -4 lines
Diff to previous 1.103 (colored)

Fix ICMPV6CTL_ND6_[DP]RLIST, they broke with new sysctl.
Makes ndp -r/ndp -p work again, patch from atatat

Revision 1.103 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:24 2003 UTC (20 years, 2 months ago) by atatat
Branch: MAIN
Changes since 1.102: +121 -55 lines
Diff to previous 1.102 (colored)

Dynamic sysctl.

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

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

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

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

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

Remove some assigned-to but otherwise unused variables.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Sep 4 09:17:05 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.100: +8 -6 lines
Diff to previous 1.100 (colored)

revamp inpcb/in6pcb so that they are more aligned with each other.
in6pcb lookup now uses hash(9).

Revision 1.100 / (download) - annotate - [select for diffs], Mon Aug 25 00:11:52 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored)

deref member in in6p directly, don't rely on existence of macro

Revision 1.99 / (download) - annotate - [select for diffs], Fri Aug 22 22:00:39 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.98: +2 -10 lines
Diff to previous 1.98 (colored)

remove ipsec_set/getsocket.  now we explicitly pass socket * to ip{,6}_output.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Aug 22 21:53:07 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.97: +4 -4 lines
Diff to previous 1.97 (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.97 / (download) - annotate - [select for diffs], Fri Aug 22 20:20:09 2003 UTC (20 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.96: +7 -4 lines
Diff to previous 1.96 (colored)

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.96 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:22 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.95: +3 -7 lines
Diff to previous 1.95 (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.95 / (download) - annotate - [select for diffs], Wed Aug 6 14:47:32 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

m_cat may free mbuf on 2nd arg, so m_pkthdr manipulation has to happen
before m_cat call.  from Julian Coleman via kame.

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

remove unneeded checks of accept_rtadv.  from kame

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

use time.tv_sec directly

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jun 6 08:13:43 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.91: +10 -10 lines
Diff to previous 1.91 (colored)

- sync up MLD declaration with RFC3542 (s/MLD6/MLD/)
- routing header declaration with RFC3542
  (note: sizeof(ip6_rthdr0) has changed!)
  also, sync up with RFC2460 routing header definition (no "strict" source
  routing mode any more)

part of advanced API update (RFC2292 -> 3542).

Revision 1.91 / (download) - annotate - [select for diffs], Tue Jun 3 05:20:06 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.90: +50 -66 lines
Diff to previous 1.90 (colored)

remove assumption on redirect header option processing.  from kame

Revision 1.90 / (download) - annotate - [select for diffs], Wed May 14 06:47:40 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.89: +2 -78 lines
Diff to previous 1.89 (colored)

always use PULLDOWN_TEST codepath.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Mar 31 23:55:46 2003 UTC (20 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.88: +7 -2 lines
Diff to previous 1.88 (colored)

avoid mbuf leak in redirect header option attachment.  more complete
fix to come.  from kame

Revision 1.59.2.11 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:21 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.59.2.10: +1 -5 lines
Diff to previous 1.59.2.10 (colored) next main 1.60 (colored)

Catch up to -current.

Revision 1.66.2.5 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:13 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.66.2.4: +23 -27 lines
Diff to previous 1.66.2.4 (colored) to branchpoint 1.66 (colored) next main 1.67 (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.88 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:52 2002 UTC (21 years, 5 months ago) by provos
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.87: +3 -3 lines
Diff to previous 1.87 (colored)

remove trailing \n in panic().  approved perry.

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

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

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

Catch up to -current.

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

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

Revision 1.66.2.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:49:28 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.66.2.3: +8 -6 lines
Diff to previous 1.66.2.3 (colored) to branchpoint 1.66 (colored)

sync kqueue branch with HEAD

Revision 1.75.6.4 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:50 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.75.6.3: +3 -3 lines
Diff to previous 1.75.6.3 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored)

catch up with -current.

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

Catch up to -current.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Jul 30 23:27:15 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.84: +3 -3 lines
Diff to previous 1.84 (colored)

no need to check NULL mbuf, as we touch it already.
From: tedu <grendel@zeitbombe.org>

Revision 1.75.6.3 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:04 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.75.6.2: +7 -5 lines
Diff to previous 1.75.6.2 (colored) to branchpoint 1.75 (colored)

catch up with -current.

Revision 1.75.8.3 / (download) - annotate - [select for diffs], Thu Jul 11 18:26:02 2002 UTC (21 years, 7 months ago) by thorpej
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.75.8.2: +6 -5 lines
Diff to previous 1.75.8.2 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored)

pullup-1-6 ticket #457 (itojun).

Original log message:
correct ping6 -w result wth hostname with [A-Z].  PR 17540.  sync w/kame

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jul 10 05:05:01 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.83: +6 -5 lines
Diff to previous 1.83 (colored)

correct ping6 -w result wth hostname with [A-Z].  PR 17540.  sync w/kame

Revision 1.83 / (download) - annotate - [select for diffs], Sun Jun 30 22:40:38 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (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.66.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:08 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.66.2.2: +33 -20 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored)

catch up with -current on kqueue branch

Revision 1.75.6.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:37 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.75.6.1: +14 -14 lines
Diff to previous 1.75.6.1 (colored) to branchpoint 1.75 (colored)

catch up with -current.

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

Catch up to -current.

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

whitespace cleanup

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jun 8 20:06:44 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.80: +7 -4 lines
Diff to previous 1.80 (colored)

whitespace cleanup

Revision 1.75.8.2 / (download) - annotate - [select for diffs], Wed Jun 5 03:52:52 2002 UTC (21 years, 8 months ago) by lukem
Branch: netbsd-1-6
Changes since 1.75.8.1: +8 -11 lines
Diff to previous 1.75.8.1 (colored) to branchpoint 1.75 (colored)

Pull up revisions 1.78 & 1.80 (via patch) (requested by itojun in #123 & #124):
- correct rmx_mtu value after PMTUD entry timeout (should be set to 0)
- do not mistakenly lock PMTUD route entry with RTV_MTU.

Revision 1.80 / (download) - annotate - [select for diffs], Fri May 31 04:26:19 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.79: +6 -9 lines
Diff to previous 1.79 (colored)

do not mistakenly lock PMTUD route entry with RTV_MTU.

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

Catch up with -current.

Revision 1.79 / (download) - annotate - [select for diffs], Wed May 29 19:50:48 2002 UTC (21 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

make this compile again.

Revision 1.78 / (download) - annotate - [select for diffs], Wed May 29 06:55:48 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

correct rmx_mtu value after PMTUD entry timeout (should be set to 0)

Revision 1.75.8.1 / (download) - annotate - [select for diffs], Tue May 28 19:24:57 2002 UTC (21 years, 9 months ago) by tv
Branch: netbsd-1-6
Changes since 1.75: +18 -4 lines
Diff to previous 1.75 (colored)

Pull up revision 1.76 (requested by itojun):
make a strict check before sending FQDN node information reply.  sync w/kame

Revision 1.77 / (download) - annotate - [select for diffs], Fri May 24 09:21:30 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.76: +2 -3 lines
Diff to previous 1.76 (colored)

extra blank line

Revision 1.76 / (download) - annotate - [select for diffs], Fri May 24 09:13:59 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.75: +18 -4 lines
Diff to previous 1.75 (colored)

make a strict check before sending FQDN node information reply.  sync w/kame

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

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

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:16 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.66.2.1: +39 -41 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored)

Catch up with -current.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Mar 5 08:13:56 2002 UTC (21 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.74: +39 -41 lines
Diff to previous 1.74 (colored)

on redirect output, always try to attach target link layer address option.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 20:03:11 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.66: +150 -72 lines
Diff to previous 1.66 (colored)

Sync kqueue branch with -current.

Revision 1.59.2.6 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:14 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.59.2.5: +31 -19 lines
Diff to previous 1.59.2.5 (colored)

Catch up to -current.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Dec 21 08:54:53 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.73: +15 -14 lines
Diff to previous 1.73 (colored)

whitespace/costmetic sync w/kame

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

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

Revision 1.72 / (download) - annotate - [select for diffs], Fri Dec 7 10:10:43 2001 UTC (22 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.71: +12 -7 lines
Diff to previous 1.71 (colored)

correct timing to increment icmp6 MIB variables.  sync with kame

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

Catch up to -current.

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

add RCSIDs

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:30 2001 UTC (22 years, 3 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.68: +3 -5 lines
Diff to previous 1.68 (colored) next main 1.69 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.70 / (download) - annotate - [select for diffs], Mon Oct 29 07:02:34 2001 UTC (22 years, 4 months ago) by simonb
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.69: +2 -4 lines
Diff to previous 1.69 (colored)

Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.

Revision 1.69 / (download) - annotate - [select for diffs], Wed Oct 24 06:36:37 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

more whitespace sync with kame

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

Catch up to -current.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Oct 18 09:09:25 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Branch point for: thorpej-mips-cache
Changes since 1.67: +5 -8 lines
Diff to previous 1.67 (colored)

simplify per-if stats.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Oct 15 11:12:44 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.66: +114 -46 lines
Diff to previous 1.66 (colored)

sync with kame.
net.inet6.icmp6.nodeinfo is now a bitmap (2^0 = ping6 -w, 2^1 = ping6 -a).
give up local if there's mbuf alloc failures.
cope with ".." in hostname.
sync comments/whitespaces.

Revision 1.59.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:34 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.59.2.2: +11 -46 lines
Diff to previous 1.59.2.2 (colored)

Catch up with -current.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jun 22 13:01:49 2001 UTC (22 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: kqueue
Changes since 1.65: +12 -47 lines
Diff to previous 1.65 (colored)

remove RFC1885 compatibility code in #ifdef COMPAT_RFC1885, for icmp6
reply packet size consideration (obsolete, not used for a long time).
sync with kame

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

Catch up to -current.

Revision 1.33.2.15 / (download) - annotate - [select for diffs], Thu Jun 7 16:13:05 2001 UTC (22 years, 8 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.33.2.14: +3 -2 lines
Diff to previous 1.33.2.14 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

Pull up revision 1.65 (requested by itojun):
  Correct icmp6 hoplimit value.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jun 1 05:54:19 2001 UTC (22 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.64: +4 -3 lines
Diff to previous 1.64 (colored)

use default hoplimit when incoming interface is not given to icmp6_reflect.
sync with kame

Revision 1.33.2.14 / (download) - annotate - [select for diffs], Wed May 9 19:42:09 2001 UTC (22 years, 9 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.13: +20 -19 lines
Diff to previous 1.33.2.13 (colored) to branchpoint 1.33 (colored)

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

Revision 1.33.2.13 / (download) - annotate - [select for diffs], Wed May 9 19:38:03 2001 UTC (22 years, 9 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.12: +5 -2 lines
Diff to previous 1.33.2.12 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.64 (via patch, requested by itojun):
  Correct faith prefix determintaion.

Revision 1.64 / (download) - annotate - [select for diffs], Tue May 8 10:15:15 2001 UTC (22 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.63: +6 -3 lines
Diff to previous 1.63 (colored)

correct faith prefix determination.  use sys/netinet/if_faith.c:faithprefix()
to determine.  sync with kame.
(without this change, non-faith socket may mistakenly accept for-faith traffic)

Revision 1.33.2.12 / (download) - annotate - [select for diffs], Sat Apr 28 06:55:46 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.11: +41 -13 lines
Diff to previous 1.33.2.11 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.55 (partial, via patch, requested by itojun):
  Correct source address selection in icmp6_reflect().
  Fixes two problems: kernel may fail to send icmp6 messages, and
  there would be a way for user programs to cause a panic.

Revision 1.33.2.11 / (download) - annotate - [select for diffs], Sun Apr 22 17:33:53 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.10: +2 -2 lines
Diff to previous 1.33.2.10 (colored) to branchpoint 1.33 (colored)

Apply patch (requested by itojun):
  Avoid passing NULL pointer to in6_ifawithscope.

Revision 1.11.2.8 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:53 2001 UTC (22 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.7: +10 -8 lines
Diff to previous 1.11.2.7 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD

Revision 1.59.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:58:34 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.59: +13 -13 lines
Diff to previous 1.59 (colored)

Catch up with -current.

Revision 1.33.2.10 / (download) - annotate - [select for diffs], Fri Apr 6 00:27:40 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.9: +3 -3 lines
Diff to previous 1.33.2.9 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.52 (requested by itojun):
  Record IPsec packet history in m_aux structure.  Let ipfilter
  look at wire-format packet only (not the decapsulated ones), so
  that VPN setting can work with NAT/ipfilter settings.

Revision 1.33.2.9 / (download) - annotate - [select for diffs], Wed Apr 4 17:14:31 2001 UTC (22 years, 10 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.8: +10 -1 lines
Diff to previous 1.33.2.8 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.63 (requested by itojun):
  Make sure rcvif is sane on call to icmp6_reflect().
  Fixes panic in certain configurations / instances.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Apr 4 06:28:41 2001 UTC (22 years, 10 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.62: +10 -1 lines
Diff to previous 1.62 (colored)

make sure rcvif is sane on call to icmp6_reflect

Revision 1.62 / (download) - annotate - [select for diffs], Fri Mar 30 11:08:56 2001 UTC (22 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.61: +1 -8 lines
Diff to previous 1.61 (colored)

enable FAKE_LOOPBACK_IF case by default.
now traffic on loopback interface will be presented to bpf as normal wire
format packet (without KAME scopeid in s6_addr16[1]).

fix KAME PR 250 (host mistakenly accepts packets to fe80::x%lo0).

sync with kame.

Revision 1.11.2.7 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:36 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.6: +3 -4 lines
Diff to previous 1.11.2.6 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Mar 21 07:52:13 2001 UTC (22 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.60: +4 -5 lines
Diff to previous 1.60 (colored)

set rmx_mtu to L2 interface mtu, instead of 0, on mtudisc timeout.
ip6_output() change is for safety.  sync with kame

Revision 1.11.2.6 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:53 2001 UTC (22 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.5: +2 -11 lines
Diff to previous 1.11.2.5 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.33.2.8 / (download) - annotate - [select for diffs], Sun Mar 11 21:11:58 2001 UTC (22 years, 11 months ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.7: +1 -9 lines
Diff to previous 1.33.2.7 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.59 (requested by itojun):
  Ensure that we enforce inbound IPsec policy on all IP protocols,
  not just TCP, UDP and ICMP.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 8 00:19:03 2001 UTC (22 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.59: +2 -3 lines
Diff to previous 1.59 (colored)

remove bogus rtfree.  sync with kame.  inspired by openbsd PR 1706.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Mar 1 16:31:40 2001 UTC (23 years ago) by itojun
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.58: +2 -10 lines
Diff to previous 1.58 (colored)

make sure to enforce inbound ipsec policy checking, for any protocols on top
of ip (check it when final header is visited).  sync with kame.
XXX kame team will need to re-check policy engine code

Revision 1.11.2.5 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:21 2001 UTC (23 years ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.4: +355 -227 lines
Diff to previous 1.11.2.4 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Feb 11 06:49:51 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.57: +125 -55 lines
Diff to previous 1.57 (colored)

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

Revision 1.57 / (download) - annotate - [select for diffs], Sun Feb 11 04:53:49 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.56: +1 -0 lines
Diff to previous 1.56 (colored)

recover $NetBSD$ (removed by mistake)

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

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

Revision 1.55 / (download) - annotate - [select for diffs], Thu Feb 8 16:07:40 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.54: +95 -25 lines
Diff to previous 1.54 (colored)

implement upper limit to icmp6 redirects (experimental, turned off)
negative value to {mtudisc,redirect}_{hi,lo}wat will turn off the limitation.
sync with kame.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Feb 7 10:56:38 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.53: +1 -7 lines
Diff to previous 1.53 (colored)

remove bogus DIAGNOSTIC.  sync with kame

Revision 1.53 / (download) - annotate - [select for diffs], Wed Feb 7 08:59:48 2001 UTC (23 years ago) by itojun
Branch: MAIN
Changes since 1.52: +69 -85 lines
Diff to previous 1.52 (colored)

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

improve stats in ND6 code.

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

Revision 1.33.2.7 / (download) - annotate - [select for diffs], Sat Feb 3 18:35:14 2001 UTC (23 years ago) by he
Branch: netbsd-1-5
Changes since 1.33.2.6: +2 -2 lines
Diff to previous 1.33.2.6 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.51 (requested by itojun):
  Correct ND6DEBUG -> ND6_DEBUG.

Revision 1.33.2.6 / (download) - annotate - [select for diffs], Fri Jan 26 01:18:25 2001 UTC (23 years, 1 month ago) by jhawk
Branch: netbsd-1-5
Changes since 1.33.2.5: +4 -4 lines
Diff to previous 1.33.2.5 (colored) to branchpoint 1.33 (colored)

Pull up revision 1.50 (requested by itojun):
  Only printf() IPv6 ICMP checksum errors under ND6DEBUG.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Jan 24 09:04:16 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

- record IPsec packet history into m_aux structure.
- let ipfilter look at wire-format packet only (not the decapsulated ones),
  so that VPN setting can work with NAT/ipfilter settings.
sync with kame.

TODO: use header history for stricter inbound validation

Revision 1.11.2.4 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:57 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.3: +3 -3 lines
Diff to previous 1.11.2.3 (colored) to branchpoint 1.11 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.51 / (download) - annotate - [select for diffs], Tue Jan 16 06:16:37 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

s/ND6DEBUG/ND6_DEBUG/ to meet other places

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jan 8 06:12:46 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored)

wrap icmp6 checksum error printf() into #ifdef ND6DEBUG.
sync with kame,  NetBSD PR 11911.

Revision 1.11.2.3 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:36 2000 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.2: +33 -8 lines
Diff to previous 1.11.2.2 (colored) to branchpoint 1.11 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.49 / (download) - annotate - [select for diffs], Mon Dec 11 19:28:47 2000 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.48: +3 -8 lines
Diff to previous 1.48 (colored)

no need to rtalloc1() twice in pmtud. from kame

Revision 1.48 / (download) - annotate - [select for diffs], Sat Dec 9 01:29:50 2000 UTC (23 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.47: +32 -2 lines
Diff to previous 1.47 (colored)

update icmp6 too big validation.  the change is necessary since pmtud is
mandatory for IPv6 (so we can't just validate by using connected pcb - we need
to allow traffic from unconnected pcb to do pmtud).
- if the traffic is validated by xx_ctlinput, allow up to "hiwat" pmtud
  route entries.
- if the traffic was not validated by xx_ctlinput, allow up to "lowat" pmtud
  route entries (there's upper limit, so bad guys cannot blow up our routing
  table).
sync with kame

XXX need to think again about default hiwat/lowat value.
XXX victim selection to help starvation case

Revision 1.11.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:19 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11.2.1: +205 -121 lines
Diff to previous 1.11.2.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:44 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.11: +1206 -549 lines
Diff to previous 1.11 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.47 / (download) - annotate - [select for diffs], Sat Nov 11 00:46:37 2000 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.46: +205 -121 lines
Diff to previous 1.46 (colored)

improve spec conformance of node information query (07).
sync with kame.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Oct 18 21:14:15 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.45: +67 -19 lines
Diff to previous 1.45 (colored)

verify ICMPv6 too big messages based on TCP pcbs, and/or IPsec SA.
TODO: udp6, and sendto consideration.  as pmtud is mandatory for IPv6,
it is rather important for us to support those cases.
TODO: more testing
TODO: kame sync

Revision 1.45 / (download) - annotate - [select for diffs], Tue Oct 10 16:26:44 2000 UTC (23 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

sync with kame ($KAME$)

Revision 1.33.2.5 / (download) - annotate - [select for diffs], Mon Oct 2 23:41:32 2000 UTC (23 years, 5 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.33.2.4: +3 -3 lines
Diff to previous 1.33.2.4 (colored) to branchpoint 1.33 (colored)

pullup (approved by releng-1-5)
correct ipsecstat/ipsec6stat mixup.

netinet6/ah_input.c 1.18 -> 1.19
netinet6/ah_output.c 1.11 -> 1.12 (part of)
netinet6/esp_input.c 1.8 -> 1.9 (part of)
netinet6/esp_output.c 1.8 -> 1.9
netinet6/icmp6.c 1.43 -> 1.44
netinet6/ipcomp_input.c 1.13 -> 1.14
netinet6/ipcomp_output.c 1.13 -> 1.14

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 2 03:55:42 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

fix compilation without INET.  fix confusion between ipsecstat and ipsec6stat.
sync with kame.

Revision 1.33.2.4 / (download) - annotate - [select for diffs], Tue Sep 19 19:52:25 2000 UTC (23 years, 5 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.33.2.3: +12 -2 lines
Diff to previous 1.33.2.3 (colored) to branchpoint 1.33 (colored)

pullup 1.42 -> 1.43 (approved by releng-1-5)

 > kame sys/netinet6/icmp6.c 1.140 -> 1.144
 > >   in the check for the incoming redirect message, examine the gateway
 > >   (from the routing table) only when the address family of the gateway is
 > >   AF_INET6.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Sep 16 10:12:22 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.42: +12 -2 lines
Diff to previous 1.42 (colored)

kame sys/netinet6/icmp6.c 1.140 -> 1.144
>   in the check for the incoming redirect message, examine the gateway
>   (from the routing table) only when the address family of the gateway is
>   AF_INET6.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Aug 19 08:15:54 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.41: +12 -10 lines
Diff to previous 1.41 (colored)

- icmp6 nodeinfo: remove possibility of unaligned pointer access.
- jumbo payload output: fix incorrect mbuf manipulation
- pedant: align issues, mbuf assumption
(sync with kame)

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Wed Aug 16 01:22:25 2000 UTC (23 years, 6 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.33.2.2: +18 -31 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored)

pullup (approved by releng-1-5)

switch from net.inet*.*.*ratelimit to net.inet*.*.ppslimit.

(tags are rough estimate - we had some try-and-error in main trunc)
sys/netinet/icmp6.h             1.9 -> 1.11
sys/netinet/icmp_var.h          1.15 -> 1.17
sys/netinet/in_proto.c          1.39 -> 1.42
sys/netinet/ip_icmp.c           1.50 -> 1.51, 1.52 -> 1.54
sys/netinet/tcp_input.c         1.111 -> 1.112, 1.115 -> 1.117
sys/netinet/tcp_usrreq.c        1.52 -> 1.53
sys/netinet/tcp_var.h           1.72 -> 1.75
sys/netinet6/icmp6.c            1.34 -> 1.35, 1.36 -> 1.38
sys/netinet6/in6_proto.c        1.17 -> 1.19

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Fri Aug 4 15:11:59 2000 UTC (23 years, 6 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-ALPHA2
Changes since 1.33.2.1: +25 -35 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored)

pullup (approved by releng-1-5)
sys/netinet6/icmp6.h 1.11 -> 1.13
sys/netinet6/icmp6.c 1.39 -> 1.41

cvs rdiff -r1.11 -r1.12 syssrc/sys/netinet/icmp6.h
cvs rdiff -r1.39 -r1.40 syssrc/sys/netinet6/icmp6.c

correct typo in #define.  ICMP6_NI_SUCESS -> SUCCESS (notice missing C).
sync with kame.

cvs rdiff -r1.12 -r1.13 syssrc/sys/netinet/icmp6.h
cvs rdiff -r1.40 -r1.41 syssrc/sys/netinet6/icmp6.c

clearifications in icmp6 node query support.
XXX previous commit included "supported qtypes" icmp6 node query support.
sorry commit message was mistaken.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Aug 3 16:30:38 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

clearifications in icmp6 node query support.
XXX previous commit included "supported qtypes" icmp6 node query support.
sorry commit message was mistaken.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Aug 3 14:31:05 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.39: +25 -35 lines
Diff to previous 1.39 (colored)

correct typo in #define.  ICMP6_NI_SUCESS -> SUCCESS (notice missing C).
sync with kame.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jul 30 05:30:37 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.38: +1 -9 lines
Diff to previous 1.38 (colored)

sync comment with reality

Revision 1.38 / (download) - annotate - [select for diffs], Fri Jul 28 04:06:58 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.37: +1 -30 lines
Diff to previous 1.37 (colored)

nuke the following sysctl variables.  "ppsratelimit" should work better.
need to recompile sbin/sysctl after updating /usr/include.
	net.inet.tcp.rstratelimit
	net.inet.icmp.errratelimit
	net.inet6.icmp6.errratelimit

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Thu Jul 20 00:07:05 2000 UTC (23 years, 7 months ago) by itojun
Branch: netbsd-1-5
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored)

pullup from main trunc (approved by releng-1-5)
- add protection mechanism against ND cache corruption due to bad NUD hints.

this is part of:
sys/netinet/icmp6.h	1.9 -> 1.10
sys/netinet/tcp_input.c	1.111 -> 1.112
sys/netinet6/icmp6.c	1.34 -> 1.35
sys/netinet6/nd6.c	1.30 -> 1.31
sys/netinet6/nd6.h	1.14 -> 1.15

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jul 9 06:44:58 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.36: +5 -7 lines
Diff to previous 1.36 (colored)

add ppsratelimit(9), which does event-per-sec rate limitation.
use it from icmp6 error rate limitation code.
XXX better name for the function?

Revision 1.36 / (download) - annotate - [select for diffs], Fri Jul 7 15:54:17 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.35: +3 -11 lines
Diff to previous 1.35 (colored)

sync with kame.
introduce in6_{recover,embed}scope, for in-kernel scoped-address manipulation.
improve in6_pcbnotify.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Jul 6 12:36:18 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.34: +105 -9 lines
Diff to previous 1.34 (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.34 / (download) - annotate - [select for diffs], Wed Jun 28 03:04:03 2000 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.33: +3 -2 lines
Diff to previous 1.33 (colored)

<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:55 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.30: +410 -82 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 13 17:31:37 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base
Branch point for: netbsd-1-5
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

signedness issue with char, take 2.  confirmed with i386 cc -funsigned-char.

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jun 13 16:34:37 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

workaround to suppress warning on char == unsigned char arch.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jun 12 16:21:03 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.30: +410 -82 lines
Diff to previous 1.30 (colored)

better conformance to draft-ietf-ipngwg-icmp-name-lookups-05.
the old code was chimera of 03 and 05 draft.

-n by default, since IPv6 reverse lookup takes too much time.
use -H to enable reverse name lookup.

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 22 12:08:44 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.29: +3 -1 lines
Diff to previous 1.29 (colored)

disallow negative numbers for ratelimit interval (tcp, icmp, icmp6).

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 9 11:51:12 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.28: +26 -19 lines
Diff to previous 1.28 (colored)

do not try NUD unless the gateway is a real neighbor.
real fix to KAME PR 245 (workaround has been implemented).

Revision 1.28 / (download) - annotate - [select for diffs], Thu Apr 13 14:07:10 2000 UTC (23 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

do not return icmp6 error against icmp6 error.
(this is due to a bug in header chain chasing)

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 22 04:42:01 2000 UTC (23 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.26: +37 -74 lines
Diff to previous 1.26 (colored)

use ip6_{last,next}hdr in icmp6 inbound packet parsing.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Mar 1 12:49:44 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored)

introduce m->m_pkthdr.aux to hold random data which needs to be passed
between protocol handlers.

ipsec socket pointers, ipsec decryption/auth information, tunnel
decapsulation information are in my mind - there can be several other usage.
at this moment, we use this for ipsec socket pointer passing.  this will
avoid reuse of m->m_pkthdr.rcvif in ipsec code.

due to the change, MHLEN will be decreased by sizeof(void *) - for example,
for i386, MHLEN was 100 bytes, but is now 96 bytes.
we may want to increase MSIZE from 128 to 256 for some of our architectures.

take caution if you use it for keeping some data item for long period
of time - use extra caution on M_PREPEND() or m_adj(), as they may result
in loss of m->m_pkthdr.aux pointer (and mbuf leak).

this will bump kernel version.

(as discussed in tech-net, tested in kame tree)

Revision 1.25 / (download) - annotate - [select for diffs], Mon Feb 28 14:30:36 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)

fix ICMPv6 redirect input.  the bug can result in invalid ND entry.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Feb 28 13:48:51 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.23: +12 -2 lines
Diff to previous 1.23 (colored)

support draft-ietf-ipngwg-icmp-name-lookups-05.txt, drop support for
draft-ietf-ipngwg-icmp-name-lookups-04.txt.

There are certain bitfield change in 04 draft to 05 draft, which makes
04 "ping6 -a" and 05 "ping6 -a" not interoperable.  sigh.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Feb 26 08:39:19 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.22: +308 -104 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Thu Feb 17 10:59:38 2000 UTC (24 years ago) by darrenr
Branch: MAIN
Changes since 1.21: +1 -3 lines
Diff to previous 1.21 (colored)

Change the use of pfil hooks.  There is no longer a single list of all
pfil information, instead, struct protosw now contains a structure
which caontains list heads, etc.  The per-protosw pfil struct is passed
to pfil_hook_get(), along with an in/out flag to get the head of the
relevant filter list.  This has been done for only IPv4 and IPv6, at
present, with these patches only enabling filtering for IPPROTO_IP and
IPPROTO_IPV6, although it is possible to have tcp/udp, etc, dedicated
filters now also.  The ipfilter code has been updated to only filter
IPv4 packets - next major release of ipfilter is required for ipv6.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Feb 15 00:31:08 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.20: +7 -3 lines
Diff to previous 1.20 (colored)

Fix a couple of brainos in the last.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Feb 14 19:45:50 2000 UTC (24 years ago) by thorpej
Branch: MAIN
Changes since 1.19: +23 -28 lines
Diff to previous 1.19 (colored)

Use ratecheck() for ICMP6 rate limiting.

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

fix include pathname for better rfc2292 compliance.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jan 16 18:06:03 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

add missing ipcomp cases.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 7 06:44:30 2000 UTC (24 years, 1 month ago) by itohy
Branch: MAIN
Changes since 1.16: +6 -6 lines
Diff to previous 1.16 (colored)

Rename variable "prep" for PReP port.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 6 15:46:08 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.15: +1 -166 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Wed Jan 5 16:46:18 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.14: +5 -3 lines
Diff to previous 1.14 (colored)

avoid panic on getsockopt(ICMPV6_FILTER).

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 2 16:31:18 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.13: +25 -14 lines
Diff to previous 1.13 (colored)

add net.inet6.icmp6.nodeinfo sysctl.
this allows you to disable/enable ICMPv6 node information query/reply
processing (which tells remote end the gethostname(3) setting, interface
addresses on the node, and some other things - documented in
draft-ietf-ipngwg-icmp-name-lookup* or something alike).

to test it, try ping6 -w ::1 with nodeinfo=0 and nodeinfo=1.
(sync with kame change)

Revision 1.11.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:22 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.11: +343 -148 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Pull up to last week's -current.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 15 06:28:44 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.12: +5 -3 lines
Diff to previous 1.12 (colored)

do not overwrite traffic class field when we write IPv6 version field.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:21 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.11: +339 -146 lines
Diff to previous 1.11 (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:48 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.1.2.2: +509 -178 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.11 / (download) - annotate - [select for diffs], Fri Oct 1 10:16:16 1999 UTC (24 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.10: +28 -11 lines
Diff to previous 1.10 (colored)

consistent logging for icmp6 redirects
XXX should make logs 1-liner so that duplicated logs can be compressed
by syslog(8)?

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

Update from trunk.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 31 18:41:16 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.9: +17 -9 lines
Diff to previous 1.9 (colored)

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

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

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

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jul 22 12:56:57 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.7: +80 -4 lines
Diff to previous 1.7 (colored)

- implement IPv6 pmtud, which is necessary for TCP6.
- fix memory leak on SO_DEBUG over TCP.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 22 03:59:42 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 9 22:57:26 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jul 6 12:23:21 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.4: +11 -2 lines
Diff to previous 1.4 (colored)

sync with KAME/NetBSD 1.4, SNAP kit 19990705.
key changes are:
- icmp6 redirect fix (dst check)
- revised ip6 multicast check for loopback i/f
- several RCS ID cleanups

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

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

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 6 08:55:56 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.3: +5 -3 lines
Diff to previous 1.3 (colored)

checked build on alpha and i386, with GENERIC.v6.
fixed several sizeof(void *) and sizeof(size_t) issues on alpha.

Thanks to: Dave Huang and Tim Rightnour

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

RCS ID police.

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

Sync w/ -current.

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

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

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

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

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

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

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

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

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

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

file icmp6.c was initially added on branch kame.

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




CVSweb <webmaster@jp.NetBSD.org>