The NetBSD Project

CVS log for src/sys/netinet/udp_usrreq.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.264 / (download) - annotate - [select for diffs], Fri Nov 4 09:00:58 2022 UTC (16 months, 2 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: triaxx-drm, thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.263: +21 -21 lines
Diff to previous 1.263 (colored) to selected 1.171 (colored)

inpcb: rename functions to inpcb_*

Inspired by rmind-smpnet patches.

Revision 1.263 / (download) - annotate - [select for diffs], Fri Oct 28 05:25:36 2022 UTC (16 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.262: +14 -14 lines
Diff to previous 1.262 (colored) to selected 1.171 (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.262 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (16 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.261: +3 -5 lines
Diff to previous 1.261 (colored) to selected 1.171 (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.259.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:02 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.259: +4 -4 lines
Diff to previous 1.259 (colored) next main 1.260 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.261 / (download) - annotate - [select for diffs], Fri Feb 19 14:51:59 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, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.260: +4 -4 lines
Diff to previous 1.260 (colored) to selected 1.171 (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.260 / (download) - annotate - [select for diffs], Sun Feb 14 20:58:35 2021 UTC (3 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.259: +4 -4 lines
Diff to previous 1.259 (colored) to selected 1.171 (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.259 / (download) - annotate - [select for diffs], Thu Aug 20 21:21:32 2020 UTC (3 years, 6 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.258: +27 -3 lines
Diff to previous 1.258 (colored) to selected 1.171 (colored)

[ozaki-r] Changes to the kernel core for wireguard

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:47 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.254: +8 -30 lines
Diff to previous 1.254 (colored) next main 1.255 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.245.2.9 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:58 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.245.2.8: +5 -5 lines
Diff to previous 1.245.2.8 (colored) to branchpoint 1.245 (colored) next main 1.246 (colored) to selected 1.171 (colored)

Synch with HEAD

Revision 1.258 / (download) - annotate - [select for diffs], Thu Dec 27 16:59:17 2018 UTC (5 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, 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, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.257: +5 -5 lines
Diff to previous 1.257 (colored) to selected 1.171 (colored)

Remove unused arguments.

Revision 1.245.2.8 / (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.245.2.7: +3 -3 lines
Diff to previous 1.245.2.7 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.257 / (download) - annotate - [select for diffs], Thu Nov 22 04:48:34 2018 UTC (5 years, 3 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.256: +3 -3 lines
Diff to previous 1.256 (colored) to selected 1.171 (colored)

Support IPv6 NAT-T. Implemented by hsuenaga@IIJ and ohishi@IIJ.

Add ATF later.

Revision 1.245.2.7 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:56 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.245.2.6: +4 -10 lines
Diff to previous 1.245.2.6 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Ssync with HEAD

Revision 1.256 / (download) - annotate - [select for diffs], Fri Sep 14 05:09:51 2018 UTC (5 years, 6 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.255: +4 -10 lines
Diff to previous 1.255 (colored) to selected 1.171 (colored)

Use non-variadic function pointer in protosw::pr_input.

Revision 1.245.2.6 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:10 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.245.2.5: +2 -18 lines
Diff to previous 1.245.2.5 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.255 / (download) - annotate - [select for diffs], Sun Jul 15 05:16:45 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0906, pgoyette-compat-0728
Changes since 1.254: +2 -18 lines
Diff to previous 1.254 (colored) to selected 1.171 (colored)

Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos

Revision 1.245.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.245.2.4: +14 -43 lines
Diff to previous 1.245.2.4 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.233.4.3 / (download) - annotate - [select for diffs], Thu Jun 7 16:05:09 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.233.4.2: +13 -4 lines
Diff to previous 1.233.4.2 (colored) to branchpoint 1.233 (colored) next main 1.234 (colored) to selected 1.171 (colored)

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

	sys/netinet/udp_usrreq.c: revision 1.237

Fix three pretty bad mistakes in NAT-T:

 * If we got a keepalive packet, we need to call m_freem, not m_free.
   Here the next mbufs in the chain are not freed. Seems easy to remotely
   DoS the system by sending fragmented keepalives in a loop.

 * If !ipsec_used, free the mbuf.

 * In udp_input, we need to update 'uh', because udp4_realinput may have
   modified the chain. Perhaps we also need to re-enforce alignment, so
   add an XXX.

Revision 1.217.6.1 / (download) - annotate - [select for diffs], Thu Jun 7 05:03:26 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-7-0
Changes since 1.217: +13 -4 lines
Diff to previous 1.217 (colored) next main 1.218 (colored) to selected 1.171 (colored)

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

        sys/netinet/udp_usrreq.c: revision 1.237 (via patch)

Fix three pretty bad mistakes in NAT-T:

 * If we got a keepalive packet, we need to call m_freem, not m_free.
   Here the next mbufs in the chain are not freed. Seems easy to remotely
   DoS the system by sending fragmented keepalives in a loop.

 * If !ipsec_used, free the mbuf.

 * In udp_input, we need to update 'uh', because udp4_realinput may have
   modified the chain. Perhaps we also need to re-enforce alignment, so
   add an XXX.

Revision 1.217.10.1 / (download) - annotate - [select for diffs], Wed Jun 6 14:49:41 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-7-1
Changes since 1.217: +13 -4 lines
Diff to previous 1.217 (colored) next main 1.218 (colored) to selected 1.171 (colored)

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

	sys/netinet/udp_usrreq.c: revision 1.237 (via patch)

Fix three pretty bad mistakes in NAT-T:

 * If we got a keepalive packet, we need to call m_freem, not m_free.
   Here the next mbufs in the chain are not freed. Seems easy to remotely
   DoS the system by sending fragmented keepalives in a loop.

 * If !ipsec_used, free the mbuf.

 * In udp_input, we need to update 'uh', because udp4_realinput may have
   modified the chain. Perhaps we also need to re-enforce alignment, so
   add an XXX.

Revision 1.217.2.1 / (download) - annotate - [select for diffs], Wed Jun 6 09:48:50 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.217: +13 -4 lines
Diff to previous 1.217 (colored) next main 1.218 (colored) to selected 1.171 (colored)

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

	sys/netinet/udp_usrreq.c: revision 1.237 (via patch)

Fix three pretty bad mistakes in NAT-T:

 * If we got a keepalive packet, we need to call m_freem, not m_free.
   Here the next mbufs in the chain are not freed. Seems easy to remotely
   DoS the system by sending fragmented keepalives in a loop.

 * If !ipsec_used, free the mbuf.

 * In udp_input, we need to update 'uh', because udp4_realinput may have
   modified the chain. Perhaps we also need to re-enforce alignment, so
   add an XXX.

Revision 1.254 / (download) - annotate - [select for diffs], Thu May 31 13:51:56 2018 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.253: +3 -7 lines
Diff to previous 1.253 (colored) to selected 1.171 (colored)

Remove the non-IKE part of the computation, too.

Revision 1.253 / (download) - annotate - [select for diffs], Thu May 31 07:03:57 2018 UTC (5 years, 9 months ago) by maxv
Branch: MAIN
Changes since 1.252: +13 -38 lines
Diff to previous 1.252 (colored) to selected 1.171 (colored)

Remove support for non-IKE markers in the kernel. Discussed on tech-net@,
and now in PR/53334. Basically non-IKE markers come from a deprecated
draft, and our kernel code for them has never worked.

Setsockopt will now reject UDP_ENCAP_ESPINUDP_NON_IKE.

Perhaps we should also add a check in key_handle_natt_info(), to make
sure we also reject UDP_ENCAP_ESPINUDP_NON_IKE in the SADB.

Revision 1.245.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.245.2.3: +42 -35 lines
Diff to previous 1.245.2.3 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.252 / (download) - annotate - [select for diffs], Fri May 18 18:58:51 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.251: +4 -5 lines
Diff to previous 1.251 (colored) to selected 1.171 (colored)

IP6_EXTHDR_GET -> M_REGION_GET, no functional change.

Revision 1.251 / (download) - annotate - [select for diffs], Sun May 13 18:39:06 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
Changes since 1.250: +40 -32 lines
Diff to previous 1.250 (colored) to selected 1.171 (colored)

Clarify ESP-in-UDP.

Revision 1.245.2.3 / (download) - annotate - [select for diffs], Wed May 2 07:20:23 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.245.2.2: +5 -14 lines
Diff to previous 1.245.2.2 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Synch with HEAD

Revision 1.250 / (download) - annotate - [select for diffs], Tue May 1 08:42:41 2018 UTC (5 years, 10 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0502
Changes since 1.249: +5 -13 lines
Diff to previous 1.249 (colored) to selected 1.171 (colored)

Remove unused argument from udp4_espinudp, and remove unused includes.

Revision 1.249 / (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.248: +2 -3 lines
Diff to previous 1.248 (colored) to selected 1.171 (colored)

Remove unused ipsec_var.h includes.

Revision 1.245.2.2 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:09 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.245.2.1: +7 -4 lines
Diff to previous 1.245.2.1 (colored) to branchpoint 1.245 (colored) to selected 1.171 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.248 / (download) - annotate - [select for diffs], Fri Apr 13 09:29:04 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0422, pgoyette-compat-0415
Changes since 1.247: +7 -3 lines
Diff to previous 1.247 (colored) to selected 1.171 (colored)

Improve the check, we want to have len >= udphdr all the time, and not
just when the packet size doesn't match the mbuf size.

Normally that's not a huge problem, since IP6_EXTHDR_GET gets called
earlier, so we can't have

	(ip_len == iphlen + len) && (len < sizeof(struct udphdr))

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

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

Revision 1.233.4.2 / (download) - annotate - [select for diffs], Mon Apr 9 13:34:10 2018 UTC (5 years, 11 months ago) by bouyer
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.233.4.1: +3 -3 lines
Diff to previous 1.233.4.1 (colored) to branchpoint 1.233 (colored) to selected 1.171 (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.245.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.245: +3 -3 lines
Diff to previous 1.245 (colored) to selected 1.171 (colored)

Synch with HEAD, resolve conflicts

Revision 1.246 / (download) - annotate - [select for diffs], Mon Mar 19 16:26:25 2018 UTC (6 years ago) by roy
Branch: MAIN
CVS Tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Changes since 1.245: +3 -3 lines
Diff to previous 1.245 (colored) to selected 1.171 (colored)

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.

Revision 1.245 / (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.244: +2 -3 lines
Diff to previous 1.244 (colored) to selected 1.171 (colored)

Remove unused ipsec_private.h includes.

Revision 1.244 / (download) - annotate - [select for diffs], Wed Feb 28 11:09:03 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.243: +2 -3 lines
Diff to previous 1.243 (colored) to selected 1.171 (colored)

Remove duplicate IPSEC_STATINC(IPSEC_STAT_IN_POLVIO), ipsec_in_reject
already increases it. IPSEC6_STATINC is now unused, so remove it too.

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

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

ok ozaki-r@

Revision 1.242 / (download) - annotate - [select for diffs], Wed Feb 14 05:24:44 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.241: +52 -24 lines
Diff to previous 1.241 (colored) to selected 1.171 (colored)

Revert my two last changes in this file. They are apparently causing
problems with racoon, I'll investigate this later.

Revision 1.241 / (download) - annotate - [select for diffs], Mon Feb 12 09:31:06 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.240: +2 -10 lines
Diff to previous 1.240 (colored) to selected 1.171 (colored)

Don't rebase the pointers. 'm' is only allowed to become NULL (which
means 'processed').

Revision 1.240 / (download) - annotate - [select for diffs], Sat Feb 10 08:17:00 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.239: +24 -44 lines
Diff to previous 1.239 (colored) to selected 1.171 (colored)

If the socket wants a ESP-over-UDP packet, and the packet is incorrect,
stop processing it instead of giving it to udp4_sendup. It just doesn't
make any sense not to drop it.

I was already telling myself this the other day when I visited this place,
but I just saw PR/36782 (11 years old) that suggests the exact same thing,
so fix it.

Now, udp4_espinudp always frees the mbuf, and is made void. The packet is
not processed any further afterwards.

Revision 1.239 / (download) - annotate - [select for diffs], Thu Feb 8 10:24:46 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.238: +20 -14 lines
Diff to previous 1.238 (colored) to selected 1.171 (colored)

More style, no functional change.

Revision 1.238 / (download) - annotate - [select for diffs], Thu Feb 8 07:11:20 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.237: +45 -51 lines
Diff to previous 1.237 (colored) to selected 1.171 (colored)

Style, and remove printfs.

Revision 1.237 / (download) - annotate - [select for diffs], Thu Feb 8 06:50:38 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.236: +13 -4 lines
Diff to previous 1.236 (colored) to selected 1.171 (colored)

Fix three pretty bad mistakes in NAT-T:

 * If we got a keepalive packet, we need to call m_freem, not m_free.
   Here the next mbufs in the chain are not freed. Seems easy to remotely
   DoS the system by sending fragmented keepalives in a loop.

 * If !ipsec_used, free the mbuf.

 * In udp_input, we need to update 'uh', because udp4_realinput may have
   modified the chain. Perhaps we also need to re-enforce alignment, so
   add an XXX.

Revision 1.233.4.1 / (download) - annotate - [select for diffs], Thu Dec 21 21:08:13 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.233: +35 -19 lines
Diff to previous 1.233 (colored) to selected 1.171 (colored)

Pull up following revision(s) (requested by ryo in ticket #445):
	distrib/sets/lists/debug/mi: revision 1.222
	distrib/sets/lists/tests/mi: revision 1.760
	share/man/man4/ip.4: revision 1.38
	sys/netinet/in.c: revision 1.207
	sys/netinet/in.h: revision 1.101
	sys/netinet/in_pcb.c: revision 1.179
	sys/netinet/in_pcb.h: revision 1.64
	sys/netinet/ip_output.c: revision 1.284, 1.286
	sys/netinet/ip_var.h: revision 1.120-1.121
	sys/netinet/raw_ip.c: revision 1.166-1.167
	sys/netinet/udp_usrreq.c: revision 1.235-1.236
	sys/netinet/udp_var.h: revision 1.42
	tests/net/net/Makefile: revision 1.21
	tests/net/net/t_pktinfo_send.c: revision 1.1-1.2
Add support IP_PKTINFO for sendmsg(2).
The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.
Reviewed by ozaki-r@ and christos@. thanks.
--
As is the case with IPV6_PKTINFO, IP_PKTINFO can be sent without EADDRINUSE
even if the UDP address:port in use is specified.

Revision 1.236 / (download) - annotate - [select for diffs], Mon Dec 11 05:47:18 2017 UTC (6 years, 3 months ago) by ryo
Branch: MAIN
Changes since 1.235: +3 -4 lines
Diff to previous 1.235 (colored) to selected 1.171 (colored)

As is the case with IPV6_PKTINFO, IP_PKTINFO can be sent without EADDRINUSE
even if the UDP address:port in use is specified.

Revision 1.187.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.187.2.2: +81 -108 lines
Diff to previous 1.187.2.2 (colored) to branchpoint 1.187 (colored) next main 1.188 (colored) to selected 1.171 (colored)

update from HEAD

Revision 1.217.4.9 / (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.217.4.8: +44 -44 lines
Diff to previous 1.217.4.8 (colored) to branchpoint 1.217 (colored) next main 1.218 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.235 / (download) - annotate - [select for diffs], Thu Aug 10 04:31:58 2017 UTC (6 years, 7 months ago) by ryo
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, nick-nhusb-base-20170825
Changes since 1.234: +36 -19 lines
Diff to previous 1.234 (colored) to selected 1.171 (colored)

Add support IP_PKTINFO for sendmsg(2).

The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.

Reviewed by ozaki-r@ and christos@. thanks.

Revision 1.234 / (download) - annotate - [select for diffs], Thu Jul 6 17:08:57 2017 UTC (6 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Changes since 1.233: +3 -11 lines
Diff to previous 1.233 (colored) to selected 1.171 (colored)

Merge the two copies SO_TIMESTAMP/SO_OTIMESTAMP processing to a single
function, and add a SOOPT_TIMESTAMP define reducing compat pollution from
5 places to 1.

Revision 1.226.2.4 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:29 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.226.2.3: +10 -19 lines
Diff to previous 1.226.2.3 (colored) to branchpoint 1.226 (colored) next main 1.227 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.229.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.229: +17 -24 lines
Diff to previous 1.229 (colored) next main 1.230 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.233 / (download) - annotate - [select for diffs], Thu Apr 20 08:46:07 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, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.232: +4 -5 lines
Diff to previous 1.232 (colored) to selected 1.171 (colored)

Remove unnecessary NULL checks for inp_socket and in6p_socket

They cannot be NULL except for programming errors.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Apr 20 08:45:09 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.231: +8 -16 lines
Diff to previous 1.231 (colored) to selected 1.171 (colored)

Simplify logic of udp4_sendup and udp6_sendup

They are always passed a socket with the same protocol faimiliy
as its own: AF_INET for udp4_sendup and AF_INET6 for udp6_sendup.

Revision 1.226.2.3 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:51 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.226.2.2: +9 -7 lines
Diff to previous 1.226.2.2 (colored) to branchpoint 1.226 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.231 / (download) - annotate - [select for diffs], Fri Mar 3 07:13:06 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Changes since 1.230: +3 -3 lines
Diff to previous 1.230 (colored) to selected 1.171 (colored)

Pass inpcb/in6pcb instead of socket to ip_output/ip6_output

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

Revision 1.217.4.8 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:59 2017 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.217.4.7: +8 -6 lines
Diff to previous 1.217.4.7 (colored) to branchpoint 1.217 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.230 / (download) - annotate - [select for diffs], Tue Jan 24 07:09:24 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.229: +8 -6 lines
Diff to previous 1.229 (colored) to selected 1.171 (colored)

Tweak softnet_lock and NET_MPSAFE

- Don't hold softnet_lock in some functions if NET_MPSAFE
- Add softnet_lock to sysctl_net_inet_icmp_redirtimeout
- Add softnet_lock to expire_upcalls of ip_mroute.c
- Restore softnet_lock for in{,6}_pcbpurgeif{,0} if NET_MPSAFE
- Mark some softnet_lock for future work

Revision 1.226.2.2 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 2 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.226.2.1: +20 -2 lines
Diff to previous 1.226.2.1 (colored) to branchpoint 1.226 (colored) to selected 1.171 (colored)

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

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

Sync with HEAD

Revision 1.229 / (download) - annotate - [select for diffs], Fri Nov 18 06:50:04 2016 UTC (7 years, 4 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.228: +7 -2 lines
Diff to previous 1.228 (colored) to selected 1.171 (colored)

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

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

Revision 1.228 / (download) - annotate - [select for diffs], Tue Nov 15 20:50:28 2016 UTC (7 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.227: +15 -2 lines
Diff to previous 1.227 (colored) to selected 1.171 (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.226.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:21 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.226: +2 -6 lines
Diff to previous 1.226 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.227 / (download) - annotate - [select for diffs], Wed Oct 19 01:13:01 2016 UTC (7 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104
Changes since 1.226: +2 -6 lines
Diff to previous 1.226 (colored) to selected 1.171 (colored)

Remove unnecessary #ifdef IPSEC

The entire function is already in #ifdef IPSEC.

No functional change.

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

Sync with HEAD

Revision 1.226 / (download) - annotate - [select for diffs], Fri Jun 10 13:31:44 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.225: +5 -5 lines
Diff to previous 1.225 (colored) to selected 1.171 (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.217.4.5 / (download) - annotate - [select for diffs], Sun May 29 08:44:38 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.217.4.4: +2 -3 lines
Diff to previous 1.217.4.4 (colored) to branchpoint 1.217 (colored) to selected 1.171 (colored)

Sync with HEAD

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

Sweep unnecessary route.h inclusions

Revision 1.217.4.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:33 2016 UTC (8 years ago) by skrll
Branch: nick-nhusb
Changes since 1.217.4.3: +5 -14 lines
Diff to previous 1.217.4.3 (colored) to branchpoint 1.217 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.224 / (download) - annotate - [select for diffs], Mon Feb 15 14:59:03 2016 UTC (8 years, 1 month ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.223: +4 -8 lines
Diff to previous 1.223 (colored) to selected 1.171 (colored)

Reduce code duplication.

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

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

Revision 1.223 / (download) - annotate - [select for diffs], Wed Jan 20 22:01:18 2016 UTC (8 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.222: +3 -8 lines
Diff to previous 1.222 (colored) to selected 1.171 (colored)

Give proper prototype to udp_output.

Revision 1.217.4.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.217.4.2: +4 -2 lines
Diff to previous 1.217.4.2 (colored) to branchpoint 1.217 (colored) to selected 1.171 (colored)

Sync with HEAD

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

sprinkle _KERNEL_OPT

Revision 1.217.4.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (8 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.217.4.1: +18 -54 lines
Diff to previous 1.217.4.1 (colored) to branchpoint 1.217 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.221 / (download) - annotate - [select for diffs], Sat May 2 17:18:03 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.220: +6 -6 lines
Diff to previous 1.220 (colored) to selected 1.171 (colored)

make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

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

Revision 1.220 / (download) - annotate - [select for diffs], Sun Apr 26 21:40:49 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.219: +2 -38 lines
Diff to previous 1.219 (colored) to selected 1.171 (colored)

remove pr_generic from struct pr_usrreqs and all implementations of
pr_generic in protocols.

bump to 7.99.13

approved by rmind@

Revision 1.219 / (download) - annotate - [select for diffs], Fri Apr 24 22:32:37 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.218: +7 -7 lines
Diff to previous 1.218 (colored) to selected 1.171 (colored)

make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

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

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

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

Sync with HEAD

Revision 1.218 / (download) - annotate - [select for diffs], Fri Apr 3 20:01:07 2015 UTC (8 years, 11 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.217: +5 -4 lines
Diff to previous 1.217 (colored) to selected 1.171 (colored)

* change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

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

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

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

Revision 1.187.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:35 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.187.2.1: +378 -518 lines
Diff to previous 1.187.2.1 (colored) to branchpoint 1.187 (colored) to selected 1.171 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.194.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:25 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.194: +356 -504 lines
Diff to previous 1.194 (colored) next main 1.195 (colored) to selected 1.171 (colored)

Rebase.

Revision 1.217 / (download) - annotate - [select for diffs], Sat Aug 9 05:33:01 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Changes since 1.216: +35 -35 lines
Diff to previous 1.216 (colored) to selected 1.171 (colored)

split PRU_CONNECT2 & PRU_PURGEIF function out of pr_generic() usrreq
switches and put into separate functions

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

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

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

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

patch only briefly reviewed by rmind@

Revision 1.216 / (download) - annotate - [select for diffs], Fri Aug 8 03:05:45 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.215: +13 -6 lines
Diff to previous 1.215 (colored) to selected 1.171 (colored)

split PRU_RCVD function out of pr_generic() usrreq switches and put into
separate functions

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

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

Revision 1.215 / (download) - annotate - [select for diffs], Tue Aug 5 07:55:32 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.214: +58 -42 lines
Diff to previous 1.214 (colored) to selected 1.171 (colored)

split PRU_SEND function out of pr_generic() usrreq switches and put into
separate functions

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

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

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

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

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

patch reviewed by rmind

Revision 1.214 / (download) - annotate - [select for diffs], Tue Aug 5 05:24:26 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.213: +7 -7 lines
Diff to previous 1.213 (colored) to selected 1.171 (colored)

revert the removal of struct lwp * parameter from bind, listen and connect
user requests.

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

Revision 1.213 / (download) - annotate - [select for diffs], Sat Aug 2 03:55:26 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.212: +12 -2 lines
Diff to previous 1.212 (colored) to selected 1.171 (colored)

restore splsoftnet() in various usrreqs that were removed during the PRU
splits.  we will properly review removal after the PRU split work is
complete.

Revision 1.212 / (download) - annotate - [select for diffs], Thu Jul 31 03:39:35 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.211: +55 -14 lines
Diff to previous 1.211 (colored) to selected 1.171 (colored)

split PRU_DISCONNECT, PRU_SHUTDOWN and PRU_ABORT function out of
pr_generic() usrreq switches and put into separate functions

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

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

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

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

patch reviewed by rmind

Revision 1.211 / (download) - annotate - [select for diffs], Wed Jul 30 10:04:26 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.210: +23 -9 lines
Diff to previous 1.210 (colored) to selected 1.171 (colored)

split PRU_CONNECT function out of pr_generic() usrreq switches and put
into seaparate functions

  xxx_listen(struct socket *, struct mbuf *)

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

patch reviewed by rmind

Revision 1.210 / (download) - annotate - [select for diffs], Thu Jul 24 15:12:03 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.209: +36 -11 lines
Diff to previous 1.209 (colored) to selected 1.171 (colored)

split PRU_BIND and PRU_LISTEN function out of pr_generic() usrreq
switches and put into separate functions
  xxx_bind(struct socket *, struct mbuf *)
  xxx_listen(struct socket *)

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

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

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

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

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

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

patch reviewed by rmind

welcome to netbsd 6.99.48

Revision 1.209 / (download) - annotate - [select for diffs], Wed Jul 23 13:17:18 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.208: +28 -13 lines
Diff to previous 1.208 (colored) to selected 1.171 (colored)

split PRU_SENDOOB and PRU_RCVOOB function out of pr_generic() usrreq
switches and put into separate functions
  xxx_sendoob(struct socket *, struct mbuf *, struct mbuf *)
  xxx_recvoob(struct socket *, struct mbuf *, int)

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

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

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

reviewed by rmind

Revision 1.208 / (download) - annotate - [select for diffs], Wed Jul 9 14:41:42 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.207: +15 -2 lines
Diff to previous 1.207 (colored) to selected 1.171 (colored)

* split PRU_ACCEPT function out of pr_generic() usrreq switches and put
  into a separate function xxx_accept(struct socket *, struct mbuf *)

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

patch reviewed by rmind

Revision 1.207 / (download) - annotate - [select for diffs], Wed Jul 9 04:54:04 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.206: +30 -10 lines
Diff to previous 1.206 (colored) to selected 1.171 (colored)

* split PRU_PEERADDR and PRU_SOCKADDR function out of pr_generic()
  usrreq switches and put into separate functions
  xxx_{peer,sock}addr(struct socket *, struct mbuf *).

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

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

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

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

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

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

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

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

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

patch reviewed by rmind

welcome to 6.99.47

Revision 1.206 / (download) - annotate - [select for diffs], Mon Jul 7 17:13:56 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.205: +4 -2 lines
Diff to previous 1.205 (colored) to selected 1.171 (colored)

* sprinkle KASSERT(solocked(so)); in all pr_stat() functions.
* fix remaining inconsistent struct socket parameter names.

Revision 1.205 / (download) - annotate - [select for diffs], Mon Jul 7 15:13:21 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.204: +4 -3 lines
Diff to previous 1.204 (colored) to selected 1.171 (colored)

backout change that made pr_stat return EOPNOTSUPP for protocols that
were not filling in struct stat.

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

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

Revision 1.204 / (download) - annotate - [select for diffs], Mon Jul 7 07:09:58 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.203: +3 -10 lines
Diff to previous 1.203 (colored) to selected 1.171 (colored)

* have pr_stat return EOPNOTSUPP consistently for all protocols that do
  not fill in struct stat instead of returning success.

* in pr_stat remove all checks for non-NULL so->so_pcb except where the
  pcb is actually used (i.e. cases where we don't return EOPNOTSUPP).

proposed on tech-net@

Revision 1.203 / (download) - annotate - [select for diffs], Sun Jul 6 03:33:33 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.202: +18 -9 lines
Diff to previous 1.202 (colored) to selected 1.171 (colored)

* split PRU_SENSE functionality out of xxx_usrreq() switches and place into
  separate xxx_stat(struct socket *, struct stat *) functions.
* replace calls using pr_generic with req == PRU_SENSE with pr_stat().

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

reviewed by rmind

Revision 1.202 / (download) - annotate - [select for diffs], Tue Jul 1 05:49:18 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.201: +4 -6 lines
Diff to previous 1.201 (colored) to selected 1.171 (colored)

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

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

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

reviewed by rmind@

Revision 1.201 / (download) - annotate - [select for diffs], Mon Jun 23 17:18:45 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.200: +4 -4 lines
Diff to previous 1.200 (colored) to selected 1.171 (colored)

where appropriate rename xxx_ioctl() struct mbuf * parameters from
`control' to `ifp' after split from xxx_usrreq().

sys_socket.c
    fix wrapping of arguments to be consistent with other function calls
    in the file after replacing pr_usrreq() call with pr_ioctl() which
    required one less argument.

link_proto.c
    fix indentation of parameters in link_ioctl() prototype to be
    consistent with the rest of the file.

discussed with rmind@

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jun 22 08:10:18 2014 UTC (9 years, 8 months ago) by rtr
Branch: MAIN
Changes since 1.199: +13 -6 lines
Diff to previous 1.199 (colored) to selected 1.171 (colored)

* split PRU_CONTROL functionality out of xxx_userreq() switches and place
  into separate xxx_ioctl() functions.
* place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now
  inappropriate for req = PRU_CONTROL in xxx_userreq().
* replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl().
* remove & fixup references to PRU_CONTROL xxx_userreq() function comments.
* fix various comments references for xxx_userreq() that mentioned
  PRU_CONTROL as xxx_userreq() no longer handles the request.

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

Reviewed by rmind@

Revision 1.199 / (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.198: +6 -4 lines
Diff to previous 1.198 (colored) to selected 1.171 (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.198 / (download) - annotate - [select for diffs], Thu May 22 22:56:53 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.197: +7 -355 lines
Diff to previous 1.197 (colored) to selected 1.171 (colored)

Move udp6_input(), udp6_sendup(), udp6_realinput() and udp6_input_checksum()
from udp_usrreq.c to udp6_usrreq.c where they belong.  No functional change.

Revision 1.183.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.183.2.2: +54 -45 lines
Diff to previous 1.183.2.2 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored) to selected 1.171 (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.197 / (download) - annotate - [select for diffs], Tue May 20 19:04:00 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.196: +5 -4 lines
Diff to previous 1.196 (colored) to selected 1.171 (colored)

Adjust PR_WRAP_USRREQS() to include the attach/detach functions.
We still need the kernel-lock for some corner cases.

Revision 1.196 / (download) - annotate - [select for diffs], Mon May 19 02:51:25 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
Changes since 1.195: +70 -51 lines
Diff to previous 1.195 (colored) to selected 1.171 (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.190.2.5 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 10 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.190.2.4: +23 -11 lines
Diff to previous 1.190.2.4 (colored) to branchpoint 1.190 (colored) next main 1.191 (colored) to selected 1.171 (colored)

sync with head

Revision 1.195 / (download) - annotate - [select for diffs], Sun May 18 14:46:16 2014 UTC (9 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-smpnet-nbase, rmind-smpnet-base
Changes since 1.194: +12 -5 lines
Diff to previous 1.194 (colored) to selected 1.171 (colored)

Add struct pr_usrreqs with a pr_generic function and prepare for the
dismantling of pr_usrreq in the protocols; no functional change intended.
PRU_ATTACH/PRU_DETACH changes will follow soon.

Bump for struct protosw.  Welcome to 6.99.62!

Revision 1.194 / (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.193: +3 -7 lines
Diff to previous 1.193 (colored) to selected 1.171 (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.193 / (download) - annotate - [select for diffs], Sat Jan 4 14:18:12 2014 UTC (10 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored) to selected 1.171 (colored)

IPv6 UDP uses the IPv4 pcb tables, and therefore the stats, so need
to create the percpu UDPv4 counters even in a v6-only system.

Revision 1.192 / (download) - annotate - [select for diffs], Thu Jan 2 18:29:01 2014 UTC (10 years, 2 months ago) by pooka
Branch: MAIN
Changes since 1.191: +23 -11 lines
Diff to previous 1.191 (colored) to selected 1.171 (colored)

Allow kernels compiled with INET+INET6 to be booted as IPv4-only or IPv6-only.

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

convert from CIRCLEQ to TAILQ.

Revision 1.190.2.4 / (download) - annotate - [select for diffs], Thu Oct 17 23:52:18 2013 UTC (10 years, 5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.190.2.3: +31 -52 lines
Diff to previous 1.190.2.3 (colored) to branchpoint 1.190 (colored) to selected 1.171 (colored)

Eliminate some of the splsoftnet() calls, misc clean up.

Revision 1.190.2.3 / (download) - annotate - [select for diffs], Mon Sep 23 00:57:53 2013 UTC (10 years, 5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.190.2.2: +58 -71 lines
Diff to previous 1.190.2.2 (colored) to branchpoint 1.190 (colored) to selected 1.171 (colored)

- Add some initial locking to the IPv4 PCB.
- Rename inpcb_lookup_*() routines to be more accurate and add comments.
- Add some comments about connection life-cycle WRT socket layer.

Revision 1.190.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.190.2.1: +69 -34 lines
Diff to previous 1.190.2.1 (colored) to branchpoint 1.190 (colored) to selected 1.171 (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.190.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 8 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.190: +185 -529 lines
Diff to previous 1.190 (colored) to selected 1.171 (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.187.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.187: +29 -28 lines
Diff to previous 1.187 (colored) to selected 1.171 (colored)

resync from head

Revision 1.190 / (download) - annotate - [select for diffs], Wed Jun 5 19:01:26 2013 UTC (10 years, 9 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.189: +10 -10 lines
Diff to previous 1.189 (colored) to selected 1.171 (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.189 / (download) - annotate - [select for diffs], Wed Jun 5 00:48:32 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.188: +7 -3 lines
Diff to previous 1.188 (colored) to selected 1.171 (colored)

conditionalize the net traversal code on FAST_IPSEC to make rump build.

Revision 1.188 / (download) - annotate - [select for diffs], Tue Jun 4 22:47:37 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.187: +22 -25 lines
Diff to previous 1.187 (colored) to selected 1.171 (colored)

PR/47886: Dr. Wolfgang Stukenbrock: IPSEC_NAT_T enabled kernels may access
outdated pointers and pass ESP data to UPD-sockets.
While here, simplify the code and remove the IPSEC_NAT_T option; always
compile nat-traversal in so that it does not bitrot.

Revision 1.183.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.183.2.1: +2 -33 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored) to selected 1.171 (colored)

sync with head

Revision 1.187 / (download) - annotate - [select for diffs], Fri Jun 22 14:54:35 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.186: +2 -33 lines
Diff to previous 1.186 (colored) to selected 1.171 (colored)

PR/46602: Move the rfc6056 port randomization to the IP layer.

Revision 1.183.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:41 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.183: +5 -12 lines
Diff to previous 1.183 (colored) to selected 1.171 (colored)

sync with head

Revision 1.183.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:44 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.183.6.1: +4 -11 lines
Diff to previous 1.183.6.1 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored) to selected 1.171 (colored)

sync to latest -current.

Revision 1.186 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:39 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.185: +4 -11 lines
Diff to previous 1.185 (colored) to selected 1.171 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.183.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:41 2012 UTC (12 years, 1 month ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.183: +7 -7 lines
Diff to previous 1.183 (colored) to selected 1.171 (colored)

merge to -current.

Revision 1.185 / (download) - annotate - [select for diffs], Mon Jan 9 22:26:44 2012 UTC (12 years, 2 months ago) by liamjfoy
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-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.171 (colored)

minor typo fix

Revision 1.184 / (download) - annotate - [select for diffs], Mon Dec 19 11:59:57 2011 UTC (12 years, 3 months ago) by drochner
Branch: MAIN
Changes since 1.183: +6 -6 lines
Diff to previous 1.183 (colored) to selected 1.171 (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.183 / (download) - annotate - [select for diffs], Sat Sep 24 17:18:17 2011 UTC (12 years, 5 months ago) by christos
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.182: +33 -3 lines
Diff to previous 1.182 (colored) to selected 1.171 (colored)

Add inet4 part of the rfc6056 code contributed by Vlad Balan as part of
Google SoC-2011

Revision 1.182 / (download) - annotate - [select for diffs], Sun Jul 17 20:54:53 2011 UTC (12 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.181: +2 -4 lines
Diff to previous 1.181 (colored) to selected 1.171 (colored)

Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Jul 3 09:03:32 2011 UTC (12 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.180: +3 -2 lines
Diff to previous 1.180 (colored) to selected 1.171 (colored)

avoid an uninitialised variable warning.  this one seems a false
positive, but since it's for some hacky workaround code anyway...

Revision 1.179.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:57 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.179: +5 -4 lines
Diff to previous 1.179 (colored) next main 1.180 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.179.4.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:08 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.179: +5 -4 lines
Diff to previous 1.179 (colored) next main 1.180 (colored) to selected 1.171 (colored)

sync with head

Revision 1.180 / (download) - annotate - [select for diffs], Tue May 3 18:28:45 2011 UTC (12 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.179: +5 -4 lines
Diff to previous 1.179 (colored) to selected 1.171 (colored)

Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.

Revision 1.171.2.4 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:29 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.171.2.3: +8 -3 lines
Diff to previous 1.171.2.3 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored) to selected 1.171 (colored)

sync with head

Revision 1.179 / (download) - annotate - [select for diffs], Wed Sep 16 15:23:05 2009 UTC (14 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.178: +8 -3 lines
Diff to previous 1.178 (colored) to selected 1.171 (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.171.2.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:25 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.171.2.2: +8 -2 lines
Diff to previous 1.171.2.2 (colored) to branchpoint 1.171 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.174.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:48 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.174.2.1: +8 -2 lines
Diff to previous 1.174.2.1 (colored) to branchpoint 1.174 (colored) next main 1.175 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.178 / (download) - annotate - [select for diffs], Sun Jul 19 23:17:33 2009 UTC (14 years, 8 months ago) by minskim
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, jymxensuspend-base
Changes since 1.177: +8 -2 lines
Diff to previous 1.177 (colored) to selected 1.171 (colored)

Enable IP_MINTTL option for SOCK_DGRAM sockets.

Revision 1.174.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:28 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.174: +8 -8 lines
Diff to previous 1.174 (colored) to selected 1.171 (colored)

Sync with HEAD.

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

Revision 1.171.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:18 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.171.2.1: +30 -25 lines
Diff to previous 1.171.2.1 (colored) to branchpoint 1.171 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.173.2.2 / (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.173.2.1: +8 -8 lines
Diff to previous 1.173.2.1 (colored) to branchpoint 1.173 (colored) next main 1.174 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.177 / (download) - annotate - [select for diffs], Sat Apr 18 14:58:05 2009 UTC (14 years, 11 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.176: +4 -4 lines
Diff to previous 1.176 (colored) to selected 1.171 (colored)

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

Revision 1.176 / (download) - annotate - [select for diffs], Wed Mar 18 17:06:52 2009 UTC (15 years ago) by cegger
Branch: MAIN
Changes since 1.175: +4 -4 lines
Diff to previous 1.175 (colored) to selected 1.171 (colored)

bcopy -> memcpy

Revision 1.175 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (15 years ago) by cegger
Branch: MAIN
Changes since 1.174: +6 -6 lines
Diff to previous 1.174 (colored) to selected 1.171 (colored)

bzero -> memset

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

Sync with HEAD.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Jan 19 02:27:57 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.173: +14 -3 lines
Diff to previous 1.173 (colored) to selected 1.171 (colored)

Provide compatibility to the old timeval SCM_TIMESTAMP messages.

Revision 1.172.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:46 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.172: +12 -18 lines
Diff to previous 1.172 (colored) next main 1.173 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.163.14.2 / (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.163.14.1: +10 -16 lines
Diff to previous 1.163.14.1 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored) to selected 1.171 (colored)

Sync with HEAD.

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

Sync with wrstuden-revivesa-base-2.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Aug 6 15:01:23 2008 UTC (15 years, 7 months ago) by plunky
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, 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
Changes since 1.172: +12 -18 lines
Diff to previous 1.172 (colored) to selected 1.171 (colored)

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

approved by core

Revision 1.163.14.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:25 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.163: +62 -30 lines
Diff to previous 1.163 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:30 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.168: +20 -34 lines
Diff to previous 1.168 (colored) next main 1.169 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:42 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.171: +3 -8 lines
Diff to previous 1.171 (colored)

sync with head.

Revision 1.172 / (download) - annotate - [select for diffs], Sun May 4 07:22:14 2008 UTC (15 years, 10 months ago) by thorpej
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.171: +3 -8 lines
Diff to previous 1.171 (colored)

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

PR kern/38577

Revision 1.171 / (download) - annotate - [selected], Sat Apr 26 08:13:59 2008 UTC (15 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.170: +7 -2 lines
Diff to previous 1.170 (colored)

udp_init: don't forget to allocate udp6stat_percpu.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:38 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.169: +7 -3 lines
Diff to previous 1.169 (colored) to selected 1.171 (colored)

Merge the socket locking patch:

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

With much feedback from matt@ and plunky@.

Revision 1.169 / (download) - annotate - [select for diffs], Wed Apr 23 06:09:05 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.168: +14 -32 lines
Diff to previous 1.168 (colored) to selected 1.171 (colored)

Make IPSEC and FAST_IPSEC stats per-cpu.  Use <net/net_stats.h> and
netstat_sysctl().

Revision 1.168 / (download) - annotate - [select for diffs], Tue Apr 15 04:43:25 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.167: +11 -10 lines
Diff to previous 1.167 (colored) to selected 1.171 (colored)

Make udp6 stats per-cpu.

Revision 1.167 / (download) - annotate - [select for diffs], Tue Apr 15 03:57:04 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.166: +4 -3 lines
Diff to previous 1.166 (colored) to selected 1.171 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.166 / (download) - annotate - [select for diffs], Sat Apr 12 05:58:22 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.165: +58 -15 lines
Diff to previous 1.165 (colored) to selected 1.171 (colored)

Make IP, TCP, UDP, and ICMP statistics per-CPU.  The stats are collated
when the user requests them via sysctl.

Revision 1.165 / (download) - annotate - [select for diffs], Tue Apr 8 23:37:43 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored) to selected 1.171 (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.164 / (download) - annotate - [select for diffs], Sun Apr 6 20:17:27 2008 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.163: +16 -15 lines
Diff to previous 1.163 (colored) to selected 1.171 (colored)

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

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

Revision 1.160.8.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:31 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.160.8.1: +3 -3 lines
Diff to previous 1.160.8.1 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored) to selected 1.171 (colored)

sync with HEAD

Revision 1.162.6.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:14 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored) next main 1.163 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.138.2.5 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:33 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.138.2.4: +3 -3 lines
Diff to previous 1.138.2.4 (colored) next main 1.139 (colored) to selected 1.171 (colored)

sync with head

Revision 1.160.6.2 / (download) - annotate - [select for diffs], Mon Dec 3 16:15:11 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.160.6.1: +3 -3 lines
Diff to previous 1.160.6.1 (colored) to branchpoint 1.160 (colored) next main 1.161 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.163 / (download) - annotate - [select for diffs], Tue Nov 27 22:45:30 2007 UTC (16 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jmcneill-pm-base, hpcarm-cleanup-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored) to selected 1.171 (colored)

require that the options argument is the right size, not that it is greater
or equal to the requested size. Suggested by Matt Thomas.

Revision 1.160.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:33:54 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.160: +6 -6 lines
Diff to previous 1.160 (colored) to selected 1.171 (colored)

sync with HEAD

Revision 1.158.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:52 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.158.2.2: +6 -6 lines
Diff to previous 1.158.2.2 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.160.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:07 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.160: +6 -6 lines
Diff to previous 1.160 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.138.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:43:13 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.138.2.3: +16 -24 lines
Diff to previous 1.138.2.3 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:47 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.160: +6 -6 lines
Diff to previous 1.160 (colored) next main 1.161 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Sep 2 07:18:55 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.161: +6 -6 lines
Diff to previous 1.161 (colored) to selected 1.171 (colored)

m_copym(..., 0, M_COPYALL, ...) -> m_copypacket(..., ...).

Revision 1.161 / (download) - annotate - [select for diffs], Sun Sep 2 03:12:23 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
Changes since 1.160: +6 -6 lines
Diff to previous 1.160 (colored) to selected 1.171 (colored)

m_copy() was deprecated, apparently, long ago.  m_copy(...) ->
m_copym(..., M_DONTWAIT).

Revision 1.158.2.2 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:59 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.158.2.1: +3 -3 lines
Diff to previous 1.158.2.1 (colored) to branchpoint 1.158 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.158.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:30 2007 UTC (16 years, 8 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.158: +5 -13 lines
Diff to previous 1.158 (colored) next main 1.159 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.160 / (download) - annotate - [select for diffs], Wed Jun 27 20:38:32 2007 UTC (16 years, 8 months ago) by degroote
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, matt-armv6, jmcneill-pm
Changes since 1.159: +3 -3 lines
Diff to previous 1.159 (colored) to selected 1.171 (colored)

Add support for options IPSEC_NAT_T (RFC 3947 and 3948) for fast_ipsec(4).

No objection on tech-net@

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:48 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.158: +4 -12 lines
Diff to previous 1.158 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.156.4.3 / (download) - annotate - [select for diffs], Thu May 17 13:41:51 2007 UTC (16 years, 10 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.156.4.2: +4 -12 lines
Diff to previous 1.156.4.2 (colored) to branchpoint 1.156 (colored) next main 1.157 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.159 / (download) - annotate - [select for diffs], Sat May 12 02:03:15 2007 UTC (16 years, 10 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8
Changes since 1.158: +4 -12 lines
Diff to previous 1.158 (colored) to selected 1.171 (colored)

Use sockaddr_in_init().

Revision 1.156.4.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:40 2007 UTC (17 years ago) by rmind
Branch: yamt-idlelwp
Changes since 1.156.4.1: +9 -9 lines
Diff to previous 1.156.4.1 (colored) to branchpoint 1.156 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.158 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:22 2007 UTC (17 years ago) by christos
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.157: +9 -9 lines
Diff to previous 1.157 (colored) to selected 1.171 (colored)

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

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

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

Revision 1.138.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:46 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.138.2.2: +5 -5 lines
Diff to previous 1.138.2.2 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.157 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:12 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.156: +5 -5 lines
Diff to previous 1.156 (colored) to selected 1.171 (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.138.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:34 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.138.2.1: +20 -31 lines
Diff to previous 1.138.2.1 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.148.6.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:11 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.148.6.1: +10 -18 lines
Diff to previous 1.148.6.1 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.148.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:37 2006 UTC (17 years, 4 months ago) by ad
Branch: newlock2
Changes since 1.148: +16 -25 lines
Diff to previous 1.148 (colored) next main 1.149 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Nov 14 12:05:55 2006 UTC (17 years, 4 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Changes since 1.155: +2 -6 lines
Diff to previous 1.155 (colored) to selected 1.171 (colored)

Remove ifndef COMPAT_42. No objections in tech-net.

Revision 1.155 / (download) - annotate - [select for diffs], Fri Nov 10 13:02:32 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.154: +5 -2 lines
Diff to previous 1.154 (colored) to selected 1.171 (colored)

udp_ctloutput: plug a memory leak.

Revision 1.154 / (download) - annotate - [select for diffs], Fri Nov 10 13:01:55 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.153: +4 -4 lines
Diff to previous 1.153 (colored) to selected 1.171 (colored)

remove some __unused in function parameters.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Nov 10 13:00:23 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.152: +3 -7 lines
Diff to previous 1.152 (colored) to selected 1.171 (colored)

udp_ctloutput: remove unnecessary goto and break.

Revision 1.152 / (download) - annotate - [select for diffs], Fri Nov 10 12:59:59 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.151: +4 -7 lines
Diff to previous 1.151 (colored) to selected 1.171 (colored)

udp_ctloutput: ansify.

Revision 1.148.6.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:29 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.148: +11 -12 lines
Diff to previous 1.148 (colored) to selected 1.171 (colored)

sync with head

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

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

Revision 1.150 / (download) - annotate - [select for diffs], Tue Oct 10 21:49:15 2006 UTC (17 years, 5 months ago) by dogcow
Branch: MAIN
Changes since 1.149: +5 -5 lines
Diff to previous 1.149 (colored) to selected 1.171 (colored)

change the MOWNER_INIT define to take two args; fix extant struct mowner
decls to use it. Makes options MBUFTRACE compile again and not whinge about
missing structure declarations. (Also makes initialization consistent.)

Revision 1.149 / (download) - annotate - [select for diffs], Thu Oct 5 17:35:19 2006 UTC (17 years, 5 months ago) by tls
Branch: MAIN
Changes since 1.148: +5 -3 lines
Diff to previous 1.148 (colored) to selected 1.171 (colored)

Protect calls to pool_put/pool_get that may occur in interrupt context
with spl used to protect other allocations and frees, or datastructure
element insertion and removal, in adjacent code.

It is almost unquestionably the case that some of the spl()/splx() calls
added here are superfluous, but it really seems wrong to see:

	s=splfoo();
	/* frob data structure */
	splx(s);
	pool_put(x);

and if we think we need to protect the first operation, then it is hard
to see why we should not think we need to protect the next.  "Better
safe than sorry".

It is also almost unquestionably the case that I missed some pool
gets/puts from interrupt context with my strategy for finding these
calls; use of PR_NOWAIT is a strong hint that a pool may be used from
interrupt context but many callers in the kernel pass a "can wait/can't
wait" flag down such that my searches might not have found them.  One
notable area that needs to be looked at is pf.

See also:

http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html
http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html

Revision 1.146.2.3 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:47 2006 UTC (17 years, 6 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.146.2.2: +12 -13 lines
Diff to previous 1.146.2.2 (colored) next main 1.147 (colored) to selected 1.171 (colored)

sync with head

Revision 1.147.2.1 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:33 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.147: +6 -8 lines
Diff to previous 1.147 (colored) next main 1.148 (colored) to selected 1.171 (colored)

sync with head

Revision 1.148 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:13 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.147: +6 -8 lines
Diff to previous 1.147 (colored) to selected 1.171 (colored)

Use the LWP cached credentials where sane.

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:02 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.138: +124 -40 lines
Diff to previous 1.138 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.146.4.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:11 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.146: +8 -7 lines
Diff to previous 1.146 (colored) next main 1.147 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.145.2.2 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:47 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.145.2.1: +8 -7 lines
Diff to previous 1.145.2.1 (colored) next main 1.146 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.147 / (download) - annotate - [select for diffs], Thu Feb 23 01:35:19 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, simonb-timecounters-base, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: yamt-pdpolicy
Changes since 1.146: +8 -7 lines
Diff to previous 1.146 (colored) to selected 1.171 (colored)

Handle IPSEC_NAT_T in the FAST_IPSEC case.
XXX: need to fix the FAST_IPSEC code now.

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

in6pcb -> inpcb.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Sun Feb 5 03:09:11 2006 UTC (18 years, 1 month ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.146: +2 -3 lines
Diff to previous 1.146 (colored) to selected 1.171 (colored)

<netinet6/in6_pcb.h> went away. Bye!

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:41 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.145: +20 -16 lines
Diff to previous 1.145 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Jan 21 00:15:36 2006 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.145: +20 -16 lines
Diff to previous 1.145 (colored) to selected 1.171 (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.134.2.6 / (download) - annotate - [select for diffs], Thu Dec 29 16:10:18 2005 UTC (18 years, 2 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.134.2.5: +34 -13 lines
Diff to previous 1.134.2.5 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored) to selected 1.171 (colored)

Pull up following revision(s) (requested by manu in ticket #1052):
	sys/netinet/udp_usrreq.c: revision 1.144
Fix a bug in ESP over UDP: because udp4_espinudp() called m_pullup, it
could modify the struct mbuf and calling functions (udp_input() and
udp4_realinput()) would have used a garbled local copy of the pointer.
The fix is not perfect. udp4_espinudp() should use m_pulldown()...

Revision 1.145 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:58 2005 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.144: +5 -3 lines
Diff to previous 1.144 (colored) to selected 1.171 (colored)

merge ktrace-lwp.

Revision 1.103.2.11 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:25 2005 UTC (18 years, 3 months ago) by christos
Branch: ktrace-lwp
Changes since 1.103.2.10: +36 -15 lines
Diff to previous 1.103.2.10 (colored) next main 1.104 (colored) to selected 1.171 (colored)

Sync with head.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Dec 9 15:36:34 2005 UTC (18 years, 3 months ago) by manu
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.143: +34 -13 lines
Diff to previous 1.143 (colored) to selected 1.171 (colored)

Fix a bug in ESP over UDP: because udp4_espinudp() called m_pullup, it
could modify the struct mbuf and calling functions (udp_input() and
udp4_realinput()) would have used a garbled local copy of the pointer.

The fix is not perfect. udp4_espinudp() should use m_pulldown()...

Revision 1.142.6.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:21 2005 UTC (18 years, 3 months ago) by yamt
Branch: yamt-readahead
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored) next main 1.143 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.143 / (download) - annotate - [select for diffs], Tue Nov 15 18:39:46 2005 UTC (18 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-readahead-base3, yamt-readahead-base2
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored) to selected 1.171 (colored)

Pass the current process structure to in_pcbconnect() so that it can
pass it to in_pcbbind() so that can allocate a low numbered port
if setsockopt() has been used to set IP_PORTRANGE to IP_PORTRANGE_LOW.
While there, fail in_pcbconnect() if the in_pcbbind() fails - rather
than sending the request out from a port of zero.
This has been largely broken since the socket option was added in 1998.

Revision 1.103.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:11:08 2005 UTC (18 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.9: +90 -15 lines
Diff to previous 1.103.2.9 (colored) to selected 1.171 (colored)

Sync with HEAD. Here we go again...

Revision 1.134.2.5 / (download) - annotate - [select for diffs], Thu Sep 8 21:10:24 2005 UTC (18 years, 6 months ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.134.2.4: +2 -2 lines
Diff to previous 1.134.2.4 (colored) to branchpoint 1.134 (colored) to selected 1.171 (colored)

Pull up following revision(s) (requested by kleink in ticket #744):
	sys/netinet/udp_usrreq.c: revision 1.142
udp4_espinudp(): don't assume that the Non-ESP marker (or UDP payload)
is aligned on a 64-bit boundary.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Sep 3 18:01:07 2005 UTC (18 years, 6 months ago) by kleink
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.141: +4 -4 lines
Diff to previous 1.141 (colored) to selected 1.171 (colored)

udp4_espinudp(): don't assume that the Non-ESP marker (or UDP payload)
is aligned on a 64-bit boundary.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Aug 10 13:06:49 2005 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.140: +3 -2 lines
Diff to previous 1.140 (colored) to selected 1.171 (colored)

move {tcp,udp}_do_loopback_cksum back to tcp/udp
so that they can be referenced by ipv6.

Revision 1.140 / (download) - annotate - [select for diffs], Wed Aug 10 13:05:17 2005 UTC (18 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.139: +53 -5 lines
Diff to previous 1.139 (colored) to selected 1.171 (colored)

device independent part of ipv6 rx checksum offloading.

Revision 1.139 / (download) - annotate - [select for diffs], Fri Aug 5 09:21:26 2005 UTC (18 years, 7 months ago) by elad
Branch: MAIN
Changes since 1.138: +9 -2 lines
Diff to previous 1.138 (colored) to selected 1.171 (colored)

Add sysctls for IP, ICMP, TCP, and UDP statistics.

Revision 1.134.2.4 / (download) - annotate - [select for diffs], Fri May 6 08:40:21 2005 UTC (18 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.134.2.3: +1 -9 lines
Diff to previous 1.134.2.3 (colored) to branchpoint 1.134 (colored) to selected 1.171 (colored)

Pull up revision 1.135 (requested by yamt in ticket #251):
fix problems related to loopback interface checksum omission.  PR/29971.
- for ipv4, defer decision to ip layer as h/w checksum offloading does
  so that it can check the actual interface the packet is going to.
- for ipv6, disable it.
  (maybe will be revisited when it implements h/w checksum offloading.)
ok'ed by Jason Thorpe.

Revision 1.134.2.3 / (download) - annotate - [select for diffs], Sun May 1 11:03:37 2005 UTC (18 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.134.2.2: +3 -2 lines
Diff to previous 1.134.2.2 (colored) to branchpoint 1.134 (colored) to selected 1.171 (colored)

Pull up revision 1.138 (requested by manu in ticket #216):
Fix memory leak

Revision 1.138 / (download) - annotate - [select for diffs], Fri Apr 29 13:06:23 2005 UTC (18 years, 10 months ago) by manu
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.137: +3 -2 lines
Diff to previous 1.137 (colored) to selected 1.171 (colored)

Fix memory leak

Revision 1.129.2.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.129: +263 -11 lines
Diff to previous 1.129 (colored) next main 1.130 (colored) to selected 1.171 (colored)

sync with -current

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Thu Apr 28 10:53:40 2005 UTC (18 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.134.2.1: +7 -4 lines
Diff to previous 1.134.2.1 (colored) to branchpoint 1.134 (colored) to selected 1.171 (colored)

Pull up revision 1.137 (requested by manu in ticket #203):
Don't sleep when handling ESP over UDP packets.

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Thu Apr 28 10:49:13 2005 UTC (18 years, 10 months ago) by tron
Branch: netbsd-3
Changes since 1.134: +25 -2 lines
Diff to previous 1.134 (colored) to selected 1.171 (colored)

Pull up revision 1.136 (requested by man in ticket #201):
Enhance IPSEC_NAT_T so that it can work with multiple machines behind
the same NAT.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Apr 25 20:37:06 2005 UTC (18 years, 10 months ago) by manu
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.136: +7 -4 lines
Diff to previous 1.136 (colored) to selected 1.171 (colored)

Don't sleep when handling ESP over UDP packets.

Revision 1.136 / (download) - annotate - [select for diffs], Sat Apr 23 14:05:28 2005 UTC (18 years, 11 months ago) by manu
Branch: MAIN
Changes since 1.135: +25 -2 lines
Diff to previous 1.135 (colored) to selected 1.171 (colored)

Enhance IPSEC_NAT_T so that it can work with multiple machines behind the
same NAT.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Apr 18 21:50:25 2005 UTC (18 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.134: +3 -11 lines
Diff to previous 1.134 (colored) to selected 1.171 (colored)

fix problems related to loopback interface checksum omission.  PR/29971.

- for ipv4, defer decision to ip layer as h/w checksum offloading does
  so that it can check the actual interface the packet is going to.
- for ipv6, disable it.
  (maybe will be revisited when it implements h/w checksum offloading.)

ok'ed by Jason Thorpe.

Revision 1.103.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:31:50 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.8: +9 -2 lines
Diff to previous 1.103.2.8 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.129.4.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:38 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.129.4.1: +24 -17 lines
Diff to previous 1.129.4.1 (colored) to branchpoint 1.129 (colored) next main 1.130 (colored) to selected 1.171 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.134 / (download) - annotate - [select for diffs], Fri Mar 11 06:16:16 2005 UTC (19 years ago) by atatat
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored) to selected 1.171 (colored)

Revert the change that made kern.file2 and net.*.*.pcblist into nodes
instead of structs.  It had other deleterious side-effects that are
rather nasty.  Another solution must be found.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Mar 10 05:43:26 2005 UTC (19 years ago) by atatat
Branch: MAIN
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) to selected 1.171 (colored)

Change types of kern.file2 and net.*.*.pcblist to NODE

Revision 1.132 / (download) - annotate - [select for diffs], Wed Mar 9 05:07:19 2005 UTC (19 years ago) by atatat
Branch: MAIN
Changes since 1.131: +9 -2 lines
Diff to previous 1.131 (colored) to selected 1.171 (colored)

Add the following nodes to the sysctl tree:

	net.local.stream.pcblist
	net.local.dgram.pcblist
	net.inet.tcp.pcblist
	net.inet.udp.pcblist
	net.inet.raw.pcblist
	net.inet6.tcp6.pcblist
	net.inet6.udp6.pcblist
	net.inet6.raw6.pcblist

which allow retrieval of the pcbs in use for those protocols.  The
struct involved is 32/64 bit clean and incorporates parts of struct
inpcb, struct unpcb, a bit of struct tcpcb, and two socket addresses.

Revision 1.103.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:53:30 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.7: +17 -17 lines
Diff to previous 1.103.2.7 (colored) to selected 1.171 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.131 / (download) - annotate - [select for diffs], Sat Feb 26 22:45:12 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.130: +17 -17 lines
Diff to previous 1.130 (colored) to selected 1.171 (colored)

nuke trailing whitespace

Revision 1.103.2.7 / (download) - annotate - [select for diffs], Tue Feb 15 21:33:40 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.6: +229 -2 lines
Diff to previous 1.103.2.6 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.129.4.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:54 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.129: +229 -2 lines
Diff to previous 1.129 (colored) to selected 1.171 (colored)

sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Sat Feb 12 12:31:07 2005 UTC (19 years, 1 month ago) by manu
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.129: +229 -2 lines
Diff to previous 1.129 (colored) to selected 1.171 (colored)

Add support for IPsec Network Address Translator traversal (NAT-T), as
described by RFC 3947 and 3948.

Revision 1.103.2.6 / (download) - annotate - [select for diffs], Mon Jan 17 19:32:54 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.5: +126 -56 lines
Diff to previous 1.103.2.5 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Dec 21 05:51:32 2004 UTC (19 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.128: +125 -54 lines
Diff to previous 1.128 (colored) to selected 1.171 (colored)

factor out receive side tcp/udp checksum handling code so that they
can be used by eg. packet filters.

reviewed by Christos Zoulas on tech-net@.
(slightly tweaked since then to make tcp and udp similar.)

Revision 1.128 / (download) - annotate - [select for diffs], Sun Dec 19 06:42:24 2004 UTC (19 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.127: +3 -3 lines
Diff to previous 1.127 (colored) to selected 1.171 (colored)

yamt's changes seem to fix all the checksumming issues. Turn the loopback
checksums back off so we can make sure that everything works.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Dec 18 15:31:26 2004 UTC (19 years, 3 months ago) by yamt
Branch: MAIN
Changes since 1.126: +4 -5 lines
Diff to previous 1.126 (colored) to selected 1.171 (colored)

udp6_input: correct loopback test.

Revision 1.103.2.5 / (download) - annotate - [select for diffs], Sat Dec 18 09:33:06 2004 UTC (19 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.4: +46 -16 lines
Diff to previous 1.103.2.4 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.126 / (download) - annotate - [select for diffs], Fri Dec 17 22:54:52 2004 UTC (19 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored) to selected 1.171 (colored)

Turn checksumming on loopback back on until we fix the bugs in it.
Connect over tcp on the loopback is broken:

  4729 amq      0.000007 CALL  connect(4,0x804f2a0,0x1c)
  4729 amq      75.007420 RET   connect -1 errno 60 Connection timed out

Revision 1.125 / (download) - annotate - [select for diffs], Wed Dec 15 04:25:20 2004 UTC (19 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.124: +46 -16 lines
Diff to previous 1.124 (colored) to selected 1.171 (colored)

Don't perform checksums on loopback interfaces.  They can be reenabled with
the net.inet.*.do_loopback_cksum sysctl.

Approved by: groo

Revision 1.103.2.4 / (download) - annotate - [select for diffs], Tue Sep 21 13:37:15 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.3: +3 -1 lines
Diff to previous 1.103.2.3 (colored) to selected 1.171 (colored)

Fix the sync with head I botched.

Revision 1.103.2.3 / (download) - annotate - [select for diffs], Sat Sep 18 14:54:54 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.2: +5 -5 lines
Diff to previous 1.103.2.2 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.124 / (download) - annotate - [select for diffs], Fri Sep 3 18:14:09 2004 UTC (19 years, 6 months ago) by darrenr
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.123: +4 -2 lines
Diff to previous 1.123 (colored) to selected 1.171 (colored)

add a per-socket counter for dropped UDP packets when the internal buffers
are full.

Revision 1.103.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:46 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.103.2.1: +117 -132 lines
Diff to previous 1.103.2.1 (colored) to selected 1.171 (colored)

Sync with HEAD

Revision 1.123 / (download) - annotate - [select for diffs], Fri Jul 2 18:19:51 2004 UTC (19 years, 8 months ago) by heas
Branch: MAIN
CVS Tags: BEFORE-IPF413
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored) to selected 1.171 (colored)

Adjust description for net.inet.udp.checksum; it does not controll checking,
only computing.

Revision 1.116.2.4 / (download) - annotate - [select for diffs], Fri May 28 07:24:17 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-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.116.2.3: +8 -4 lines
Diff to previous 1.116.2.3 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.171 (colored)

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

Revision 1.122 / (download) - annotate - [select for diffs], Tue May 25 04:34:00 2004 UTC (19 years, 9 months ago) by atatat
Branch: MAIN
Changes since 1.121: +10 -6 lines
Diff to previous 1.121 (colored) to selected 1.171 (colored)

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

Revision 1.116.2.3 / (download) - annotate - [select for diffs], Mon May 10 15:00:52 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.116.2.2: +3 -2 lines
Diff to previous 1.116.2.2 (colored) to branchpoint 1.116 (colored) to selected 1.171 (colored)

Pull up revision 1.121 (requested by jonathan in ticket #280):
Redo net.inet.* sysctl subtree for fast-ipsec from scratch.
Attach FAST-IPSEC statistics with 64-bit counters to new sysctl MIB.
Rework netstat to show FAST_IPSEC statistics, via sysctl,  for
netstat -p ipsec.
New kernel files:
	sys/netipsec/Makefile		(new file; install *_var.h includes)
	sys/netipsec/ipsec_var.h	(new 64-bit mib counter struct)
Changed kernel files:
	sys/Makefile			(recurse into sys/netipsec/)
	sys/netinet/in.h		(fake IP_PROTO name for fast_ipsec
					sysctl subtree.)
	sys/netipsec/ipsec.h		(minimal userspace inclusion)
	sys/netipsec/ipsec_osdep.h	(minimal userspace inclusion)
	sys/netipsec/ipsec_netbsd.c	(redo sysctl subtree from scratch)
	sys/netipsec/key*.c		(fix broken net.key subtree)
	sys/netipsec/ah_var.h		(increase all counters to 64 bits)
	sys/netipsec/esp_var.h		(increase all counters to 64 bits)
	sys/netipsec/ipip_var.h		(increase all counters to 64 bits)
	sys/netipsec/ipcomp_var.h	(increase all counters to 64 bits)
	sys/netipsec/ipsec.c		(add #include netipsec/ipsec_var.h)
	sys/netipsec/ipsec_mbuf.c	(add #include netipsec/ipsec_var.h)
	sys/netipsec/ipsec_output.c	(add #include netipsec/ipsec_var.h)
	sys/netinet/raw_ip.c		(add #include netipsec/ipsec_var.h)
	sys/netinet/tcp_input.c		(add #include netipsec/ipsec_var.h)
	sys/netinet/udp_usrreq.c	(add #include netipsec/ipsec_var.h)
Changes to usr.bin/netstat to print the new fast-ipsec sysctl tree
for "netstat -s -p ipsec":
New file:
	usr.bin/netstat/fast_ipsec.c	(print fast-ipsec counters)
Changed files:
	usr.bin/netstat/Makefile	(add fast_ipsec.c)
	usr.bin/netstat/netstat.h	(declarations for fast_ipsec.c)
	usr.bin/netstat/main.c		(call KAME-vs-fast-ipsec dispatcher)

Revision 1.121 / (download) - annotate - [select for diffs], Fri May 7 00:55:15 2004 UTC (19 years, 10 months ago) by jonathan
Branch: MAIN
Changes since 1.120: +3 -2 lines
Diff to previous 1.120 (colored) to selected 1.171 (colored)

Redo net.inet.* sysctl subtree for fast-ipsec from scratch.
Attach FAST-IPSEC statistics with 64-bit counters to new sysctl MIB.
Rework netstat to show FAST_IPSEC statistics, via sysctl,  for
netstat -p ipsec.

New kernel files:
	sys/netipsec/Makefile		(new file; install *_var.h includes)
	sys/netipsec/ipsec_var.h	(new 64-bit mib counter struct)

Changed kernel files:
	sys/Makefile			(recurse into sys/netipsec/)
	sys/netinet/in.h		(fake IP_PROTO name for fast_ipsec
					sysctl subtree.)
	sys/netipsec/ipsec.h		(minimal userspace inclusion)
	sys/netipsec/ipsec_osdep.h	(minimal userspace inclusion)
	sys/netipsec/ipsec_netbsd.c	(redo sysctl subtree from scratch)
	sys/netipsec/key*.c		(fix broken net.key subtree)

	sys/netipsec/ah_var.h		(increase all counters to 64 bits)
	sys/netipsec/esp_var.h		(increase all counters to 64 bits)
	sys/netipsec/ipip_var.h		(increase all counters to 64 bits)
	sys/netipsec/ipcomp_var.h	(increase all counters to 64 bits)

	sys/netipsec/ipsec.c		(add #include netipsec/ipsec_var.h)
	sys/netipsec/ipsec_mbuf.c	(add #include netipsec/ipsec_var.h)
	sys/netipsec/ipsec_output.c	(add #include netipsec/ipsec_var.h)

	sys/netinet/raw_ip.c		(add #include netipsec/ipsec_var.h)
	sys/netinet/tcp_input.c		(add #include netipsec/ipsec_var.h)
	sys/netinet/udp_usrreq.c	(add #include netipsec/ipsec_var.h)

Changes to usr.bin/netstat to print the new fast-ipsec sysctl tree
for "netstat -s -p ipsec":

New file:
	usr.bin/netstat/fast_ipsec.c	(print fast-ipsec counters)

Changed files:
	usr.bin/netstat/Makefile	(add fast_ipsec.c)
	usr.bin/netstat/netstat.h	(declarations for fast_ipsec.c)
	usr.bin/netstat/main.c		(call KAME-vs-fast-ipsec dispatcher)

Revision 1.120 / (download) - annotate - [select for diffs], Sat May 1 02:20:43 2004 UTC (19 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.119: +7 -9 lines
Diff to previous 1.119 (colored) to selected 1.171 (colored)

Use EVCNT_ATTACH_STATIC{,2}

Revision 1.119 / (download) - annotate - [select for diffs], Sun Apr 18 23:35:56 2004 UTC (19 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.118: +26 -62 lines
Diff to previous 1.118 (colored) to selected 1.171 (colored)

ANSI'fy and de __P

Revision 1.66.4.6 / (download) - annotate - [select for diffs], Mon Apr 12 04:58:25 2004 UTC (19 years, 11 months ago) by jmc
Branch: netbsd-1-5
Changes since 1.66.4.5: +5 -3 lines
Diff to previous 1.66.4.5 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored) to selected 1.171 (colored)

Pullup patch (requested by itojun in ticket #134)

Drop packet if IPv6 udp packet does not have checksum.

Revision 1.93.4.2 / (download) - annotate - [select for diffs], Wed Mar 31 20:10:29 2004 UTC (19 years, 11 months ago) by tron
Branch: netbsd-1-6
Changes since 1.93.4.1: +4 -3 lines
Diff to previous 1.93.4.1 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored) to selected 1.171 (colored)

Pull up revision 1.118 (requested by itojun in ticket #1645):
clean previous commit (uh_sum != 0 check in IPv6)

Revision 1.93.4.1 / (download) - annotate - [select for diffs], Wed Mar 31 20:09:25 2004 UTC (19 years, 11 months ago) by tron
Branch: netbsd-1-6
Changes since 1.93: +5 -4 lines
Diff to previous 1.93 (colored) to selected 1.171 (colored)

Pull up revision 1.117 (requested by itojun in ticket #1645):
drop packet if IPv6 udp packet does not have checksum (checksum is mandatory
in IPv6).

Revision 1.116.2.2 / (download) - annotate - [select for diffs], Wed Mar 31 19:59:41 2004 UTC (19 years, 11 months ago) by tron
Branch: netbsd-2-0
Changes since 1.116.2.1: +4 -3 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored) to selected 1.171 (colored)

Pull up revision 1.118 (requested by itojun in ticket #28):
clean previous commit (uh_sum != 0 check in IPv6)

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Wed Mar 31 19:58:54 2004 UTC (19 years, 11 months ago) by tron
Branch: netbsd-2-0
Changes since 1.116: +5 -4 lines
Diff to previous 1.116 (colored) to selected 1.171 (colored)

Pull up revision 1.117 (requested by itojun in ticket #28):
drop packet if IPv6 udp packet does not have checksum (checksum is mandatory
in IPv6).

Revision 1.118 / (download) - annotate - [select for diffs], Wed Mar 31 07:57:06 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.117: +4 -3 lines
Diff to previous 1.117 (colored) to selected 1.171 (colored)

clean previous commit (uh_sum != 0 check in IPv6)

Revision 1.117 / (download) - annotate - [select for diffs], Wed Mar 31 07:54:00 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
Changes since 1.116: +5 -4 lines
Diff to previous 1.116 (colored) to selected 1.171 (colored)

drop packet if IPv6 udp packet does not have checksum (checksum is mandatory
in IPv6).

Revision 1.116 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:54 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base, BEFORE-IPF411
Branch point for: netbsd-2-0
Changes since 1.115: +14 -8 lines
Diff to previous 1.115 (colored) to selected 1.171 (colored)

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

Revision 1.115 / (download) - annotate - [select for diffs], Wed Mar 10 18:50:45 2004 UTC (20 years ago) by drochner
Branch: MAIN
Changes since 1.114: +3 -4 lines
Diff to previous 1.114 (colored) to selected 1.171 (colored)

fix tcp/udp checksum test in the M_CSUM_NO_PSEUDOHDR case
(this can never have worked)
now I can use a "bge" gigabit interface with hw checksumming
ttcp-t: 2147483648 bytes in 18.31 real seconds = 114527.11 KB/sec +++
woow!

Revision 1.114 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:24 2003 UTC (20 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.113: +32 -27 lines
Diff to previous 1.113 (colored) to selected 1.171 (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.113 / (download) - annotate - [select for diffs], Thu Oct 23 20:55:08 2003 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.112: +2 -12 lines
Diff to previous 1.112 (colored) to selected 1.171 (colored)

Remove all the code to maintain ia_inpcbs.  This information was only used to
close sockets on address changes, which was deemed to be a bad idea and was
summarily removed, so there is no point in wasting effort on maintaining it
any more.

Revision 1.112 / (download) - annotate - [select for diffs], Sat Oct 18 13:05:45 2003 UTC (20 years, 5 months ago) by enami
Branch: MAIN
Changes since 1.111: +8 -6 lines
Diff to previous 1.111 (colored) to selected 1.171 (colored)

Fix indent.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Sep 25 00:59:32 2003 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored) to selected 1.171 (colored)

Fix glaring errors in recent changes.

Revision 1.110 / (download) - annotate - [select for diffs], Fri Sep 12 09:55:22 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.109: +8 -2 lines
Diff to previous 1.109 (colored) to selected 1.171 (colored)

send icmp admin prohibit if socket policy mismatches.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Sep 4 09:17:03 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.108: +16 -9 lines
Diff to previous 1.108 (colored) to selected 1.171 (colored)

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

Revision 1.108 / (download) - annotate - [select for diffs], Fri Aug 22 22:00:38 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.107: +2 -9 lines
Diff to previous 1.107 (colored) to selected 1.171 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Fri Aug 22 21:53:06 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored) to selected 1.171 (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.106 / (download) - annotate - [select for diffs], Thu Aug 21 14:49:50 2003 UTC (20 years, 7 months ago) by jonathan
Branch: MAIN
Changes since 1.105: +9 -4 lines
Diff to previous 1.105 (colored) to selected 1.171 (colored)

Honour the M_CSUM_NO_PSEUDOHDR, if set on inbound TCP and UDP packets.
Tested against  bcm5700 with patched if_bge.c.

Revision 1.105 / (download) - annotate - [select for diffs], Fri Aug 15 03:42:05 2003 UTC (20 years, 7 months ago) by jonathan
Branch: MAIN
Changes since 1.104: +12 -5 lines
Diff to previous 1.104 (colored) to selected 1.171 (colored)

(fast-ipsec): Add hooks to pass IPv4 IPsec traffic into fast-ipsec, if
configured with ``options FAST_IPSEC''.  Kernels with KAME IPsec or
with no IPsec should work as before.

All calls to ip_output() now always pass an additional compulsory
argument: the inpcb associated with the packet being sent,
or 0 if no inpcb is available.

Fast-ipsec tested with ICMP or UDP over ESP. TCP doesn't work, yet.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:20 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.103: +3 -7 lines
Diff to previous 1.103 (colored) to selected 1.171 (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.103.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:27:01 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.103: +6 -4 lines
Diff to previous 1.103 (colored) to selected 1.171 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jun 29 22:32:01 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.102: +2 -4 lines
Diff to previous 1.102 (colored) to selected 1.171 (colored)

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

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:10 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.101: +6 -4 lines
Diff to previous 1.101 (colored) to selected 1.171 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.101 / (download) - annotate - [select for diffs], Mon Jun 23 11:02:17 2003 UTC (20 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored) to selected 1.171 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.100 / (download) - annotate - [select for diffs], Sun Jun 15 02:49:34 2003 UTC (20 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.99: +18 -7 lines
Diff to previous 1.99 (colored) to selected 1.171 (colored)

Change the way multicasts are kept.  They now use a hash table in the same
manner as the ifaddr hash table.  By doing this, the mkludge code can go
away.  At the same time, keep track of what pcbs are using what ifaddr and
when an address is deleted from an interface, notify/abort all sockets
that have that address as a source.  Switch IGMP and multicasts to use pools
for allocation.  Fix a number of potential problems in the igmp code where
allocation failures could cause a trap/panic.

Revision 1.99 / (download) - annotate - [select for diffs], Wed May 14 06:47:37 2003 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.98: +2 -40 lines
Diff to previous 1.98 (colored) to selected 1.171 (colored)

always use PULLDOWN_TEST codepath.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:17 2003 UTC (21 years ago) by matt
Branch: MAIN
Changes since 1.97: +19 -2 lines
Diff to previous 1.97 (colored) to selected 1.171 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.97 / (download) - annotate - [select for diffs], Mon Jan 20 00:05:46 2003 UTC (21 years, 2 months ago) by simonb
Branch: MAIN
Changes since 1.96: +4 -12 lines
Diff to previous 1.96 (colored) to selected 1.171 (colored)

Remove variables that are only assigned too but not referenced.

Revision 1.80.2.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:49:23 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.80.2.3: +11 -7 lines
Diff to previous 1.80.2.3 (colored) next main 1.81 (colored) to selected 1.171 (colored)

sync kqueue branch with HEAD

Revision 1.93.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:49 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.93.2.2: +9 -7 lines
Diff to previous 1.93.2.2 (colored) to branchpoint 1.93 (colored) next main 1.94 (colored) to selected 1.171 (colored)

catch up with -current.

Revision 1.75.2.9 / (download) - annotate - [select for diffs], Tue Aug 27 23:48:07 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.75.2.8: +7 -5 lines
Diff to previous 1.75.2.8 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Aug 14 00:23:36 2002 UTC (21 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, fvdl_fs64_base
Changes since 1.95: +9 -7 lines
Diff to previous 1.95 (colored) to selected 1.171 (colored)

avoid swapping endian of ip_len and ip_off on mbuf, to meet with M_LEADINGSPACE
optimization made last year.  should solve PR 17867 and 10195.

IP_HDRINCL behavior of raw ip socket is kept unchanged.  we may want to
provide IP_HDRINCL variant that does not swap endian.

Revision 1.75.2.8 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:50 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.7: +4 -2 lines
Diff to previous 1.75.2.7 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.93.2.2 / (download) - annotate - [select for diffs], Mon Jul 15 10:37:03 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.93.2.1: +4 -2 lines
Diff to previous 1.93.2.1 (colored) to branchpoint 1.93 (colored) to selected 1.171 (colored)

catch up with -current.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Jun 30 22:40:37 2002 UTC (21 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.94: +4 -2 lines
Diff to previous 1.94 (colored) to selected 1.171 (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.80.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:51:04 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.80.2.2: +8 -5 lines
Diff to previous 1.80.2.2 (colored) to selected 1.171 (colored)

catch up with -current on kqueue branch

Revision 1.93.2.1 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:32 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored) to selected 1.171 (colored)

catch up with -current.

Revision 1.75.2.7 / (download) - annotate - [select for diffs], Thu Jun 20 03:49:01 2002 UTC (21 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.6: +8 -5 lines
Diff to previous 1.75.2.6 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.94 / (download) - annotate - [select for diffs], Sun Jun 9 16:33:45 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored) to selected 1.171 (colored)

whitespace

Revision 1.93 / (download) - annotate - [select for diffs], Sun May 12 20:33:51 2002 UTC (21 years, 10 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.92: +5 -2 lines
Diff to previous 1.92 (colored) to selected 1.171 (colored)

Eliminate commons.

Revision 1.80.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:03:04 2002 UTC (22 years, 2 months ago) by thorpej
Branch: kqueue
Changes since 1.80.2.1: +14 -351 lines
Diff to previous 1.80.2.1 (colored) to selected 1.171 (colored)

Sync kqueue branch with -current.

Revision 1.75.2.6 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:12 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.5: +6 -8 lines
Diff to previous 1.75.2.5 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Dec 21 02:51:08 2001 UTC (22 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.91: +6 -8 lines
Diff to previous 1.91 (colored) to selected 1.171 (colored)

comment and whitespace.  sync with kame

Revision 1.75.2.5 / (download) - annotate - [select for diffs], Wed Nov 14 19:17:59 2001 UTC (22 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.4: +7 -338 lines
Diff to previous 1.75.2.4 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Nov 13 00:32:42 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.90: +4 -1 lines
Diff to previous 1.90 (colored) to selected 1.171 (colored)

add RCSIDs

Revision 1.85.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:29 2001 UTC (22 years, 4 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.85: +4 -338 lines
Diff to previous 1.85 (colored) next main 1.86 (colored) to selected 1.171 (colored)

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

Revision 1.90 / (download) - annotate - [select for diffs], Wed Nov 7 06:30:50 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.89: +2 -25 lines
Diff to previous 1.89 (colored) to selected 1.171 (colored)

do not grab packet to joined multicast group, when ip6_dst and in6p_laddr
mismatches.  it makes the behavior more closer to 4.4BSD IPv4 code.
sync with kame

Revision 1.89 / (download) - annotate - [select for diffs], Sun Nov 4 20:55:29 2001 UTC (22 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.88: +5 -10 lines
Diff to previous 1.88 (colored) to selected 1.171 (colored)

Convert netinet to not use the internal <sys/queue.h> field names
but instead the access macros.  Use the FOREACH macros where appropriate.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Nov 2 02:37:50 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored) to selected 1.171 (colored)

array boundary overflow on the use of IPv4 mapped address.  from simonb

Revision 1.87 / (download) - annotate - [select for diffs], Mon Oct 29 07:02:34 2001 UTC (22 years, 4 months ago) by simonb
Branch: MAIN
Changes since 1.86: +1 -3 lines
Diff to previous 1.86 (colored) to selected 1.171 (colored)

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

Revision 1.86 / (download) - annotate - [select for diffs], Wed Oct 24 06:04:08 2001 UTC (22 years, 4 months ago) by itojun
Branch: MAIN
Changes since 1.85: +1 -305 lines
Diff to previous 1.85 (colored) to selected 1.171 (colored)

remove unused codepath (unifdef -UUDP6)

Revision 1.75.2.4 / (download) - annotate - [select for diffs], Mon Oct 22 20:41:58 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.3: +3 -7 lines
Diff to previous 1.75.2.3 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Oct 15 09:51:15 2001 UTC (22 years, 5 months ago) by itojun
Branch: MAIN
Branch point for: thorpej-mips-cache
Changes since 1.84: +3 -7 lines
Diff to previous 1.84 (colored) to selected 1.171 (colored)

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

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:47:50 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored) next main 1.84 (colored) to selected 1.171 (colored)

Catch up with -current.

Revision 1.75.2.3 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:51 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.2: +2 -2 lines
Diff to previous 1.75.2.2 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.84 / (download) - annotate - [select for diffs], Mon Sep 17 17:27:01 2001 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored) to selected 1.171 (colored)

Split the pre-computed ifnet checksum flags into Tx and Rx directions.
Add capabilities bits that indicate an interface can only perform
in-bound TCPv4 or UDPv4 checksums.  There is at least one Gig-E chip
for which this is true (Level One LXT-1001), and this is also the
case for the Intel i82559 10/100 Ethernet chips.

Revision 1.75.2.2 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:33 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75.2.1: +27 -114 lines
Diff to previous 1.75.2.1 (colored) to branchpoint 1.75 (colored) to selected 1.171 (colored)

Catch up with -current.

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:57 2001 UTC (22 years, 7 months ago) by lukem
Branch: kqueue
Changes since 1.80: +5 -93 lines
Diff to previous 1.80 (colored) to selected 1.171 (colored)

update to -current

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jul 25 23:28:02 2001 UTC (22 years, 7 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.82: +1 -8 lines
Diff to previous 1.82 (colored) to selected 1.171 (colored)

allocate ipsec policy buffer attached to pcb in in*_pcballoc, before
giving anyone accesses to pcb (do not reveal an inconsistent ones).
sync with kame

Revision 1.82 / (download) - annotate - [select for diffs], Wed Jul 25 06:05:16 2001 UTC (22 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.81: +3 -86 lines
Diff to previous 1.81 (colored) to selected 1.171 (colored)

g/c #if 0'ed fragment.  sync with kame.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jul 17 02:44:00 2001 UTC (22 years, 8 months ago) by enami
Branch: MAIN
Changes since 1.80: +3 -1 lines
Diff to previous 1.80 (colored) to selected 1.171 (colored)

Add missing counting up of ``socket buffer is full'' counter when
failed to sbappendaddr().

Revision 1.80 / (download) - annotate - [select for diffs], Tue Jul 3 08:06:20 2001 UTC (22 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: kqueue
Changes since 1.79: +2 -1 lines
Diff to previous 1.79 (colored) to selected 1.171 (colored)

call in{,6}_pcbpurgeif0() before in{,6}_purgeif().

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jun 27 23:40:50 2001 UTC (22 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.78: +22 -22 lines
Diff to previous 1.78 (colored) to selected 1.171 (colored)

fix udp reception to sockets bound to linklocal address (like fe80::1%lo0).
sync with kame

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Thu Jun 21 20:08:46 2001 UTC (22 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.75: +118 -31 lines
Diff to previous 1.75 (colored) to selected 1.171 (colored)

Catch up to -current.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Jun 2 16:17:11 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +103 -20 lines
Diff to previous 1.77 (colored) to selected 1.171 (colored)

Implement support for IP/TCP/UDP checksum offloading provided by
network interfaces.  This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us.  In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software.  This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.

We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.

Note: hardware-assisted checksumming defaults to "off".  It is
enabled with ifconfig(8).  See the manual page for details.

Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.

Revision 1.77 / (download) - annotate - [select for diffs], Thu May 31 19:56:13 2001 UTC (22 years, 9 months ago) by soda
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored) to selected 1.171 (colored)

missing opt_inet.h

Revision 1.66.4.5 / (download) - annotate - [select for diffs], Wed May 9 19:37:41 2001 UTC (22 years, 10 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.66.4.4: +15 -12 lines
Diff to previous 1.66.4.4 (colored) to branchpoint 1.66 (colored) to selected 1.171 (colored)

Pull up revision 1.76 (requested by itojun):
  Correct faith prefix determintaion.

Revision 1.76 / (download) - annotate - [select for diffs], Tue May 8 10:15:14 2001 UTC (22 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.75: +15 -12 lines
Diff to previous 1.75 (colored) to selected 1.171 (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.66.4.4 / (download) - annotate - [select for diffs], Fri Apr 6 00:26:54 2001 UTC (22 years, 11 months ago) by he
Branch: netbsd-1-5
Changes since 1.66.4.3: +5 -2 lines
Diff to previous 1.66.4.3 (colored) to branchpoint 1.66 (colored) to selected 1.171 (colored)

Pull up revision 1.75 (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.52.2.3 / (download) - annotate - [select for diffs], Sun Feb 11 19:17:19 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.2: +5 -2 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jan 24 09:04:16 2001 UTC (23 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.74: +5 -2 lines
Diff to previous 1.74 (colored) to selected 1.171 (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.66.4.3 / (download) - annotate - [select for diffs], Fri Dec 15 03:29:16 2000 UTC (23 years, 3 months ago) by he
Branch: netbsd-1-5
Changes since 1.66.4.2: +3 -3 lines
Diff to previous 1.66.4.2 (colored) to branchpoint 1.66 (colored) to selected 1.171 (colored)

Pull up revision 1.74 (requested by hubertf):
  Fix multicast inbound packet processing.  Fixes PR#11629.
  (Required continuation of previous pullup.)

Revision 1.66.4.2 / (download) - annotate - [select for diffs], Wed Dec 13 21:24:57 2000 UTC (23 years, 3 months ago) by he
Branch: netbsd-1-5
Changes since 1.66.4.1: +3 -3 lines
Diff to previous 1.66.4.1 (colored) to branchpoint 1.66 (colored) to selected 1.171 (colored)

Pull up revision 1.73 (requested by itojun):
  Fix multicast inbound packet processing.  Fixes PR#11629.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:18:43 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52.2.1: +5 -5 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.171 (colored)

Sync with HEAD.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Dec 4 11:24:20 2000 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored) to selected 1.171 (colored)

more on previous (udp4 multicast fix)

Revision 1.73 / (download) - annotate - [select for diffs], Mon Dec 4 11:23:04 2000 UTC (23 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored) to selected 1.171 (colored)

fix multicast inbound packet processing.
NetBSD PR 11629 From: salvet@ics.muni.cz

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:38 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.52: +779 -56 lines
Diff to previous 1.52 (colored) to selected 1.171 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.72 / (download) - annotate - [select for diffs], Tue Oct 17 03:06:44 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.71: +15 -1 lines
Diff to previous 1.71 (colored) to selected 1.171 (colored)

be more friendly with INET-less build.
XXX we need to do more to do a working INET-less build

Revision 1.71 / (download) - annotate - [select for diffs], Wed Aug 30 15:04:45 2000 UTC (23 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored) to selected 1.171 (colored)

minor typo.  s/iPsec/IPsec/

Revision 1.66.4.1 / (download) - annotate - [select for diffs], Fri Jul 28 16:58:10 2000 UTC (23 years, 7 months ago) by sommerfeld
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored) to selected 1.171 (colored)

Pull up UDP, ICMP fixes:

 - Drop packet, increment udps_badlen if the udp header length field
   reports a size smaller than the udp header; defends against bogus
   packets seen by by Assar Westerlund.

 - allow icmp_error() to work when icmpreturndatabytes is sufficiently
   large that the icmp error message doesn't fit in a header mbuf.

 - defend against mbuf chains shorter than their contained ip->ip_len.

Joint work of myself, itojun, and assar
Approved by thorpej

revisions pulled up:
	sys/netinet/ip_icmp.c		1.52
	sys/netinet/udp_usrreq.c	1.70

Revision 1.70 / (download) - annotate - [select for diffs], Mon Jul 24 03:46:57 2000 UTC (23 years, 8 months ago) by sommerfeld
Branch: MAIN
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored) to selected 1.171 (colored)

Drop packet, increment udps_badlen if the udp header length field
reports a size smaller than the udp header; defends against bogosity
detected by Assar Westerlund.

This patch and the previous ip_icmp.c change were the joint work of
assar, itojun, and myself.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jul 7 15:54:16 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.68: +9 -19 lines
Diff to previous 1.68 (colored) to selected 1.171 (colored)

sync with kame.
introduce in6_{recover,embed}scope, for in-kernel scoped-address manipulation.
improve in6_pcbnotify.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jul 6 12:51:40 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.67: +1 -2 lines
Diff to previous 1.67 (colored) to selected 1.171 (colored)

remove unnecessary #include <netkey/key_debug.h>.  from kame.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Jun 28 03:01:17 2000 UTC (23 years, 8 months ago) by mrg
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored) to selected 1.171 (colored)

<vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.66 / (download) - annotate - [select for diffs], Thu Mar 30 13:25:11 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
CVS Tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.65: +13 -13 lines
Diff to previous 1.65 (colored) to selected 1.171 (colored)

Remove register declarations.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Mar 30 02:39:37 2000 UTC (23 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.64: +1 -2 lines
Diff to previous 1.64 (colored) to selected 1.171 (colored)

Delete reduncdant decl of inetctlerrmap - it's in <netinet/in_var.h>.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Mar 22 20:58:30 2000 UTC (24 years ago) by ws
Branch: MAIN
Changes since 1.63: +9 -6 lines
Diff to previous 1.63 (colored) to selected 1.171 (colored)

Make IPKDB working again.
Add support for i386 debugging and pci-based ne2000 boards.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Mar 1 12:49:42 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored) to selected 1.171 (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.62 / (download) - annotate - [select for diffs], Tue Feb 29 16:21:56 2000 UTC (24 years ago) by itojun
Branch: MAIN
Changes since 1.61: +1 -22 lines
Diff to previous 1.61 (colored) to selected 1.171 (colored)

avoid copy-overwrite-copy on incoming udp4 checksum.  use in4_cksum
which takes care of pseudo header checksum without overwrites.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Feb 11 10:43:36 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.60: +7 -11 lines
Diff to previous 1.60 (colored) to selected 1.171 (colored)

don't increase both "no port on broadcast packet" and "no port" stat.
increasing both of them will result in negative number on udp
"delivered" stat on netstat(8), since netstat computes number of delivered
packet by subtracting them from number of inbound packets.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Feb 2 23:28:09 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.59: +4 -3 lines
Diff to previous 1.59 (colored) to selected 1.171 (colored)

PRU_PURGEADDR -> PRU_PURGEIF, per a discussion w/ itojun.  In the IPv4
and IPv6 code, also use this to traverse PCB tables, looking for cached
routes referencing the dying ifnet, forcing them to be refreshed.

Revision 1.59 / (download) - annotate - [select for diffs], Tue Feb 1 22:52:10 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.58: +6 -1 lines
Diff to previous 1.58 (colored) to selected 1.171 (colored)

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

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

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jan 31 14:18:58 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored) to selected 1.171 (colored)

bring in latest KAME ipsec tree.
- interop issues in ipcomp is fixed
- padding type (after ESP) is configurable
- key database memory management (need more fixes)
- policy specification is revisited

XXX m->m_pkthdr.rcvif is still overloaded - hope to fix it soon

Revision 1.57 / (download) - annotate - [select for diffs], Mon Jan 31 10:39:26 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.56: +13 -1 lines
Diff to previous 1.56 (colored) to selected 1.171 (colored)

destination port == 0 is illegal based on RFC768.
(NetBSD PR: 9137 - I thought I committed this already but I wasn't)

Revision 1.56 / (download) - annotate - [select for diffs], Thu Jan 6 15:46:08 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.55: +5 -3 lines
Diff to previous 1.55 (colored) to selected 1.171 (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.55 / (download) - annotate - [select for diffs], Thu Jan 6 06:41:19 2000 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
Changes since 1.54: +15 -1 lines
Diff to previous 1.54 (colored) to selected 1.171 (colored)

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

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

Revision 1.52.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:21 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.52: +736 -34 lines
Diff to previous 1.52 (colored) next main 1.53 (colored) to selected 1.171 (colored)

Pull up to last week's -current.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Dec 22 04:03:01 1999 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
Changes since 1.53: +8 -1 lines
Diff to previous 1.53 (colored) to selected 1.171 (colored)

drop IPv6 packets with v4 mapped address on src/dst.  they are illegal
and may be used to fool IPv6 implementations (by using ::ffff:127.0.0.1 as
source you may be able to pretend the packet is from local node)

Revision 1.53 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:21 1999 UTC (24 years, 3 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.52: +736 -34 lines
Diff to previous 1.52 (colored) to selected 1.171 (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.47.6.3 / (download) - annotate - [select for diffs], Tue Nov 30 13:35:42 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.47.6.2: +743 -32 lines
Diff to previous 1.47.6.2 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored) to selected 1.171 (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.52 / (download) - annotate - [select for diffs], Mon Sep 13 12:15:55 1999 UTC (24 years, 6 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.51: +3 -2 lines
Diff to previous 1.51 (colored) to selected 1.171 (colored)

- Call in{,6}_pcbdetach if ipsec initialization is failed during PRU_ATTACH.
  This situation happens on severe memory shortage.  We may need more
  improvements here and there.
- Grab IEEE802 address from IFT_ETHER card, even if the card is
  inserted after bootup time.  Is there any other card that can be
  inserted afterwards?  pcmcia fddi card? :-P
- RFC2373 u bit handling suggests that we SHOULD NOT copy interface id from
  ethernet card to pseudo interface, when ethernet card has IEEE802/EUI64
  with u bit != 0 (this means that IEEE802/EUI64 is not universally unique).
  Do not use such address as, for example, interface id for gif interface.
  (I have such an ethernet card myself)
  This may change interface id for your gif interface.  be careful upgrading
  rc files.

(sync with recent KAME)

Revision 1.51 / (download) - annotate - [select for diffs], Mon Aug 9 10:55:29 1999 UTC (24 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.50: +4 -1 lines
Diff to previous 1.50 (colored) to selected 1.171 (colored)

return with doing nothing from xx_ctlinput(), when sa->sa_family
is not the expected one.

I see PRC_REDIRECT_HOST with sa->sa_family == AF_UNIX coming to
{tcp,udp}_ctlinput() when I use dhclient, and I feel like adding
more sanity checks, without logging - if we log it it is too noisy.

Revision 1.47.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:35:00 1999 UTC (24 years, 7 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.47.4.1: +10 -3 lines
Diff to previous 1.47.4.1 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored) to selected 1.171 (colored)

Update from trunk.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jul 9 22:57:23 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.49: +4 -1 lines
Diff to previous 1.49 (colored) to selected 1.171 (colored)

defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jul 6 14:37:47 1999 UTC (24 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.48: +7 -3 lines
Diff to previous 1.48 (colored) to selected 1.171 (colored)

for incoming broadcasts, strip IP/UDP header correctly
wrap a line

Revision 1.47.6.2 / (download) - annotate - [select for diffs], Tue Jul 6 11:02:51 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.47.6.1: +33 -1 lines
Diff to previous 1.47.6.1 (colored) to branchpoint 1.47 (colored) to selected 1.171 (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.47.4.1 / (download) - annotate - [select for diffs], Thu Jul 1 23:47:04 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.47: +116 -24 lines
Diff to previous 1.47 (colored) to selected 1.171 (colored)

Sync w/ -current.

Revision 1.48 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:52 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.47: +116 -24 lines
Diff to previous 1.47 (colored) to selected 1.171 (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.47.6.1 / (download) - annotate - [select for diffs], Mon Jun 28 06:37:02 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.47: +86 -24 lines
Diff to previous 1.47 (colored) to selected 1.171 (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.47 / (download) - annotate - [select for diffs], Tue Jan 19 23:03:22 1999 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Branch point for: kame, chs-ubc2
Changes since 1.46: +4 -6 lines
Diff to previous 1.46 (colored) to selected 1.171 (colored)

Don't screw with ip_len; just subtract from it where we actually use the
value.

Revision 1.46 / (download) - annotate - [select for diffs], Tue Jan 19 21:58:41 1999 UTC (25 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored) to selected 1.171 (colored)

Don't overwrite the checksum fields when checking them.  There's no reason to
do this, and it screws up ICMP replies.
XXX The returned IP checksum and length are still wrong.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jan 11 22:35:07 1999 UTC (25 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored) to selected 1.171 (colored)

Fix byte order and ip_len inconsistencies in ICMP reply code.  Also, fix
some formatting and HTONS(foo) vs. foo = htons(foo) inconsistencies.

PR #6602, Darren Reed.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jan 5 10:32:16 1998 UTC (26 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach, eeh-paddr_t-base, eeh-paddr_t, chs-ubc-base, chs-ubc
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored) to selected 1.171 (colored)

Finishing merging 4.4BSD-Lite2 netinet.  At this point, the only changes
left were SCCS IDs and Copyright dates.

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Mon Jan 5 09:56:15 1998 UTC (26 years, 2 months ago) by thorpej
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +4 -4 lines
Diff to previous 1.1.1.2 (colored) to selected 1.171 (colored)

Import sys/netinet from 4.4BSD-Lite2 for reference purposes.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Mon Jan 5 09:54:30 1998 UTC (26 years, 2 months ago) by thorpej
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +167 -41 lines
Diff to previous 1.1.1.1 (colored) to selected 1.171 (colored)

Import sys/netinet from 4.4BSD-Lite for reference purposes.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Tue Sep 16 03:51:20 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.42: +5 -3 lines
Diff to previous 1.42 (colored) next main 1.43 (colored) to selected 1.171 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Sep 12 10:58:31 1997 UTC (26 years, 6 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.42: +5 -3 lines
Diff to previous 1.42 (colored) to selected 1.171 (colored)

Adjust packet len in mbuf header for incoming broadcasts.
Closes PR kern/4087 (by myself).

Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 28 22:19:53 1997 UTC (26 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.41: +9 -3 lines
Diff to previous 1.41 (colored) to selected 1.171 (colored)

Make the following tunable via sysctl, inspired by BSD/OS:
- udp_sendspace
- udp_recvspace

Revision 1.41 / (download) - annotate - [select for diffs], Tue Jun 24 19:31:34 1997 UTC (26 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.40: +1 -2 lines
Diff to previous 1.40 (colored) to selected 1.171 (colored)

Don't adjust ip->ip_len before calling icmp_error(); icmp_error() already
does this.  Per Stevens in TCP/IP Illustrated Vol. 2, p.774, submitted
by Koji Imada <koji@math.human.nagoya-u.ac.jp>.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jan 11 05:21:14 1997 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.39: +27 -64 lines
Diff to previous 1.39 (colored) to selected 1.171 (colored)

Implement the IP_RECVIF socket option: supply a datagram packet's incoming
interface using a sockaddr_dl in a control mbuf.

Implement SO_TIMESTAMP for IP datagrams.

Move packet information option processing into a generic function
so that they work with multicast UDP and raw IP as well as unicast UDP.

Contributed by Bill Fenner <fenner@parc.xerox.com>.

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Wed Dec 11 04:01:12 1996 UTC (27 years, 3 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.29.2.1: +87 -113 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored) to selected 1.171 (colored)

From trunk:
Eliminate SS_PRIV; instead, pass down a proc pointer to the usrreq methods
that need it.
Fix numerous memory leaks and bogus return values.

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Sun Nov 10 21:57:55 1996 UTC (27 years, 4 months ago) by thorpej
Branch: netbsd-1-2
Changes since 1.29: +10 -1 lines
Diff to previous 1.29 (colored) to selected 1.171 (colored)

Update from trunk:
- Make ip_len and ip_off unsigned.
- Make sure we don't accept or transmit packets larger than the
  maximim IP packet size.
This fixes the so-called `death ping' bug.

Sum of work from Bill Fenner <fenner@parc.xerox.com>,
Kevin Lahey <kml@nas.nasa.gov>, and myself.

Thanks to Curt Sampson, Jukka Marin, and Kevin Lahey for testing
this under NetBSD 1.2

Revision 1.39 / (download) - annotate - [select for diffs], Fri Oct 25 06:35:16 1996 UTC (27 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.38: +10 -1 lines
Diff to previous 1.38 (colored) to selected 1.171 (colored)

In udp_output(), sanity check the length of the packet to be transmitted.
If it's larger than IP_MAXPACKET, return an error condition.
Based on a patch from Bill Fenner <fenner@parc.xerox.com>

Revision 1.38 / (download) - annotate - [select for diffs], Wed Oct 16 19:33:39 1996 UTC (27 years, 5 months ago) by ws
Branch: MAIN
Changes since 1.37: +9 -9 lines
Diff to previous 1.37 (colored) to selected 1.171 (colored)

Rename recently checked in KGDB to IPKDB to resolve conflicts with older KGDB

Revision 1.37 / (download) - annotate - [select for diffs], Mon Sep 30 16:16:45 1996 UTC (27 years, 5 months ago) by ws
Branch: MAIN
Changes since 1.36: +12 -1 lines
Diff to previous 1.36 (colored) to selected 1.171 (colored)

Add (and change) machine independent files for KGDB support

Revision 1.36 / (download) - annotate - [select for diffs], Mon Sep 16 17:45:19 1996 UTC (27 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.35: +5 -3 lines
Diff to previous 1.35 (colored) to selected 1.171 (colored)

Make sure the sin_zero fields are filled.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Sep 15 18:11:11 1996 UTC (27 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.34: +9 -8 lines
Diff to previous 1.34 (colored) to selected 1.171 (colored)

Hash unconnected PCBs.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Sep 9 14:51:23 1996 UTC (27 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +25 -20 lines
Diff to previous 1.33 (colored) to selected 1.171 (colored)

Add in_nullhost() and in_hosteq() macros, to hide some protocol
details.  Also, fix a bug in TCP wrt SYN+URG packets.

Revision 1.33 / (download) - annotate - [select for diffs], Thu May 23 17:05:45 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +2 -7 lines
Diff to previous 1.32 (colored) to selected 1.171 (colored)

udp_output() doesn't actually take control data, so don't pretend it does.

Revision 1.32 / (download) - annotate - [select for diffs], Thu May 23 17:03:31 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +18 -9 lines
Diff to previous 1.31 (colored) to selected 1.171 (colored)

Make sure the control mbufs are freed in all cases.

Revision 1.31 / (download) - annotate - [select for diffs], Thu May 23 16:22:32 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +78 -109 lines
Diff to previous 1.30 (colored) to selected 1.171 (colored)

Fix a race condition in PRU_DISCONNECT.
Rearrange the code to deal with unconnected sockets slightly.
Other minor changes.

Revision 1.30 / (download) - annotate - [select for diffs], Wed May 22 13:55:37 1996 UTC (27 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +5 -4 lines
Diff to previous 1.29 (colored) to selected 1.171 (colored)

Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.

Revision 1.29 / (download) - annotate - [select for diffs], Mon May 20 16:56:20 1996 UTC (27 years, 10 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored) to selected 1.171 (colored)

if the sender set a cksum, check it, regardless if we care to
generate and send them ourselves.  from rich stevens.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Mar 16 23:54:03 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored) to selected 1.171 (colored)

Fix printf format args.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Feb 13 23:44:32 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.26: +47 -16 lines
Diff to previous 1.26 (colored) to selected 1.171 (colored)

netinet prototypes

Revision 1.24.2.1 / (download) - annotate - [select for diffs], Fri Feb 2 06:13:02 1996 UTC (28 years, 1 month ago) by mycroft
Branch: netbsd-1-1
Changes since 1.24: +11 -13 lines
Diff to previous 1.24 (colored) next main 1.25 (colored) to selected 1.171 (colored)

Bring in changes for mondo patch 2.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 31 03:49:38 1996 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.25: +11 -13 lines
Diff to previous 1.25 (colored) to selected 1.171 (colored)

Build a hash table of PCBs.  Hash function needs tweaking.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Nov 21 01:07:46 1995 UTC (28 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.24: +4 -6 lines
Diff to previous 1.24 (colored) to selected 1.171 (colored)

make netinet work on systems where pointers and longs are 64 bits
(like the alpha).  Biggest problem: IP headers were overlayed with
structure which included pointers, and which therefore didn't overlay
properly on 64-bit machines.  Solution: instead of threading pointers
through IP header overlays, add a "queue element" structure to do
the threading, and point it at the ip headers.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Aug 12 23:59:42 1995 UTC (28 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001
Branch point for: netbsd-1-1
Changes since 1.23: +7 -7 lines
Diff to previous 1.23 (colored) to selected 1.171 (colored)

splnet --> splsoftnet

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jun 26 08:46:16 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.171 (colored)

fix typo

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 18 20:01:19 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored) to selected 1.171 (colored)

convert pcb lists to CIRCLEQs, so that the end can be looked at more
easily, and so that the original (insque/remque) logic can be effectively
mimiced.  (This fixes a bug in the previous set of list changes.)
also (since terminator is no longer null) reinstate uninitted list checks,
but mark them XXX.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jun 12 06:48:56 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored) to selected 1.171 (colored)

Fix bogon in previous.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 12 06:46:40 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +8 -5 lines
Diff to previous 1.19 (colored) to selected 1.171 (colored)

Change in_pcbnotify*() to take an errno value.  Make inetctlerrmap[] an
array on ints, not u_chars.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 12 06:24:22 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +6 -7 lines
Diff to previous 1.18 (colored) to selected 1.171 (colored)

Oops.  Make source quench work again.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jun 12 00:48:06 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +35 -28 lines
Diff to previous 1.17 (colored) to selected 1.171 (colored)

Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jun 4 05:07:20 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +7 -7 lines
Diff to previous 1.16 (colored) to selected 1.171 (colored)

Clean up many more casts.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jun 1 21:36:51 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored) to selected 1.171 (colored)

Avoid byte-swapping IP addresses at run time.

Revision 1.15 / (download) - annotate - [select for diffs], Thu Apr 13 06:37:18 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.14: +5 -4 lines
Diff to previous 1.14 (colored) to selected 1.171 (colored)

be a bit more careful and explicit with types.  (basically a large no-op.)

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 29 06:38:57 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored) to selected 1.171 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.13 / (download) - annotate - [select for diffs], Fri May 13 06:06:56 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +65 -33 lines
Diff to previous 1.12 (colored) to selected 1.171 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Feb 10 18:46:06 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored) to selected 1.171 (colored)

Format police.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Feb 2 05:59:10 1994 UTC (30 years, 1 month ago) by hpeyerl
Branch: MAIN
Changes since 1.10: +2 -16 lines
Diff to previous 1.10 (colored) to selected 1.171 (colored)

Multicast is no longer optional.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jan 10 20:14:34 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +5 -3 lines
Diff to previous 1.9 (colored) to selected 1.171 (colored)

Should compile now with or without `options MULTICAST'.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Jan 8 23:50:47 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +5 -2 lines
Diff to previous 1.8 (colored) to selected 1.171 (colored)

More prototypes.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 8 23:19:48 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +13 -14 lines
Diff to previous 1.7 (colored) to selected 1.171 (colored)

Slight rearrangement.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jan 8 23:17:18 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +15 -3 lines
Diff to previous 1.6 (colored) to selected 1.171 (colored)

Prototypes.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Jan 8 21:22:06 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +3 -4 lines
Diff to previous 1.5 (colored) to selected 1.171 (colored)

Fix some inconsistent spacing; spaces at the end of lines, etc.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Dec 18 00:42:15 1993 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +18 -18 lines
Diff to previous 1.4 (colored) to selected 1.171 (colored)

Canonicalize all #includes.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 6 04:59:45 1993 UTC (30 years, 3 months ago) by hpeyerl
Branch: MAIN
Changes since 1.3: +97 -4 lines
Diff to previous 1.3 (colored) to selected 1.171 (colored)

multicast support.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:55:04 1993 UTC (30 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored) next main 1.4 (colored) to selected 1.171 (colored)

Make all files using spl*() #include cpu.h.  Changes from trunk.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:42:52 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base
Branch point for: magnum
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored) to selected 1.171 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:20:23 1993 UTC (30 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored) to selected 1.171 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.171 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.171 (colored)

Initial revision

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>