Home | History | Annotate | Download | only in netinet
History log of /src/sys/netinet/in4_cksum.c
RevisionDateAuthorComments
 1.20  30-Nov-2014  christos Only check that the offset < sizeof(struct ip) if nxt != 0, i.e. in the
tcp and udp cases. From kre.
XXX: pullup 7
 1.19  12-Mar-2013  christos branches: 1.19.12; 1.19.14;
- Do the size checks before calling the cpu checksum code. Otherwise you'll
crash there and not panic.
- Don't panic on short packets unless DIAGNOSTIC. In general we should try
to make the kernel survive errors...
 1.18  25-Apr-2011  yamt branches: 1.18.4; 1.18.14;
fix assertions
 1.17  12-Feb-2008  joerg branches: 1.17.32; 1.17.38;
Explicitly predict panic conditions as false.
 1.16  07-Feb-2008  joerg Reimplement in4_cksum to not copy data, but sum up directly.
Tested on sparc and m68k by martin@.
 1.15  25-Jan-2008  joerg Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
They call a backend function cpu_in_cksum after possibly
computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
The default implementation is moderate fast on most platforms
and provides a 32bit accumulator with 16bit addends for L32 platforms
and a 64bit accumulator with 32bit addends for L64 platforms.
It handles edge cases like very large mbuf chains (could happen with
native IPv6 in the future) and provides a good base for new native
implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
 1.14  04-Mar-2007  tsutsui branches: 1.14.16; 1.14.22;
Pass (char *) to mtod(9) on address calculation.
 1.13  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.12  11-Dec-2005  christos branches: 1.12.26;
merge ktrace-lwp.
 1.11  03-Feb-2005  perry branches: 1.11.6;
ANSIfy function prototypes. (Still have about 3/5ths of the C files in
netinet to go...)
 1.10  07-Aug-2003  agc branches: 1.10.8; 1.10.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9  29-Jul-2002  itojun branches: 1.9.6;
be friendly with gcc-3.1.1 -O2, which takes advantage of ANSI C
pointer aliasing rule (gcc optimization/7427). from tsubai, sync w/kame
 1.8  21-Dec-2001  itojun branches: 1.8.8;
whitespace. sync with kame
 1.7  13-Nov-2001  lukem add RCSIDs
 1.6  19-May-2001  thorpej branches: 1.6.2;
Brain'o in last. Pointed out by Steve Woodford <scw@netbsd.org>.
 1.5  19-May-2001  thorpej Don't compute psuedo header checksum if nxt == 0.
 1.4  30-Mar-2000  augustss branches: 1.4.6; 1.4.8;
Remove register declarations.
 1.3  15-Feb-2000  itojun make assumption on mbuf explicit (m->m_len >= sizeof (struct ip)).
 1.2  13-Dec-1999  itojun branches: 1.2.2;
sync IPv6 part with latest KAME tree. IPsec part is left unmodified
due to massive changes in KAME side.
- IPv6 output goes through nd6_output
- faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator
using heavily modified DNS servers
- per-interface statistics (required for IPv6 MIB)
- interface autoconfig is revisited
- udp input handling has a big change for mapped address support.
- introduce in4_cksum() for non-overwriting checksumming
- introduce m_pulldown()
- neighbor discovery cleanups/improvements
- netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland)
- IFA_STATS is fixed a bit (not tested)
- and more more more.

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

(sorry for jumbo commit, I can't separate this any more...)
 1.1  30-Nov-1999  itojun branches: 1.1.2;
file in4_cksum.c was initially added on branch kame.
 1.1.2.1  30-Nov-1999  itojun bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

synchronization to latest KAME will take place on HEAD branch soon.
 1.2.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.4.8.4  01-Aug-2002  nathanw Catch up to -current.
 1.4.8.3  08-Jan-2002  nathanw Catch up to -current.
 1.4.8.2  14-Nov-2001  nathanw Catch up to -current.
 1.4.8.1  21-Jun-2001  nathanw Catch up to -current.
 1.4.6.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.4.6.1  30-Mar-2000  bouyer file in4_cksum.c was added on branch thorpej_scsipi on 2000-11-20 18:10:22 +0000
 1.6.2.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.6.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.8.1  29-Aug-2002  gehenna catch up with -current.
 1.9.6.4  04-Feb-2005  skrll Sync with HEAD.
 1.9.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.9.6.1  03-Aug-2004  skrll Sync with HEAD
 1.10.10.1  12-Feb-2005  yamt sync with head.
 1.10.8.1  29-Apr-2005  kent sync with -current
 1.11.6.4  27-Feb-2008  yamt sync with head.
 1.11.6.3  11-Feb-2008  yamt sync with head.
 1.11.6.2  04-Feb-2008  yamt sync with head.
 1.11.6.1  03-Sep-2007  yamt sync with head.
 1.12.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.14.22.1  18-Feb-2008  mjf Sync with HEAD.
 1.14.16.1  23-Mar-2008  matt sync with HEAD
 1.17.38.1  06-Jun-2011  jruoho Sync with HEAD.
 1.17.32.1  31-May-2011  rmind sync with head
 1.18.14.2  03-Dec-2017  jdolecek update from HEAD
 1.18.14.1  23-Jun-2013  tls resync from head
 1.18.4.1  22-May-2014  yamt 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")
 1.19.14.1  06-Apr-2015  skrll Sync with HEAD
 1.19.12.1  01-Dec-2014  martin Pull up following revision(s) (requested by christos in ticket #281):
sys/netinet/in4_cksum.c: revision 1.20
Only check that the offset < sizeof(struct ip) if nxt != 0, i.e. in the
tcp and udp cases. From kre.

RSS XML Feed