The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.324 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 days, 16 hours ago) by pooka
Branch: MAIN
CVS Tags: HEAD
Changes since 1.323: +4 -2 lines
Diff to previous 1.323 (colored) to selected 1.231.2.3 (colored)

sprinkle _KERNEL_OPT

Revision 1.323 / (download) - annotate - [select for diffs], Fri Aug 7 08:11:33 2015 UTC (3 weeks, 5 days ago) by ozaki-r
Branch: MAIN
Changes since 1.322: +3 -3 lines
Diff to previous 1.322 (colored) to selected 1.231.2.3 (colored)

Use time_uptime instead of time_second to avoid time leaps

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

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

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

Discussed on tech-kern and tech-net.

Revision 1.319.4.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (2 months, 3 weeks ago) by skrll
Branch: nick-nhusb
Changes since 1.319.4.1: +17 -3 lines
Diff to previous 1.319.4.1 (colored) to branchpoint 1.319 (colored) next main 1.320 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.322 / (download) - annotate - [select for diffs], Sat May 2 20:22:12 2015 UTC (4 months ago) by joerg
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.321: +4 -2 lines
Diff to previous 1.321 (colored) to selected 1.231.2.3 (colored)

Fix !ARP build.

Revision 1.321 / (download) - annotate - [select for diffs], Sat May 2 14:41:32 2015 UTC (4 months ago) by roy
Branch: MAIN
Changes since 1.320: +15 -3 lines
Diff to previous 1.320 (colored) to selected 1.231.2.3 (colored)

Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and
IN_IFF_DETATCHED to mimic the IPv6 address behaviour.
Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the
ifreq structure.
Add IPv4 DAD detection via the ARP methods described in RFC 5227.
Add sysctls net.inet.ip.dad_count and net.inet.arp.debug.

Discussed on tech-net@

Revision 1.319.4.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:23 2015 UTC (4 months, 3 weeks ago) by skrll
Branch: nick-nhusb
Changes since 1.319: +27 -19 lines
Diff to previous 1.319 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.320 / (download) - annotate - [select for diffs], Thu Mar 26 04:05:58 2015 UTC (5 months, 1 week ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.319: +27 -19 lines
Diff to previous 1.319 (colored) to selected 1.231.2.3 (colored)

Tidy up the regular path of ip_forward

No functional change is intended.

Revision 1.302.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:35 2014 UTC (12 months, 1 week ago) by tls
Branch: tls-maxphys
Changes since 1.302.2.2: +167 -302 lines
Diff to previous 1.302.2.2 (colored) to branchpoint 1.302 (colored) next main 1.303 (colored) to selected 1.231.2.3 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.310.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:25 2014 UTC (12 months, 3 weeks ago) by tls
Branch: tls-earlyentropy
Changes since 1.310: +159 -296 lines
Diff to previous 1.310 (colored) next main 1.311 (colored) to selected 1.231.2.3 (colored)

Rebase.

Revision 1.319 / (download) - annotate - [select for diffs], Mon Jun 16 00:33:39 2014 UTC (14 months, 2 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-base, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7
Branch point for: nick-nhusb
Changes since 1.318: +3 -3 lines
Diff to previous 1.318 (colored) to selected 1.231.2.3 (colored)

Add 3rd argument to pktq_create to pass sc

It will be used to pass bridge sc for bridge_forward softint.

ok rmind@

Revision 1.318 / (download) - annotate - [select for diffs], Thu Jun 5 23:48:16 2014 UTC (14 months, 3 weeks ago) by rmind
Branch: MAIN
Changes since 1.317: +91 -63 lines
Diff to previous 1.317 (colored) to selected 1.231.2.3 (colored)

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

Discussed on tech-net.

Revision 1.317 / (download) - annotate - [select for diffs], Fri May 30 01:39:03 2014 UTC (15 months ago) by christos
Branch: MAIN
Changes since 1.316: +9 -6 lines
Diff to previous 1.316 (colored) to selected 1.231.2.3 (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.316 / (download) - annotate - [select for diffs], Thu May 29 23:02:48 2014 UTC (15 months ago) by rmind
Branch: MAIN
Changes since 1.315: +3 -5 lines
Diff to previous 1.315 (colored) to selected 1.231.2.3 (colored)

Make IGMP and multicast group management code MP-safe.  Use a read-write
lock to protect the hash table of multicast address records; also, make it
private and eliminate some macros.  In the long term, the lookup path ought
to be optimised.

Revision 1.315 / (download) - annotate - [select for diffs], Wed May 28 19:19:33 2014 UTC (15 months ago) by christos
Branch: MAIN
Changes since 1.314: +4 -4 lines
Diff to previous 1.314 (colored) to selected 1.231.2.3 (colored)

CID 12164{49,51}: Remove bogus ifp == NULL checks; if ifp was really NULL,
we would have been dead a few lines before the tests.

Revision 1.314 / (download) - annotate - [select for diffs], Fri May 23 23:38:48 2014 UTC (15 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.313: +21 -25 lines
Diff to previous 1.313 (colored) to selected 1.231.2.3 (colored)

ip_input(), ip_savecontrol(): cache m->m_pkthdr.rcvif in a variable.

Revision 1.313 / (download) - annotate - [select for diffs], Fri May 23 19:35:24 2014 UTC (15 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.312: +4 -3 lines
Diff to previous 1.312 (colored) to selected 1.231.2.3 (colored)

Make ip_forward() static, there is no need to expose it.

Revision 1.312 / (download) - annotate - [select for diffs], Fri May 23 19:27:48 2014 UTC (15 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.311: +4 -3 lines
Diff to previous 1.311 (colored) to selected 1.231.2.3 (colored)

Make ip_input() static, there is no need to expose it.

Revision 1.311 / (download) - annotate - [select for diffs], Thu May 22 22:01:12 2014 UTC (15 months, 1 week ago) by rmind
Branch: MAIN
Changes since 1.310: +47 -211 lines
Diff to previous 1.310 (colored) to selected 1.231.2.3 (colored)

- Add in_init() and move some functions, variables and sysctls into in.c
  where they belong to.  Make some functions and variables static.
- ip_input.c: reduce some #ifdefs, cleanup a little.
- Move some sysctls into ip_flow.c as they belong there.

No functional change.

Revision 1.296.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:41:09 2014 UTC (15 months, 1 week ago) by yamt
Branch: yamt-pagecache
Changes since 1.296.2.3: +43 -160 lines
Diff to previous 1.296.2.3 (colored) to branchpoint 1.296 (colored) next main 1.297 (colored) to selected 1.231.2.3 (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.307.2.3 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (15 months, 2 weeks ago) by rmind
Branch: rmind-smpnet
Changes since 1.307.2.2: +0 -5 lines
Diff to previous 1.307.2.2 (colored) next main 1.308 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.310 / (download) - annotate - [select for diffs], Wed Mar 19 08:27:21 2014 UTC (17 months, 2 weeks ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Changes since 1.309: +3 -3 lines
Diff to previous 1.309 (colored) to selected 1.231.2.3 (colored)

Remove ipflow_prune and replace with ipflow_reap. ok rmind@

Revision 1.309 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:12 2014 UTC (18 months ago) by pooka
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.308: +2 -7 lines
Diff to previous 1.308 (colored) to selected 1.231.2.3 (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.307.2.2 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:36 2013 UTC (2 years ago) by rmind
Branch: rmind-smpnet
Changes since 1.307.2.1: +6 -17 lines
Diff to previous 1.307.2.1 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.307.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (2 years, 1 month ago) by rmind
Branch: rmind-smpnet
Changes since 1.307: +52 -217 lines
Diff to previous 1.307 (colored) to selected 1.231.2.3 (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.308 / (download) - annotate - [select for diffs], Sat Jun 29 21:06:58 2013 UTC (2 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.307: +6 -17 lines
Diff to previous 1.307 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.307 / (download) - annotate - [select for diffs], Thu Jun 27 20:17:36 2013 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Branch point for: rmind-smpnet
Changes since 1.306: +4 -4 lines
Diff to previous 1.306 (colored) to selected 1.231.2.3 (colored)

flip src/dst

Revision 1.306 / (download) - annotate - [select for diffs], Thu Jun 27 19:38:16 2013 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.305: +20 -2 lines
Diff to previous 1.305 (colored) to selected 1.231.2.3 (colored)

implement IP_PKTINFO and IP_RECVPKTINFO.

Revision 1.302.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:25 2013 UTC (2 years, 2 months ago) by tls
Branch: tls-maxphys
Changes since 1.302.2.1: +20 -139 lines
Diff to previous 1.302.2.1 (colored) to branchpoint 1.302 (colored) to selected 1.231.2.3 (colored)

resync from head

Revision 1.305 / (download) - annotate - [select for diffs], Sat Jun 8 13:50:22 2013 UTC (2 years, 2 months ago) by rmind
Branch: MAIN
Changes since 1.304: +16 -135 lines
Diff to previous 1.304 (colored) to selected 1.231.2.3 (colored)

Split IPsec code in ip_input() and ip_forward() into the separate routines
ipsec4_input() and ipsec4_forward().  Tested by christos@.

Revision 1.304 / (download) - annotate - [select for diffs], Wed Jun 5 19:01:26 2013 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.303: +13 -13 lines
Diff to previous 1.303 (colored) to selected 1.231.2.3 (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.302.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:30:04 2013 UTC (2 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.302: +9 -3 lines
Diff to previous 1.302 (colored) to selected 1.231.2.3 (colored)

resync with head

Revision 1.296.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:49 2013 UTC (2 years, 7 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.296.2.2: +9 -3 lines
Diff to previous 1.296.2.2 (colored) to branchpoint 1.296 (colored) to selected 1.231.2.3 (colored)

sync with (a bit old) head

Revision 1.303 / (download) - annotate - [select for diffs], Thu Nov 29 02:07:20 2012 UTC (2 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, khorben-n900, agc-symver-base, agc-symver
Changes since 1.302: +9 -3 lines
Diff to previous 1.302 (colored) to selected 1.231.2.3 (colored)

Add a new sysctl to mark ports as reserved, so that they are not used in
the anonymous or reserved port allocation.

Revision 1.296.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:46 2012 UTC (2 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.296.2.1: +25 -3 lines
Diff to previous 1.296.2.1 (colored) to branchpoint 1.296 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.302 / (download) - annotate - [select for diffs], Mon Jun 25 15:28:39 2012 UTC (3 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.301: +9 -9 lines
Diff to previous 1.301 (colored) to selected 1.231.2.3 (colored)

rename rfc6056 -> portalgo, requested by yamt

Revision 1.301 / (download) - annotate - [select for diffs], Fri Jun 22 14:54:35 2012 UTC (3 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.300: +24 -2 lines
Diff to previous 1.300 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.300 / (download) - annotate - [select for diffs], Sat Jun 2 21:36:47 2012 UTC (3 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.299: +3 -3 lines
Diff to previous 1.299 (colored) to selected 1.231.2.3 (colored)

Add some pre-processor magic to verify that the type of the data item
  passed to sysctl_createv() actually matches the declared type for
  the item itself.
In the places where the caller specifies a function and a structure
  address (typically the 'softc') an explicit (void *) cast is now needed.
Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c
  sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting
  AcpiGbl_EnableAmlDebugObject.
(mostly passing the address of a uint64_t when typed as CTLTYPE_INT).
I've test built quite a few kernels, but there may be some unfixed MD
  fallout. Most likely passing &char[] to char *.
Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.

Revision 1.296.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:40 2012 UTC (3 years, 4 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.296: +6 -40 lines
Diff to previous 1.296 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.296.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:43 2012 UTC (3 years, 4 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296.6.1: +5 -39 lines
Diff to previous 1.296.6.1 (colored) to branchpoint 1.296 (colored) next main 1.297 (colored) to selected 1.231.2.3 (colored)

sync to latest -current.

Revision 1.299 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:39 2012 UTC (3 years, 5 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.298: +5 -39 lines
Diff to previous 1.298 (colored) to selected 1.231.2.3 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.296.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:39 2012 UTC (3 years, 6 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.296: +11 -11 lines
Diff to previous 1.296 (colored) to selected 1.231.2.3 (colored)

merge to -current.

Revision 1.298 / (download) - annotate - [select for diffs], Mon Jan 9 14:31:22 2012 UTC (3 years, 7 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.297: +3 -3 lines
Diff to previous 1.297 (colored) to selected 1.231.2.3 (colored)

check against NULL

Revision 1.297 / (download) - annotate - [select for diffs], Mon Dec 19 11:59:56 2011 UTC (3 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.296: +10 -10 lines
Diff to previous 1.296 (colored) to selected 1.231.2.3 (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.296 / (download) - annotate - [select for diffs], Wed Aug 31 18:31:03 2011 UTC (4 years ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.295: +3 -3 lines
Diff to previous 1.295 (colored) to selected 1.231.2.3 (colored)

NULL does not need a cast

Revision 1.293.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:55 2011 UTC (4 years, 2 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.293: +20 -5 lines
Diff to previous 1.293 (colored) next main 1.294 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.284.4.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:07 2011 UTC (4 years, 3 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.284.4.3: +17 -0 lines
Diff to previous 1.284.4.3 (colored) to branchpoint 1.284 (colored) next main 1.285 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.295 / (download) - annotate - [select for diffs], Tue May 3 17:44:31 2011 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.294: +19 -2 lines
Diff to previous 1.294 (colored) to selected 1.231.2.3 (colored)

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

Contributed by Coyote Point Systems, Inc.

Revision 1.284.4.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:14 2011 UTC (4 years, 4 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.284.4.2: +1 -3 lines
Diff to previous 1.284.4.2 (colored) to branchpoint 1.284 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.294 / (download) - annotate - [select for diffs], Thu Apr 14 20:32:04 2011 UTC (4 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.293: +3 -5 lines
Diff to previous 1.293 (colored) to selected 1.231.2.3 (colored)

In ipintr(), don't overwrite ipintrq.ifq_maxlen with IFQ_MAXLEN.

Initialize ipintrq.ifq_maxlen using IFQ_MAXLEN directly instead of using
the global ipqmaxlen.  Get rid of the global ipqmaxlen.

Now it works again to override the maximum IP queue length with, for
example, sysctl -w net.inet.ip.ifq.maxlen=5.

Revision 1.284.4.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:57 2011 UTC (4 years, 5 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.284.4.1: +22 -594 lines
Diff to previous 1.284.4.1 (colored) to branchpoint 1.284 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.275.4.1.8.2 / (download) - annotate - [select for diffs], Fri Jan 7 03:17:44 2011 UTC (4 years, 7 months ago) by matt
Branch: matt-nb5-pq3
Changes since 1.275.4.1.8.1: +2 -4 lines
Diff to previous 1.275.4.1.8.1 (colored) to branchpoint 1.275.4.1 (colored) next main 1.276 (colored) to selected 1.231.2.3 (colored)

Backout an inadverdant change.

Revision 1.275.4.1.8.1 / (download) - annotate - [select for diffs], Fri Jan 7 03:16:14 2011 UTC (4 years, 7 months ago) by matt
Branch: matt-nb5-pq3
Changes since 1.275.4.1: +4 -2 lines
Diff to previous 1.275.4.1 (colored) to selected 1.231.2.3 (colored)

If using hardware checksum offload and the packet can't be h/w checksumed
(for whatever reason, some hardware is stupid) allow the driver to calculate
the checksum instead.

Revision 1.293 / (download) - annotate - [select for diffs], Mon Dec 13 14:18:50 2010 UTC (4 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.292: +2 -4 lines
Diff to previous 1.292 (colored) to selected 1.231.2.3 (colored)

Back out rev that shouldn't have been committed.

Revision 1.292 / (download) - annotate - [select for diffs], Sat Dec 11 22:37:46 2010 UTC (4 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.291: +4 -2 lines
Diff to previous 1.291 (colored) to selected 1.231.2.3 (colored)

Add routines to calculate a checkesum if the driver concludes that the
h/w can't do it.

Revision 1.284.2.3 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:49 2010 UTC (4 years, 9 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.284.2.2: +10 -46 lines
Diff to previous 1.284.2.2 (colored) to branchpoint 1.284 (colored) next main 1.285 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.291 / (download) - annotate - [select for diffs], Fri Nov 5 01:35:57 2010 UTC (4 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.290: +4 -3 lines
Diff to previous 1.290 (colored) to selected 1.231.2.3 (colored)

ip_randomid: make mechanism MP-safe and more modular.

OK matt@

Revision 1.290 / (download) - annotate - [select for diffs], Fri Nov 5 00:21:51 2010 UTC (4 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.289: +8 -45 lines
Diff to previous 1.289 (colored) to selected 1.231.2.3 (colored)

ip_reass_packet: finish abstraction; some clean-up.
Discussed some time ago with matt@.

Revision 1.284.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:46 2010 UTC (5 years ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.284.2.1: +41 -577 lines
Diff to previous 1.284.2.1 (colored) to branchpoint 1.284 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.268.2.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:56 2010 UTC (5 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268.2.5: +64 -582 lines
Diff to previous 1.268.2.5 (colored) to branchpoint 1.268 (colored) next main 1.269 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.289 / (download) - annotate - [select for diffs], Mon Jul 19 14:09:45 2010 UTC (5 years, 1 month ago) by rmind
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.288: +29 -53 lines
Diff to previous 1.288 (colored) to selected 1.231.2.3 (colored)

Abstract IP reassembly into single generic routine - ip_reass_packet().
Make struct ipq private and struct ipqent not visible to userland.
Push ip_len adjustment into reassembly layer.

OK matt@

Revision 1.288 / (download) - annotate - [select for diffs], Tue Jul 13 22:16:10 2010 UTC (5 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.287: +30 -541 lines
Diff to previous 1.287 (colored) to selected 1.231.2.3 (colored)

Split-off IPv4 re-assembly mechanism into a separate module.  Abstract
into ip_reass_init(), ip_reass_lookup(), etc (note: abstraction is not
yet complete).  No functional changes to the actual mechanism.

OK matt@

Revision 1.287 / (download) - annotate - [select for diffs], Fri Jul 9 18:42:46 2010 UTC (5 years, 1 month ago) by rmind
Branch: MAIN
Changes since 1.286: +35 -36 lines
Diff to previous 1.286 (colored) to selected 1.231.2.3 (colored)

ip_input: move lookup for fragment queue a little bit further.  OK matt@.

Revision 1.284.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:02 2010 UTC (5 years, 3 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.284: +23 -5 lines
Diff to previous 1.284 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.284.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:21 2010 UTC (5 years, 4 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.284: +23 -5 lines
Diff to previous 1.284 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.286 / (download) - annotate - [select for diffs], Thu Apr 1 01:23:32 2010 UTC (5 years, 5 months ago) by tls
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.285: +23 -7 lines
Diff to previous 1.285 (colored) to selected 1.231.2.3 (colored)

As suggested by at least 3 different people (the guilty parties know who
they are) avoid repeated kernel_lock/unlock by using an intrq on the stack.

About 5%-10% better from run to run, on my *very* simpleminded test.  Can't
possibly be worse.

Revision 1.285 / (download) - annotate - [select for diffs], Wed Mar 31 07:31:15 2010 UTC (5 years, 5 months ago) by tls
Branch: MAIN
Changes since 1.284: +4 -2 lines
Diff to previous 1.284 (colored) to selected 1.231.2.3 (colored)

Don't hold kernel lock across call to ip_input() -- it blocked *all*
hardware interrupts for the length of time it took for all dequeued
packets to flow up the stack (on multiprocessors only).  Initial testing
shows performance impact is minimal -- since this temporary fix actually
means taking/releasing the kernel lock per-packet, that seems
acceptable.

Holding the kernel lock across the ip_input() call duplicated the
exclusion intended to be provided by the socket locks/softnet lock
(same lock, for INET/INET6 sockets) and could mask serious bugs.  Several
hours' testing didn't turn any up but I'd be surprised if some don't now
appear.

Damon Permezel noticed the problem.  Temporary fix suggested by matt@.

Revision 1.268.2.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:28 2010 UTC (5 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268.2.4: +8 -3 lines
Diff to previous 1.268.2.4 (colored) to branchpoint 1.268 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.284 / (download) - annotate - [select for diffs], Wed Sep 16 15:23:05 2009 UTC (5 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211, jym-xensuspend-nbase
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.283: +8 -3 lines
Diff to previous 1.283 (colored) to selected 1.231.2.3 (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.268.2.4 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:24 2009 UTC (6 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268.2.3: +6 -6 lines
Diff to previous 1.268.2.3 (colored) to branchpoint 1.268 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.278.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:48 2009 UTC (6 years, 1 month ago) by jym
Branch: jym-xensuspend
Changes since 1.278.2.1: +12 -6 lines
Diff to previous 1.278.2.1 (colored) to branchpoint 1.278 (colored) next main 1.279 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.268.2.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:25 2009 UTC (6 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268.2.2: +8 -2 lines
Diff to previous 1.268.2.2 (colored) to branchpoint 1.268 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.283 / (download) - annotate - [select for diffs], Fri Jul 17 18:09:25 2009 UTC (6 years, 1 month ago) by minskim
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, jymxensuspend-base
Changes since 1.282: +6 -6 lines
Diff to previous 1.282 (colored) to selected 1.231.2.3 (colored)

Delete trailing whitespace.

Revision 1.282 / (download) - annotate - [select for diffs], Thu Jul 16 04:09:51 2009 UTC (6 years, 1 month ago) by minskim
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6
Changes since 1.281: +8 -2 lines
Diff to previous 1.281 (colored) to selected 1.231.2.3 (colored)

Add the IP_RECVTTL option support.

If the IP_RECVTTL option is enabled on a SOCK_DGRAM socket, the
recvmsg(2) call will return the TTL of the received datagram.  The
msg_control field in the msghdr structure points to a buffer that
contains a cmsghdr structure followed by the TTL value.

Modeled after FreeBSD implementation.

Revision 1.278.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:28 2009 UTC (6 years, 3 months ago) by jym
Branch: jym-xensuspend
Changes since 1.278: +10 -9 lines
Diff to previous 1.278 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

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

Revision 1.268.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:17 2009 UTC (6 years, 4 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268.2.1: +69 -33 lines
Diff to previous 1.268.2.1 (colored) to branchpoint 1.268 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.275.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:22 2009 UTC (6 years, 4 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.275.2.1: +10 -9 lines
Diff to previous 1.275.2.1 (colored) to branchpoint 1.275 (colored) next main 1.276 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.281 / (download) - annotate - [select for diffs], Sat Apr 18 14:58:05 2009 UTC (6 years, 4 months ago) by tsutsui
Branch: MAIN
CVS Tags: 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.280: +6 -6 lines
Diff to previous 1.280 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.280 / (download) - annotate - [select for diffs], Wed Apr 15 20:44:25 2009 UTC (6 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.279: +6 -5 lines
Diff to previous 1.279 (colored) to selected 1.231.2.3 (colored)

Remove a few KAUTH_GENERIC_ISSUSER in favor of more descriptive
alternatives.

Discussed on tech-kern:

	http://mail-index.netbsd.org/tech-kern/2009/04/11/msg004798.html

Input from ad@, christos@, dyoung@, tsutsui@.

Okay ad@.

Revision 1.279 / (download) - annotate - [select for diffs], Wed Mar 18 17:06:52 2009 UTC (6 years, 5 months ago) by cegger
Branch: MAIN
Changes since 1.278: +6 -6 lines
Diff to previous 1.278 (colored) to selected 1.231.2.3 (colored)

bcopy -> memcpy

Revision 1.275.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:13 2009 UTC (6 years, 7 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.275: +25 -7 lines
Diff to previous 1.275 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.278 / (download) - annotate - [select for diffs], Mon Jan 19 02:27:57 2009 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.277: +21 -3 lines
Diff to previous 1.277 (colored) to selected 1.231.2.3 (colored)

Provide compatibility to the old timeval SCM_TIMESTAMP messages.

Revision 1.262.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:32 2009 UTC (6 years, 7 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.262.6.4: +4 -4 lines
Diff to previous 1.262.6.4 (colored) to branchpoint 1.262 (colored) next main 1.263 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.277 / (download) - annotate - [select for diffs], Wed Dec 17 20:51:37 2008 UTC (6 years, 8 months ago) by cegger
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.276: +5 -6 lines
Diff to previous 1.276 (colored) to selected 1.231.2.3 (colored)

kill MALLOC and FREE macros.

Revision 1.272.6.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:27 2008 UTC (6 years, 8 months ago) by haad
Branch: haad-dm
Changes since 1.272.6.1: +3 -2 lines
Diff to previous 1.272.6.1 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.275.4.1 / (download) - annotate - [select for diffs], Tue Nov 25 04:04:38 2008 UTC (6 years, 9 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-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
Branch point for: matt-nb5-pq3
Changes since 1.275: +3 -2 lines
Diff to previous 1.275 (colored) next main 1.276 (colored) to selected 1.231.2.3 (colored)

Pull up following revision(s) (requested by rmind in ticket #119):
	sys/netinet/ip_input.c: revision 1.276
ip_input: fix an IPQ "lock" leak.  (hi <matt>!)

Revision 1.276 / (download) - annotate - [select for diffs], Sun Nov 23 19:52:38 2008 UTC (6 years, 9 months ago) by rmind
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.275: +3 -2 lines
Diff to previous 1.275 (colored) to selected 1.231.2.3 (colored)

ip_input: fix an IPQ "lock" leak.  (hi <matt>!)

Revision 1.272.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:46 2008 UTC (6 years, 10 months ago) by haad
Branch: haad-dm
Changes since 1.272: +38 -21 lines
Diff to previous 1.272 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.272.2.2 / (download) - annotate - [select for diffs], Fri Oct 10 22:35:43 2008 UTC (6 years, 10 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.272.2.1: +9 -6 lines
Diff to previous 1.272.2.1 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.262.6.4 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:33 2008 UTC (6 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.262.6.3: +7 -4 lines
Diff to previous 1.262.6.3 (colored) to branchpoint 1.262 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.275 / (download) - annotate - [select for diffs], Sat Oct 4 00:09:34 2008 UTC (6 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.274: +9 -6 lines
Diff to previous 1.274 (colored) to selected 1.231.2.3 (colored)

POOL_INIT -> pool_init

Revision 1.262.6.3 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:58 2008 UTC (6 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.262.6.2: +29 -15 lines
Diff to previous 1.262.6.2 (colored) to branchpoint 1.262 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.272.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:01 2008 UTC (6 years, 11 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.272: +31 -17 lines
Diff to previous 1.272 (colored) to selected 1.231.2.3 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.274 / (download) - annotate - [select for diffs], Fri Sep 5 13:39:12 2008 UTC (6 years, 11 months ago) by seanb
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.273: +7 -7 lines
Diff to previous 1.273 (colored) to selected 1.231.2.3 (colored)

Wrong route being consulted in one place
in ip_forward() after change to rtcache_*().
Restore previous behaviour.

Revision 1.273 / (download) - annotate - [select for diffs], Wed Aug 20 18:35:20 2008 UTC (7 years ago) by matt
Branch: MAIN
Changes since 1.272: +26 -12 lines
Diff to previous 1.272 (colored) to selected 1.231.2.3 (colored)

Make the sysctl routines take out softnet_lock before dealing with
any data structures.

Change inet6ctlerrmap and zeroin6_addr to const.

Revision 1.236.4.2 / (download) - annotate - [select for diffs], Tue Jun 3 20:47:41 2008 UTC (7 years, 3 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.236.4.1: +17 -16 lines
Diff to previous 1.236.4.1 (colored) to branchpoint 1.236 (colored) next main 1.237 (colored) to selected 1.231.2.3 (colored)

Sync with netbsd-4.

Revision 1.262.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:24 2008 UTC (7 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.262.6.1: +91 -65 lines
Diff to previous 1.262.6.1 (colored) to branchpoint 1.262 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.266.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:29 2008 UTC (7 years, 3 months ago) by yamt
Branch: yamt-pf42
Changes since 1.266: +35 -55 lines
Diff to previous 1.266 (colored) next main 1.267 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.268.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:41 2008 UTC (7 years, 3 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.268: +9 -22 lines
Diff to previous 1.268 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.272 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (7 years, 3 months ago) by ad
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.271: +6 -6 lines
Diff to previous 1.271 (colored) to selected 1.231.2.3 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.271 / (download) - annotate - [select for diffs], Sun May 4 07:22:14 2008 UTC (7 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.270: +3 -8 lines
Diff to previous 1.270 (colored) to selected 1.231.2.3 (colored)

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

PR kern/38577

Revision 1.270 / (download) - annotate - [select for diffs], Fri May 2 13:40:32 2008 UTC (7 years, 4 months ago) by ad
Branch: MAIN
Changes since 1.269: +4 -5 lines
Diff to previous 1.269 (colored) to selected 1.231.2.3 (colored)

PR kern/38497 Out of memory allocating ksiginfo

Work around: don't acquire softnet_lock in protocol drain routines.

Revision 1.269 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:09 2008 UTC (7 years, 4 months ago) by martin
Branch: MAIN
Changes since 1.268: +2 -9 lines
Diff to previous 1.268 (colored) to selected 1.231.2.3 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.268 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:37 2008 UTC (7 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.267: +27 -15 lines
Diff to previous 1.267 (colored) to selected 1.231.2.3 (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.267 / (download) - annotate - [select for diffs], Wed Apr 23 06:09:04 2008 UTC (7 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.266: +10 -29 lines
Diff to previous 1.266 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.266 / (download) - annotate - [select for diffs], Sat Apr 12 05:58:22 2008 UTC (7 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Changes since 1.265: +85 -39 lines
Diff to previous 1.265 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.265 / (download) - annotate - [select for diffs], Wed Apr 9 05:14:20 2008 UTC (7 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.264: +3 -3 lines
Diff to previous 1.264 (colored) to selected 1.231.2.3 (colored)

- ipflow is not used outside ip_flow.c; move its definition there.
- Make ipflow_reap() private to ip_flow.c, and introduce ipflow_prune()
  for external callers to use (avoids returning an ipflow * that is never
  actually used anyway).

Revision 1.264 / (download) - annotate - [select for diffs], Mon Apr 7 06:31:28 2008 UTC (7 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.263: +37 -37 lines
Diff to previous 1.263 (colored) to selected 1.231.2.3 (colored)

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

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

Revision 1.262.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:08 2008 UTC (7 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.262: +17 -16 lines
Diff to previous 1.262 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.236.2.2 / (download) - annotate - [select for diffs], Sun Mar 30 15:27:49 2008 UTC (7 years, 5 months ago) by jdc
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.236.2.1: +17 -16 lines
Diff to previous 1.236.2.1 (colored) to branchpoint 1.236 (colored) next main 1.237 (colored) to selected 1.231.2.3 (colored)

Pull up revisions:
  src/sys/netinet/ip_input.c    1.263
  src/sys/netinet/tcp_subr.c    1.225
(requested by cube in ticket #1109).

- Make sure we send a reasonable fragment size when IPSEC is configured.
  Otherwise we end up sending a dubious "0" whenever we cannot find a
  proper association for the packet.
- Reset sack_newdata along with snd_nxt to avoid improper integer
  arithmetics that lead to sending data from an incorrect place in the
  stream, making it appear as corrupted.

Patch by Michael Van Elst, based on an analysis by Michael for the IPSEC
stuff and I for the SACK issue.

Revision 1.236.2.1.4.1 / (download) - annotate - [select for diffs], Sun Mar 30 15:26:11 2008 UTC (7 years, 5 months ago) by jdc
Branch: netbsd-4-0
CVS Tags: netbsd-4-0-1-RELEASE
Changes since 1.236.2.1: +17 -16 lines
Diff to previous 1.236.2.1 (colored) next main 1.236.2.2 (colored) to selected 1.231.2.3 (colored)

Pull up revisions:
  src/sys/netinet/ip_input.c    1.263
  src/sys/netinet/tcp_subr.c    1.225
(requested by cube in ticket #1109).

- Make sure we send a reasonable fragment size when IPSEC is configured.
  Otherwise we end up sending a dubious "0" whenever we cannot find a
  proper association for the packet.
- Reset sack_newdata along with snd_nxt to avoid improper integer
  arithmetics that lead to sending data from an incorrect place in the
  stream, making it appear as corrupted.

Patch by Michael Van Elst, based on an analysis by Michael for the IPSEC
stuff and I for the SACK issue.

Revision 1.263 / (download) - annotate - [select for diffs], Thu Mar 27 00:18:56 2008 UTC (7 years, 5 months ago) by cube
Branch: MAIN
Changes since 1.262: +17 -16 lines
Diff to previous 1.262 (colored) to selected 1.231.2.3 (colored)

- Make sure we send a reasonable fragment size when IPSEC is configured.
  Otherwise we end up sending a dubious "0" whenever we cannot find a
  proper association for the packet.
- Reset sack_newdata along with snd_nxt to avoid improper integer
  arithmetics that lead to sending data from an incorrect place in the
  stream, making it appear as corrupted.

Patch by Michael Van Elst, based on an analysis by Michael for the IPSEC
stuff and I for the SACK issue.

Revision 1.251.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:06 2008 UTC (7 years, 5 months ago) by matt
Branch: matt-armv6
Changes since 1.251.2.2: +5 -4 lines
Diff to previous 1.251.2.2 (colored) next main 1.252 (colored) to selected 1.231.2.3 (colored)

sync with HEAD

Revision 1.254.4.4 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:08 2008 UTC (7 years, 6 months ago) by mjf
Branch: mjf-devfs
Changes since 1.254.4.3: +5 -4 lines
Diff to previous 1.254.4.3 (colored) to branchpoint 1.254 (colored) next main 1.255 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.218.2.9 / (download) - annotate - [select for diffs], Mon Feb 11 15:00:04 2008 UTC (7 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.8: +3 -2 lines
Diff to previous 1.218.2.8 (colored) next main 1.219 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.262 / (download) - annotate - [select for diffs], Wed Feb 6 03:20:51 2008 UTC (7 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.261: +3 -2 lines
Diff to previous 1.261 (colored) to selected 1.231.2.3 (colored)

Add a new ip_id generation scheme based on a Fisher-Yates shuffle over a
sliding window.  XXX replace use of arc4random RSN.

Revision 1.218.2.8 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:16 2008 UTC (7 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.7: +33 -13 lines
Diff to previous 1.218.2.7 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.256.6.2 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:32 2008 UTC (7 years, 7 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.256.6.1: +2 -2 lines
Diff to previous 1.256.6.1 (colored) to branchpoint 1.256 (colored) next main 1.257 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.261 / (download) - annotate - [select for diffs], Mon Jan 14 04:19:09 2008 UTC (7 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.260: +4 -4 lines
Diff to previous 1.260 (colored) to selected 1.231.2.3 (colored)

Use rtcache_validate() instead of rtcache_getrt().  Shorten staircase
in in_losing().

Revision 1.251.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:27 2008 UTC (7 years, 7 months ago) by matt
Branch: matt-armv6
Changes since 1.251.2.1: +42 -20 lines
Diff to previous 1.251.2.1 (colored) to selected 1.231.2.3 (colored)

sync with HEAD

Revision 1.256.6.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:57:21 2008 UTC (7 years, 8 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.256: +33 -13 lines
Diff to previous 1.256 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.254.4.3 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:29 2007 UTC (7 years, 8 months ago) by mjf
Branch: mjf-devfs
Changes since 1.254.4.2: +33 -13 lines
Diff to previous 1.254.4.2 (colored) to branchpoint 1.254 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.256.2.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:39 2007 UTC (7 years, 8 months ago) by ad
Branch: vmlocking2
Changes since 1.256: +33 -13 lines
Diff to previous 1.256 (colored) next main 1.257 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.260 / (download) - annotate - [select for diffs], Sat Dec 22 15:41:11 2007 UTC (7 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base
Changes since 1.259: +14 -5 lines
Diff to previous 1.259 (colored) to selected 1.231.2.3 (colored)

Fix offset calculation.
Make sure that all frags use the same TOS.

Revision 1.259 / (download) - annotate - [select for diffs], Fri Dec 21 23:49:09 2007 UTC (7 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.258: +5 -4 lines
Diff to previous 1.258 (colored) to selected 1.231.2.3 (colored)

Also make sure the first is at 68 bytes long.

Revision 1.258 / (download) - annotate - [select for diffs], Fri Dec 21 18:58:55 2007 UTC (7 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.257: +13 -3 lines
Diff to previous 1.257 (colored) to selected 1.231.2.3 (colored)

Prevent TCP blind data attacks by not allowing non-initial fragments to
start at less than 68 bytes (minimal fragment size).

Revision 1.257 / (download) - annotate - [select for diffs], Thu Dec 20 19:53:32 2007 UTC (7 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.256: +10 -10 lines
Diff to previous 1.256 (colored) to selected 1.231.2.3 (colored)

Poison struct route->ro_rt uses in the kernel by changing the name
to _ro_rt.  Use rtcache_getrt() to access a route cache's struct
rtentry *.

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

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

Make ND6_HINT an inline, lowercase subroutine, nd6_hint.

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

Revision 1.254.4.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:13 2007 UTC (7 years, 8 months ago) by mjf
Branch: mjf-devfs
Changes since 1.254.4.1: +11 -8 lines
Diff to previous 1.254.4.1 (colored) to branchpoint 1.254 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.218.2.7 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:29 2007 UTC (7 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.6: +11 -8 lines
Diff to previous 1.218.2.6 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.250.4.6 / (download) - annotate - [select for diffs], Tue Nov 27 19:38:57 2007 UTC (7 years, 9 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.250.4.5: +11 -8 lines
Diff to previous 1.250.4.5 (colored) to branchpoint 1.250 (colored) next main 1.251 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD. amd64 Xen support needs testing.

Revision 1.256 / (download) - annotate - [select for diffs], Mon Nov 26 08:40:46 2007 UTC (7 years, 9 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: vmlocking2, bouyer-xeni386
Changes since 1.255: +11 -8 lines
Diff to previous 1.255 (colored) to selected 1.231.2.3 (colored)

inetctlerrmap: use designated initializer.

Revision 1.254.4.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:49:10 2007 UTC (7 years, 9 months ago) by mjf
Branch: mjf-devfs
Changes since 1.254: +2 -3 lines
Diff to previous 1.254 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.218.2.6 / (download) - annotate - [select for diffs], Thu Nov 15 11:45:07 2007 UTC (7 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.5: +2 -3 lines
Diff to previous 1.218.2.5 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:51 2007 UTC (7 years, 9 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.254: +2 -3 lines
Diff to previous 1.254 (colored) next main 1.255 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.250.4.5 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:31 2007 UTC (7 years, 9 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.250.4.4: +2 -3 lines
Diff to previous 1.250.4.4 (colored) to branchpoint 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.255 / (download) - annotate - [select for diffs], Fri Nov 9 06:59:33 2007 UTC (7 years, 9 months ago) by kefren
Branch: MAIN
CVS Tags: bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.254: +2 -3 lines
Diff to previous 1.254 (colored) to selected 1.231.2.3 (colored)

Don't MCLAIM in ipintr() because we do it anyway in ip_input()

Revision 1.251.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:33:49 2007 UTC (7 years, 9 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.251: +7 -31 lines
Diff to previous 1.251 (colored) to selected 1.231.2.3 (colored)

sync with HEAD

Revision 1.218.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:08 2007 UTC (7 years, 10 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.4: +2 -29 lines
Diff to previous 1.218.2.4 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.245.2.5 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:50 2007 UTC (7 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.245.2.4: +7 -31 lines
Diff to previous 1.245.2.4 (colored) next main 1.246 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.253.2.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:29:02 2007 UTC (7 years, 10 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.253: +2 -28 lines
Diff to previous 1.253 (colored) next main 1.254 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.250.4.4 / (download) - annotate - [select for diffs], Thu Oct 4 15:44:52 2007 UTC (7 years, 11 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.250.4.3: +2 -28 lines
Diff to previous 1.250.4.3 (colored) to branchpoint 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.254 / (download) - annotate - [select for diffs], Tue Oct 2 20:35:04 2007 UTC (7 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.253: +2 -28 lines
Diff to previous 1.253 (colored) to selected 1.231.2.3 (colored)

Delete the unused second argument to ip_stripoptions(), move it
closer to its single caller in if_eon.c, try to move fewer bytes
by moving the IP header forward instead of moving the tail of the
mbuf backward, and use m_adj(9) instead of fiddling directly with
mbuf data members.

Revision 1.250.4.3 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:19 2007 UTC (7 years, 11 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.250.4.2: +2 -3 lines
Diff to previous 1.250.4.2 (colored) to branchpoint 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.236.4.1 / (download) - annotate - [select for diffs], Sun Sep 23 21:36:35 2007 UTC (7 years, 11 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.236: +2 -3 lines
Diff to previous 1.236 (colored) to selected 1.231.2.3 (colored)

Sync with somewhat-recent netbsd-4.

Revision 1.212.2.2.4.1 / (download) - annotate - [select for diffs], Mon Sep 17 20:16:58 2007 UTC (7 years, 11 months ago) by bouyer
Branch: netbsd-3-1
Changes since 1.212.2.2: +0 -1 lines
Diff to previous 1.212.2.2 (colored) next main 1.212.2.3 (colored) to selected 1.231.2.3 (colored)

Pull up following revision(s) (requested by degroote in ticket #1840):
	sys/netinet/ip_input.c: revision 1.253
In some FAST_IPSEC, spl level is not restored correctly. Fix that.
Spotted by Wolfgang Stukenbrock in pr/36800

Revision 1.212.2.2.2.1 / (download) - annotate - [select for diffs], Mon Sep 17 20:15:36 2007 UTC (7 years, 11 months ago) by bouyer
Branch: netbsd-3-0
Changes since 1.212.2.2: +0 -1 lines
Diff to previous 1.212.2.2 (colored) next main 1.212.2.3 (colored) to selected 1.231.2.3 (colored)

Pull up following revision(s) (requested by degroote in ticket #1840):
	sys/netinet/ip_input.c: revision 1.253
In some FAST_IPSEC, spl level is not restored correctly. Fix that.
Spotted by Wolfgang Stukenbrock in pr/36800

Revision 1.212.2.3 / (download) - annotate - [select for diffs], Mon Sep 17 20:14:21 2007 UTC (7 years, 11 months ago) by bouyer
Branch: netbsd-3
Changes since 1.212.2.2: +0 -1 lines
Diff to previous 1.212.2.2 (colored) to branchpoint 1.212 (colored) next main 1.213 (colored) to selected 1.231.2.3 (colored)

Pull up following revision(s) (requested by degroote in ticket #1840):
	sys/netinet/ip_input.c: revision 1.253
In some FAST_IPSEC, spl level is not restored correctly. Fix that.
Spotted by Wolfgang Stukenbrock in pr/36800

Revision 1.236.2.1 / (download) - annotate - [select for diffs], Sun Sep 16 15:34:59 2007 UTC (7 years, 11 months ago) by xtraeme
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Changes since 1.236: +2 -3 lines
Diff to previous 1.236 (colored) to selected 1.231.2.3 (colored)

Pull up following revision(s) (requested by degroote in ticket #881):
	sys/netinet/ip_input.c: revision 1.253
	sys/netinet6/ip6_input.c: revision 1.110

In some FAST_IPSEC, spl level is not restored correctly. Fix that.
Spotted by Wolfgang Stukenbrock in pr/36800

Revision 1.253 / (download) - annotate - [select for diffs], Tue Sep 11 14:18:09 2007 UTC (7 years, 11 months ago) by degroote
Branch: MAIN
CVS Tags: yamt-x86pmap-base
Branch point for: yamt-x86pmap
Changes since 1.252: +2 -3 lines
Diff to previous 1.252 (colored) to selected 1.231.2.3 (colored)

In some FAST_IPSEC, spl level is not restored correctly. Fix that.

Spotted by Wolfgang Stukenbrock in pr/36800

Revision 1.250.4.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:04 2007 UTC (8 years ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.250.4.1: +7 -4 lines
Diff to previous 1.250.4.1 (colored) to branchpoint 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.218.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:42:58 2007 UTC (8 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.3: +92 -76 lines
Diff to previous 1.218.2.3 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.249.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:45 2007 UTC (8 years ago) by skrll
Branch: nick-csl-alignment
Changes since 1.249.2.1: +7 -4 lines
Diff to previous 1.249.2.1 (colored) to branchpoint 1.249 (colored) next main 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.252 / (download) - annotate - [select for diffs], Thu Aug 30 02:17:37 2007 UTC (8 years ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.251: +7 -4 lines
Diff to previous 1.251 (colored) to selected 1.231.2.3 (colored)

Use malloc(9) for sockaddrs instead of pool(9), and remove dom_sa_pool
and dom_sa_len members from struct domain.  Pools of fixed-size
objects are too rigid for sockaddr_dls, whose size can vary over
a wide range.

Return sockaddr_dl to its "historical" size.  Now that I'm using
malloc(9) instead of pool(9) to allocate sockaddr_dl, I can create
a sockaddr_dl of any size in the kernel, so expanding sockaddr_dl
is useless.

Avoid using sizeof(struct sockaddr_dl) in the kernel.

Introduce sockaddr_dl_alloc() for allocating & initializing an
arbitrary sockaddr_dl on the heap.

Add an argument, the sockaddr length, to sockaddr_alloc(),
sockaddr_copy(), and sockaddr_dl_setaddr().

Constify: LLADDR() -> CLLADDR().

Where the kernel overwrites LLADDR(), use sockaddr_dl_setaddr(),
instead.  Used properly, sockaddr_dl_setaddr() will not overrun
the end of the sockaddr.

Revision 1.245.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:59 2007 UTC (8 years ago) by ad
Branch: vmlocking
Changes since 1.245.2.3: +7 -13 lines
Diff to previous 1.245.2.3 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.250.4.1 / (download) - annotate - [select for diffs], Thu Aug 16 11:03:46 2007 UTC (8 years ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.250: +5 -9 lines
Diff to previous 1.250 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.249.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:45 2007 UTC (8 years ago) by skrll
Branch: nick-csl-alignment
Changes since 1.249: +7 -13 lines
Diff to previous 1.249 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.251 / (download) - annotate - [select for diffs], Fri Aug 10 22:46:16 2007 UTC (8 years ago) by dyoung
Branch: MAIN
Branch point for: matt-armv6
Changes since 1.250: +5 -9 lines
Diff to previous 1.250 (colored) to selected 1.231.2.3 (colored)

Use sockaddr_dl_init().

Revision 1.250.6.2 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:56 2007 UTC (8 years, 1 month ago) by dyoung
Branch: matt-mips64
Changes since 1.250.6.1: +2401 -0 lines
Diff to previous 1.250.6.1 (colored) to branchpoint 1.250 (colored) next main 1.251 (colored) to selected 1.231.2.3 (colored)

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

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

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

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

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

Cosmetic:

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

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

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

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

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

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

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

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

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

Revision 1.250.6.1, Thu Jul 19 20:48:55 2007 UTC (8 years, 1 month ago) by dyoung
Branch: matt-mips64
Changes since 1.250: +0 -2401 lines
FILE REMOVED

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

Revision 1.250 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:55 2007 UTC (8 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.249: +4 -6 lines
Diff to previous 1.249 (colored) to selected 1.231.2.3 (colored)

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

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

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

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

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

Cosmetic:

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

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

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

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

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

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

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

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

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

Revision 1.246.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:23 2007 UTC (8 years, 1 month ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.246: +61 -41 lines
Diff to previous 1.246 (colored) next main 1.247 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.245.2.3 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:46 2007 UTC (8 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.245.2.2: +22 -37 lines
Diff to previous 1.245.2.2 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.242.2.5 / (download) - annotate - [select for diffs], Mon May 7 10:55:59 2007 UTC (8 years, 3 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.242.2.4: +22 -37 lines
Diff to previous 1.242.2.4 (colored) to branchpoint 1.242 (colored) next main 1.243 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.249 / (download) - annotate - [select for diffs], Wed May 2 20:40:25 2007 UTC (8 years, 4 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.248: +22 -37 lines
Diff to previous 1.248 (colored) to selected 1.231.2.3 (colored)

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

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

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

DETAILS

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

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

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

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

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

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

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

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

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

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

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

Revision 1.242.2.4 / (download) - annotate - [select for diffs], Sun Apr 15 16:04:00 2007 UTC (8 years, 4 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.242.2.3: +39 -3 lines
Diff to previous 1.242.2.3 (colored) to branchpoint 1.242 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.245.2.2 / (download) - annotate - [select for diffs], Tue Apr 10 13:26:49 2007 UTC (8 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.245.2.1: +41 -6 lines
Diff to previous 1.245.2.1 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.246.4.1 / (download) - annotate - [select for diffs], Thu Mar 29 19:28:00 2007 UTC (8 years, 5 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.246: +41 -6 lines
Diff to previous 1.246 (colored) next main 1.247 (colored) to selected 1.231.2.3 (colored)

Pullup to -current

Revision 1.248 / (download) - annotate - [select for diffs], Sun Mar 25 20:12:20 2007 UTC (8 years, 5 months ago) by liamjfoy
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.247: +39 -3 lines
Diff to previous 1.247 (colored) to selected 1.231.2.3 (colored)

Add net.inet.ip.hashsize to control the IPv4 fast forward hash table size.

Revision 1.242.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:10 2007 UTC (8 years, 5 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.242.2.2: +8 -7 lines
Diff to previous 1.242.2.2 (colored) to branchpoint 1.242 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.247 / (download) - annotate - [select for diffs], Sat Mar 24 00:27:58 2007 UTC (8 years, 5 months ago) by liamjfoy
Branch: MAIN
Changes since 1.246: +4 -5 lines
Diff to previous 1.246 (colored) to selected 1.231.2.3 (colored)

Don't call ip*flow_reap if we're just looking up maxflows

Revision 1.245.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:02 2007 UTC (8 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.245: +6 -4 lines
Diff to previous 1.245 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.246 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:36 2007 UTC (8 years, 5 months ago) by ad
Branch: MAIN
Branch point for: reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.245: +6 -4 lines
Diff to previous 1.245 (colored) to selected 1.231.2.3 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.242.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:37 2007 UTC (8 years, 5 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.242.2.1: +22 -25 lines
Diff to previous 1.242.2.1 (colored) to branchpoint 1.242 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.245 / (download) - annotate - [select for diffs], Mon Mar 5 00:50:53 2007 UTC (8 years, 6 months ago) by liamjfoy
Branch: MAIN
Branch point for: vmlocking
Changes since 1.244: +2 -5 lines
Diff to previous 1.244 (colored) to selected 1.231.2.3 (colored)

Move ipflow_slowtimo from ip_slowtimo and into in_proto.c

ok matt@

Revision 1.244 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:21 2007 UTC (8 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.243: +22 -22 lines
Diff to previous 1.243 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.242.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:55 2007 UTC (8 years, 6 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.242: +10 -10 lines
Diff to previous 1.242 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.218.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:44 2007 UTC (8 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.2: +12 -12 lines
Diff to previous 1.218.2.2 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.243 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:11 2007 UTC (8 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.242: +10 -10 lines
Diff to previous 1.242 (colored) to selected 1.231.2.3 (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.229.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:43 2007 UTC (8 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.229.2.2: +4 -4 lines
Diff to previous 1.229.2.2 (colored) to branchpoint 1.229 (colored) next main 1.230 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.242 / (download) - annotate - [select for diffs], Mon Jan 29 05:48:56 2007 UTC (8 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.241: +4 -4 lines
Diff to previous 1.241 (colored) to selected 1.231.2.3 (colored)

Cosmetic: remove extraneous, non-KNF parentheses.  Change a
sizeof(type) to a sizeof(*ptr) so the correctness of the statement
is correct "at a glance" (or so I hope).

Revision 1.229.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:14 2007 UTC (8 years, 7 months ago) by ad
Branch: newlock2
Changes since 1.229.2.1: +24 -25 lines
Diff to previous 1.229.2.1 (colored) to branchpoint 1.229 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.218.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:33 2006 UTC (8 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218.2.1: +74 -32 lines
Diff to previous 1.218.2.1 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.241 / (download) - annotate - [select for diffs], Fri Dec 22 05:34:02 2006 UTC (8 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.240: +3 -3 lines
Diff to previous 1.240 (colored) to selected 1.231.2.3 (colored)

ipintr(): check if the queue is empty before looping. Hardly a giant
win, but removed 30% of splnet() calls in one local test.

Revision 1.231.2.3 / (download) - annotate - [selected], Mon Dec 18 11:42:21 2006 UTC (8 years, 8 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.231.2.2: +18 -15 lines
Diff to previous 1.231.2.2 (colored) to branchpoint 1.231 (colored) next main 1.232 (colored)

sync with head.

Revision 1.240 / (download) - annotate - [select for diffs], Fri Dec 15 21:18:53 2006 UTC (8 years, 8 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.239: +18 -15 lines
Diff to previous 1.239 (colored) to selected 1.231.2.3 (colored)

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

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

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

Revision 1.231.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:10 2006 UTC (8 years, 8 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.231.2.1: +18 -22 lines
Diff to previous 1.231.2.1 (colored) to branchpoint 1.231 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.239 / (download) - annotate - [select for diffs], Sat Dec 9 05:33:04 2006 UTC (8 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.238: +12 -16 lines
Diff to previous 1.238 (colored) to selected 1.231.2.3 (colored)

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

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

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

Here are the details:

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

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

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

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

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

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

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

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

In domain initializers, use .dom_xxx tags.

KNF here and there.

Revision 1.238 / (download) - annotate - [select for diffs], Wed Dec 6 00:39:56 2006 UTC (8 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.237: +5 -5 lines
Diff to previous 1.237 (colored) to selected 1.231.2.3 (colored)

KNF.

Revision 1.237 / (download) - annotate - [select for diffs], Wed Dec 6 00:38:16 2006 UTC (8 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.236: +4 -4 lines
Diff to previous 1.236 (colored) to selected 1.231.2.3 (colored)

KNF.

Revision 1.229.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:36 2006 UTC (8 years, 9 months ago) by ad
Branch: newlock2
Changes since 1.229: +23 -7 lines
Diff to previous 1.229 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.236 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:45 2006 UTC (8 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-4-base, netbsd-4-0-RC1
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.235: +3 -3 lines
Diff to previous 1.235 (colored) to selected 1.231.2.3 (colored)

__unused removal on arguments; approved by core.

Revision 1.231.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:28 2006 UTC (8 years, 10 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.231: +22 -8 lines
Diff to previous 1.231 (colored) to selected 1.231.2.3 (colored)

sync with head

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

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

Revision 1.234 / (download) - annotate - [select for diffs], Tue Oct 10 21:49:14 2006 UTC (8 years, 10 months ago) by dogcow
Branch: MAIN
Changes since 1.233: +4 -4 lines
Diff to previous 1.233 (colored) to selected 1.231.2.3 (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.233 / (download) - annotate - [select for diffs], Thu Oct 5 17:35:19 2006 UTC (8 years, 10 months ago) by tls
Branch: MAIN
Changes since 1.232: +18 -4 lines
Diff to previous 1.232 (colored) to selected 1.231.2.3 (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.232 / (download) - annotate - [select for diffs], Tue Sep 19 21:42:30 2006 UTC (8 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.231: +3 -3 lines
Diff to previous 1.231 (colored) to selected 1.231.2.3 (colored)

Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

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

Update documentation.

Revision 1.224.2.5 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:55 2006 UTC (8 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.224.2.4: +5 -3 lines
Diff to previous 1.224.2.4 (colored) to branchpoint 1.224 (colored) next main 1.225 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Sep 13 10:07:42 2006 UTC (8 years, 11 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.230: +3 -3 lines
Diff to previous 1.230 (colored) to selected 1.231.2.3 (colored)

Don't use KAUTH_RESULT_* where it's not applicable.
Prompted by yamt@.

Revision 1.223.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:47 2006 UTC (8 years, 11 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.223: +39 -12 lines
Diff to previous 1.223 (colored) next main 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.230 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:58 2006 UTC (8 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.229: +5 -3 lines
Diff to previous 1.229 (colored) to selected 1.231.2.3 (colored)

First take at security model abstraction.

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

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

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

- Update all relevant documentation.

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

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

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

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

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

	http://kauth.linbsd.org/kauthwiki

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

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

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

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

Relevant mailing list threads:

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

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

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

Happy birthday Randi! :)

Revision 1.224.2.4 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:42 2006 UTC (9 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.224.2.3: +6 -3 lines
Diff to previous 1.224.2.3 (colored) to branchpoint 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.229 / (download) - annotate - [select for diffs], Wed Aug 30 18:55:09 2006 UTC (9 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: newlock2
Changes since 1.228: +6 -3 lines
Diff to previous 1.228 (colored) to selected 1.231.2.3 (colored)

fix initializer

Revision 1.224.2.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:33 2006 UTC (9 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.224.2.2: +28 -4 lines
Diff to previous 1.224.2.2 (colored) to branchpoint 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.228 / (download) - annotate - [select for diffs], Sun Jul 30 17:38:19 2006 UTC (9 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.227: +28 -4 lines
Diff to previous 1.227 (colored) to selected 1.231.2.3 (colored)

ugh.. more stuff that's overdue and should not be in 4.0: remove the
sysctl(9) flags CTLFLAG_READONLY[12]. luckily they're not documented
so it's only half regression.

only two knobs used them; proc.curproc.corename (check added in the
existing handler; its CTLFLAG_ANYWRITE, yay) and net.inet.ip.forwsrcrt,
that got its own handler now too.

Revision 1.224.2.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:53:58 2006 UTC (9 years, 2 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.224.2.1: +3 -3 lines
Diff to previous 1.224.2.1 (colored) to branchpoint 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.218.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:01 2006 UTC (9 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.218: +29 -32 lines
Diff to previous 1.218 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.226.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:09:48 2006 UTC (9 years, 2 months ago) by chap
Branch: chap-midi
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored) next main 1.227 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.227 / (download) - annotate - [select for diffs], Wed Jun 7 22:34:01 2006 UTC (9 years, 2 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.223.6.3 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:47 2006 UTC (9 years, 3 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.223.6.2: +3 -3 lines
Diff to previous 1.223.6.2 (colored) next main 1.224 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.224.6.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:45 2006 UTC (9 years, 3 months ago) by tron
Branch: peter-altq
Changes since 1.224: +4 -4 lines
Diff to previous 1.224 (colored) next main 1.225 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.224.2.1 / (download) - annotate - [select for diffs], Wed May 24 10:59:03 2006 UTC (9 years, 3 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.224: +4 -4 lines
Diff to previous 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.224.4.2 / (download) - annotate - [select for diffs], Thu May 11 23:31:09 2006 UTC (9 years, 3 months ago) by elad
Branch: elad-kernelauth
Changes since 1.224.4.1: +3 -3 lines
Diff to previous 1.224.4.1 (colored) to branchpoint 1.224 (colored) next main 1.225 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.226 / (download) - annotate - [select for diffs], Mon May 8 18:50:12 2006 UTC (9 years, 3 months ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.225: +3 -3 lines
Diff to previous 1.225 (colored) to selected 1.231.2.3 (colored)

#if -> #ifdef

ok christos

Revision 1.223.6.2 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:10 2006 UTC (9 years, 4 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.223.6.1: +7 -7 lines
Diff to previous 1.223.6.1 (colored) to selected 1.231.2.3 (colored)

Sync with head.

Revision 1.224.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 04:46:11 2006 UTC (9 years, 4 months ago) by elad
Branch: elad-kernelauth
Changes since 1.224: +3 -3 lines
Diff to previous 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.225 / (download) - annotate - [select for diffs], Sat Apr 15 02:24:12 2006 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.224: +3 -3 lines
Diff to previous 1.224 (colored) to selected 1.231.2.3 (colored)

Coverity CID 1134: Protect against NULL deref.

Revision 1.223.2.1 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:47 2006 UTC (9 years, 6 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.223: +6 -6 lines
Diff to previous 1.223 (colored) next main 1.224 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.224 / (download) - annotate - [select for diffs], Sat Feb 18 17:47:07 2006 UTC (9 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.223: +6 -6 lines
Diff to previous 1.223 (colored) to selected 1.231.2.3 (colored)

Print the source and destination IP in ip_forward's DIAGNOSTIC code
with inet_ntoa, making it more human friendly.

From Liam J. Foy in private mail.

Revision 1.223.6.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:18:52 2006 UTC (9 years, 6 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.223: +3 -3 lines
Diff to previous 1.223 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.223 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:09 2005 UTC (9 years, 8 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.222: +6 -6 lines
Diff to previous 1.222 (colored) to selected 1.231.2.3 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.222 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:57 2005 UTC (9 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.221: +2 -2 lines
Diff to previous 1.221 (colored) to selected 1.231.2.3 (colored)

merge ktrace-lwp.

Revision 1.169.2.8 / (download) - annotate - [select for diffs], Thu Nov 10 14:11:07 2005 UTC (9 years, 9 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.7: +20 -23 lines
Diff to previous 1.169.2.7 (colored) next main 1.170 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD. Here we go again...

Revision 1.219.2.2 / (download) - annotate - [select for diffs], Wed Nov 2 11:58:11 2005 UTC (9 years, 10 months ago) by yamt
Branch: yamt-vop
Changes since 1.219.2.1: +4 -3 lines
Diff to previous 1.219.2.1 (colored) to branchpoint 1.219 (colored) next main 1.220 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.221 / (download) - annotate - [select for diffs], Tue Nov 1 21:21:09 2005 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Changes since 1.220: +4 -3 lines
Diff to previous 1.220 (colored) to selected 1.231.2.3 (colored)

Don't decrement the ttl, until we are sure that we can forward this packet.
Before if there was no route, we would call icmp_error with a datagram
packet that has an incorrect checksum. (From Liam Foy)

Revision 1.219.2.1 / (download) - annotate - [select for diffs], Wed Oct 26 08:32:51 2005 UTC (9 years, 10 months ago) by yamt
Branch: yamt-vop
Changes since 1.219: +9 -20 lines
Diff to previous 1.219 (colored) to selected 1.231.2.3 (colored)

sync with head

Revision 1.220 / (download) - annotate - [select for diffs], Sun Oct 23 18:38:53 2005 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base2, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.219: +9 -20 lines
Diff to previous 1.219 (colored) to selected 1.231.2.3 (colored)

No need to pass an interface when only the mtu is needed. From OpenBSD via
Liam Foy.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Aug 5 09:21:26 2005 UTC (10 years ago) by elad
Branch: MAIN
CVS Tags: yamt-vop-base
Branch point for: yamt-vop
Changes since 1.218: +9 -2 lines
Diff to previous 1.218 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.218 / (download) - annotate - [select for diffs], Tue Jun 28 19:38:58 2005 UTC (10 years, 2 months ago) by seanb
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.217: +3 -3 lines
Diff to previous 1.217 (colored) to selected 1.231.2.3 (colored)

- Return ICMP_UNREACH_NET when no route found as per
  section 4.3.3.1 of rfc1812.

Revision 1.217 / (download) - annotate - [select for diffs], Thu Jun 9 02:19:59 2005 UTC (10 years, 2 months ago) by atatat
Branch: MAIN
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored) to selected 1.231.2.3 (colored)

Properly fix the constipated lossage wrt -Wcast-qual and the sysctl
code.  I know it's not the prettiest code, but it seems to work rather
well in spite of itself.

Revision 1.216 / (download) - annotate - [select for diffs], Wed Jun 1 09:45:15 2005 UTC (10 years, 3 months ago) by blymn
Branch: MAIN
Changes since 1.215: +3 -3 lines
Diff to previous 1.215 (colored) to selected 1.231.2.3 (colored)

Unconstify rnode to prevent compile error when GATEWAY option set.

Revision 1.212.2.2 / (download) - annotate - [select for diffs], Fri May 6 08:40:14 2005 UTC (10 years, 3 months ago) by tron
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-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
Branch point for: netbsd-3-1, netbsd-3-0
Changes since 1.212.2.1: +0 -1 lines
Diff to previous 1.212.2.1 (colored) to branchpoint 1.212 (colored) to selected 1.231.2.3 (colored)

Pull up revision 1.214 (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.208.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:33 2005 UTC (10 years, 4 months ago) by kent
Branch: kent-audio2
Changes since 1.208: +39 -53 lines
Diff to previous 1.208 (colored) next main 1.209 (colored) to selected 1.231.2.3 (colored)

sync with -current

Revision 1.215 / (download) - annotate - [select for diffs], Fri Apr 29 10:39:09 2005 UTC (10 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.214: +3 -2 lines
Diff to previous 1.214 (colored) to selected 1.231.2.3 (colored)

move decl of inetsw to its own header to avoid array of incomplete type.
found by gcc4.  reported by Adam Ciarcinski.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Apr 18 21:50:25 2005 UTC (10 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.213: +2 -3 lines
Diff to previous 1.213 (colored) to selected 1.231.2.3 (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.212.2.1 / (download) - annotate - [select for diffs], Mon Apr 4 17:15:44 2005 UTC (10 years, 5 months ago) by tron
Branch: netbsd-3
Changes since 1.212: +3 -2 lines
Diff to previous 1.212 (colored) to selected 1.231.2.3 (colored)

Pull up revision 1.213 (requested by yamt in ticket #88):
ip_reass: clear stale csum_flags.

Revision 1.169.2.7 / (download) - annotate - [select for diffs], Fri Apr 1 14:31:50 2005 UTC (10 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.6: +3 -2 lines
Diff to previous 1.169.2.6 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.213 / (download) - annotate - [select for diffs], Tue Mar 29 09:37:08 2005 UTC (10 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.212: +3 -2 lines
Diff to previous 1.212 (colored) to selected 1.231.2.3 (colored)

ip_reass: clear stale csum_flags.

Revision 1.209.2.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:38 2005 UTC (10 years, 5 months ago) by yamt
Branch: yamt-km
Changes since 1.209.2.1: +15 -15 lines
Diff to previous 1.209.2.1 (colored) to branchpoint 1.209 (colored) next main 1.210 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.169.2.6 / (download) - annotate - [select for diffs], Fri Mar 4 16:53:29 2005 UTC (10 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.5: +15 -15 lines
Diff to previous 1.169.2.5 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.212 / (download) - annotate - [select for diffs], Sat Feb 26 22:45:12 2005 UTC (10 years, 6 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.211: +15 -15 lines
Diff to previous 1.211 (colored) to selected 1.231.2.3 (colored)

nuke trailing whitespace

Revision 1.209.2.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:54 2005 UTC (10 years, 6 months ago) by yamt
Branch: yamt-km
Changes since 1.209: +24 -39 lines
Diff to previous 1.209 (colored) to selected 1.231.2.3 (colored)

sync with head.

Revision 1.169.2.5 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:48 2005 UTC (10 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.4: +25 -40 lines
Diff to previous 1.169.2.4 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.211 / (download) - annotate - [select for diffs], Thu Feb 3 22:56:42 2005 UTC (10 years, 6 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.210: +18 -33 lines
Diff to previous 1.210 (colored) to selected 1.231.2.3 (colored)

ANSIfy function declarations

Revision 1.210 / (download) - annotate - [select for diffs], Wed Feb 2 21:41:55 2005 UTC (10 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.209: +8 -8 lines
Diff to previous 1.209 (colored) to selected 1.231.2.3 (colored)

de-__P -- will ANSIfy .c files later.

Revision 1.209 / (download) - annotate - [select for diffs], Mon Jan 24 21:25:10 2005 UTC (10 years, 7 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base
Branch point for: yamt-km
Changes since 1.208: +3 -3 lines
Diff to previous 1.208 (colored) to selected 1.231.2.3 (colored)

Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Mon Jan 17 19:32:54 2005 UTC (10 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.3: +3 -3 lines
Diff to previous 1.169.2.3 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.208 / (download) - annotate - [select for diffs], Sun Dec 19 06:42:24 2004 UTC (10 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: kent-audio1-beforemerge
Branch point for: kent-audio2
Changes since 1.207: +3 -3 lines
Diff to previous 1.207 (colored) to selected 1.231.2.3 (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.169.2.3 / (download) - annotate - [select for diffs], Sat Dec 18 09:33:05 2004 UTC (10 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.2: +20 -6 lines
Diff to previous 1.169.2.2 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD.

Revision 1.207 / (download) - annotate - [select for diffs], Fri Dec 17 22:54:52 2004 UTC (10 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.206: +3 -3 lines
Diff to previous 1.206 (colored) to selected 1.231.2.3 (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.206 / (download) - annotate - [select for diffs], Wed Dec 15 04:25:19 2004 UTC (10 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.205: +20 -6 lines
Diff to previous 1.205 (colored) to selected 1.231.2.3 (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.169.2.2 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:14 2004 UTC (10 years, 10 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.169.2.1: +17 -3 lines
Diff to previous 1.169.2.1 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.205 / (download) - annotate - [select for diffs], Wed Oct 6 01:34:11 2004 UTC (10 years, 10 months ago) by darrenr
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.204: +16 -2 lines
Diff to previous 1.204 (colored) to selected 1.231.2.3 (colored)

Add a comment to document what setting "srcrt" is really on about in ipintr()

Revision 1.204 / (download) - annotate - [select for diffs], Wed Sep 29 21:28:34 2004 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.203: +3 -3 lines
Diff to previous 1.203 (colored) to selected 1.231.2.3 (colored)

PR/27081: Sean Boudreau: ip_input() bad csum count not incremented on sw csum

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:39 2004 UTC (11 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.169: +563 -238 lines
Diff to previous 1.169 (colored) to selected 1.231.2.3 (colored)

Sync with HEAD

Revision 1.197.2.1 / (download) - annotate - [select for diffs], Fri May 28 07:25:05 2004 UTC (11 years, 3 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.197: +54 -25 lines
Diff to previous 1.197 (colored) next main 1.198 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.203 / (download) - annotate - [select for diffs], Tue May 25 04:34:00 2004 UTC (11 years, 3 months ago) by atatat
Branch: MAIN
CVS Tags: BEFORE-IPF413
Changes since 1.202: +54 -25 lines
Diff to previous 1.202 (colored) to selected 1.231.2.3 (colored)

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

Revision 1.202 / (download) - annotate - [select for diffs], Sun May 2 05:02:53 2004 UTC (11 years, 4 months ago) by darrenr
Branch: MAIN
Changes since 1.201: +2 -17 lines
Diff to previous 1.201 (colored) to selected 1.231.2.3 (colored)

at line 543, we do a pullup here of hlen bytes into the mbuf,
so these later ones are superfluous.

Revision 1.201 / (download) - annotate - [select for diffs], Sat May 1 02:20:42 2004 UTC (11 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.200: +6 -8 lines
Diff to previous 1.200 (colored) to selected 1.231.2.3 (colored)

Use EVCNT_ATTACH_STATIC{,2}

Revision 1.200 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:42 2004 UTC (11 years, 4 months ago) by simonb
Branch: MAIN
Changes since 1.199: +4 -9 lines
Diff to previous 1.199 (colored) to selected 1.231.2.3 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.199 / (download) - annotate - [select for diffs], Thu Apr 22 01:01:41 2004 UTC (11 years, 4 months ago) by matt
Branch: MAIN
Changes since 1.198: +3 -4 lines
Diff to previous 1.198 (colored) to selected 1.231.2.3 (colored)

Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.198 / (download) - annotate - [select for diffs], Thu Apr 1 22:47:55 2004 UTC (11 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.197: +4 -4 lines
Diff to previous 1.197 (colored) to selected 1.231.2.3 (colored)

In ip_reass_ttl_descr, make i signed since it's compared to >= 0

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

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

Revision 1.196 / (download) - annotate - [select for diffs], Thu Jan 15 05:13:17 2004 UTC (11 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored) to selected 1.231.2.3 (colored)

correct typo in 1.94 -> 1.95.  pointed out by Shiva Shenoy

Revision 1.195 / (download) - annotate - [select for diffs], Sun Dec 14 01:14:24 2003 UTC (11 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.194: +7 -7 lines
Diff to previous 1.194 (colored) to selected 1.231.2.3 (colored)

Fix syntax errors in CHECK_NMBCLUSTER_PARAMS().

Revision 1.194 / (download) - annotate - [select for diffs], Sun Dec 14 00:09:24 2003 UTC (11 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.193: +144 -26 lines
Diff to previous 1.193 (colored) to selected 1.231.2.3 (colored)

Second part of hashed IP_reassembly changes:

When under pressure for mbufs or we have too many fragments in the IP
reassembly queue, drop half of all fragments. This multiplicative-drop
strategy ensures we return to a healthy state, even under borderline
denial-of-service from extremely lossy NFS-over-UDP peers.
The multiplicative-drop phase currently drops 50% of fragments, but
has pre-placed support for implementing drop-fractions other than 50%

The threshhold for the `drop-half' phase is the new variable,
ip_maxfrags which is calculated as nmbclusters/4.

ip_input.c now keeps ip_nmbclusters, a cached copy of nmbclusters.
Before using limits derived from nmbclusters, we check if nmbclusters
and ip_nmclusters are equal. If not, we recompute Ip parameters
derived from nmbclusters.  Based on a suggestion by Jason Thorpe.
ip_maxfrags is currently auto-recalcuated.

The counters ip_nfrags and ip_nfragpacketsr are now declared static
and uninitialized (bss), to discourage tampering with them.

Revision 1.193 / (download) - annotate - [select for diffs], Fri Dec 12 21:17:59 2003 UTC (11 years, 8 months ago) by scw
Branch: MAIN
Changes since 1.192: +23 -3 lines
Diff to previous 1.192 (colored) to selected 1.231.2.3 (colored)

Make fast-ipsec and ipflow (Fast Forwarding) interoperate.

The idea is that we only clear M_CANFASTFWD if an SPD exists
for the packet. Otherwise, it's safe to add a fast-forward
cache entry for the route.

To make this work properly, we invalidate the entire ipflow
cache if a fast-ipsec key is added or changed.

Revision 1.192 / (download) - annotate - [select for diffs], Mon Dec 8 02:23:27 2003 UTC (11 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.191: +24 -5 lines
Diff to previous 1.191 (colored) to selected 1.231.2.3 (colored)

Add new field ipq_nfrags to struct ipq. Maintain count of fragments
(fragments, not fragmented packets) in each queue entry.
Use ipq_nfrags to maintain a count of total fragments in reassembly queue.

Revision 1.191 / (download) - annotate - [select for diffs], Sun Dec 7 01:18:26 2003 UTC (11 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.190: +4 -4 lines
Diff to previous 1.190 (colored) to selected 1.231.2.3 (colored)

KNF: s/unsigned/u_int/, in a couple of places I missed.

Revision 1.190 / (download) - annotate - [select for diffs], Sat Dec 6 23:56:10 2003 UTC (11 years, 8 months ago) by jonathan
Branch: MAIN
Changes since 1.189: +63 -19 lines
Diff to previous 1.189 (colored) to selected 1.231.2.3 (colored)

Replace the single global IP reassembly list/listhead, with a
hashtable of list-heads. Independently re-invented, then reworked to
match similar code in FreeBSD.

Revision 1.189 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:24 2003 UTC (11 years, 9 months ago) by atatat
Branch: MAIN
Changes since 1.188: +173 -156 lines
Diff to previous 1.188 (colored) to selected 1.231.2.3 (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.188 / (download) - annotate - [select for diffs], Thu Dec 4 10:02:35 2003 UTC (11 years, 9 months ago) by scw
Branch: MAIN
Changes since 1.187: +3 -3 lines
Diff to previous 1.187 (colored) to selected 1.231.2.3 (colored)

ipflow (IP fast forwarding) is not compatible with FAST_IPSEC either.

XXX: The decision whether or not to fast forward should be made
XXX: dynamically. Using the current approach seriously reduces
XXX: routing performance on gateways with IPsec enabled.

Revision 1.187 / (download) - annotate - [select for diffs], Wed Nov 26 21:15:47 2003 UTC (11 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.186: +2 -8 lines
Diff to previous 1.186 (colored) to selected 1.231.2.3 (colored)

define RANDOM_IP_ID by default (unifdef -DRANDOM_IP_ID).
one use remains in sys/netipsec, which is kept for freebsd source code compat.

Revision 1.186 / (download) - annotate - [select for diffs], Mon Nov 24 20:54:59 2003 UTC (11 years, 9 months ago) by scw
Branch: MAIN
Changes since 1.185: +4 -2 lines
Diff to previous 1.185 (colored) to selected 1.231.2.3 (colored)

For FAST_IPSEC, ipfilter gets to see wire-format IPsec-encapsulated packets
only. Decapsulated packets bypass ipfilter. This mimics current behaviour
for Kame IPsec.

Revision 1.185 / (download) - annotate - [select for diffs], Wed Nov 19 22:40:55 2003 UTC (11 years, 9 months ago) by fvdl
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored) to selected 1.231.2.3 (colored)

Correct number of arguments to sysctl_rdint.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Nov 19 18:39:34 2003 UTC (11 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.183: +16 -2 lines
Diff to previous 1.183 (colored) to selected 1.231.2.3 (colored)

Patch back support for (badly) randomized IP ids, by request:

* Include "opt_inet.h" everywhere IP-ids are generated with ip_newid(),
  so the RANDOM_IP_ID option is visible. Also in ip_id(), to ensure
  the prototype for ip_randomid() is made visible.

* Add new sysctl to enable randomized IP-ids, provided the kernel was
  configured with RANDOM_IP_ID. (The sysctl defaults to zero, and is
  a read-only zero if RANDOM_IP_ID is not configured).

Note that the implementation of randomized IP ids is still defective,
and should not be enabled at all (even if configured) without
very careful deliberation. Caveat emptor.

Revision 1.183 / (download) - annotate - [select for diffs], Mon Nov 17 22:34:16 2003 UTC (11 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.182: +4 -2 lines
Diff to previous 1.182 (colored) to selected 1.231.2.3 (colored)

Diff to netinet/ip_input.c (restore ip_id, initialize) for ip_id fix:

Revert the (default) ip_id algorithm to the pre-randomid algorithm,
due to demonstrated low-period repeated IDs from the randomized IP_id
code.  Consensus is that the low-period repetition (much less than
2^15) is not suitable for general-purpose use.

Allocators of new IPv4 IDs should now call the function ip_newid().
Randomized IP_ids is now a config-time option, "options RANDOM_IP_ID".
ip_newid() can use ip_random-id()_IP_ID if and only if configured
with RANDOM_IP_ID. A sysctl knob should be  provided.

This API may be reworked in the near future to support linear ip_id
counters per (src,dst) IP-address pair.

Revision 1.182 / (download) - annotate - [select for diffs], Wed Nov 12 15:00:05 2003 UTC (11 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.181: +5 -5 lines
Diff to previous 1.181 (colored) to selected 1.231.2.3 (colored)

KNF

Revision 1.181 / (download) - annotate - [select for diffs], Tue Nov 11 20:25:26 2003 UTC (11 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.180: +5 -5 lines
Diff to previous 1.180 (colored) to selected 1.231.2.3 (colored)

Change global head-of-local-IP-address list from in_ifaddr to
in_ifaddrhead. Recent changes in struct names caused a namespace
collision in fast-ipsec, which are most cleanly fixed by using
"in_ifaddrhead" as the listhead name.

Revision 1.180 / (download) - annotate - [select for diffs], Mon Nov 10 20:03:29 2003 UTC (11 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.179: +10 -5 lines
Diff to previous 1.179 (colored) to selected 1.231.2.3 (colored)

Make per-protocol network input queue stats visible to userland via
sysctl. Add a protocol-independent sysctl handler to show the per-protocol
"struct ifq' statistics. Add IP(v4) specific call to the handler.
Other protocols can show their per-protocol input statistics by
allocating a sysclt node and calling sysctl_ifq() with their own struct ifq *.

As posted to tech-kern plus improvements/cleanup suggested by Andrew Brown.

Revision 1.179 / (download) - annotate - [select for diffs], Sun Sep 28 04:45:14 2003 UTC (11 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.178: +2 -12 lines
Diff to previous 1.178 (colored) to selected 1.231.2.3 (colored)