Commit Graph

13 Commits

Author SHA1 Message Date
Ralf Corsepius
d537b1d728 2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/netinet/ip_fw.c, libnetworking/netinet/ip_input.c:
	Misc. 64bit-compatibility fixes.
2010-06-15 11:33:51 +00:00
Ralf Corsepius
b25b88e732 Add HAVE_CONFIG_H support to let files receive configure defines. 2010-03-28 05:50:29 +00:00
Ralf Corsepius
b7cfd627b3 Add missing initializers. 2008-12-23 05:00:57 +00:00
Ralf Corsepius
b3f8c9e15b Include <errno.h> (POSIX,C99) instead of <sys/errno.h> (BSD'ism). 2008-12-22 07:47:28 +00:00
Ralf Corsepius
dd967330f8 Stop using old-style function definitions. 2008-09-01 06:36:17 +00:00
Ralf Corsepius
491f63a5b3 Further _IP_VHL removal preps. 2007-03-29 14:31:08 +00:00
Ralf Corsepius
f94e799ee9 Preps to eliminate _IP_VHL (Abandoned in FreeBSD). Misc mergers from upstream FreeBSD. 2007-03-29 07:50:03 +00:00
Ralf Corsepius
0b07d8724e 2007-03-28 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/netinet/ip_input.c: Eliminate __P().
	Change "int next" to "int32_t next" for 16bit targets.
2007-03-28 04:40:36 +00:00
Ralf Corsepius
5821bfd478 Cosmetics from FreeBSD. 2006-12-08 15:48:34 +00:00
Joel Sherrill
3fb7680513 2002-10-04 Jay Monkman <jtm@smoothsmoothie.com>
* netinet/in_cksum.c, netinet/ip_icmp.h, netinet/ip_input.c,
	netinet/tcp_input.c, netinet/tcp_subr.c, netinet/tcp_var.h,
	sys/queue.h: Address alignment requirements for the ARM.
2002-10-04 14:47:11 +00:00
Joel Sherrill
8379ada798 Patch from Eric Norum <eric@cls.usask.ca> to address the following problem
report from Philip A. Prindeville <philipp@zembu.com>:

        I was working on a device driver for a certain ethernet chipset that
    occassionally wraps in its buffer, and causes a resulting mbuf chain
    with only a few dozen bytes in the first mbuf of the chain.

        I wouldn't have thought this would be a problem, until I ran some
    stress tests that flooded the ethernet receiver with packets and
    started to get panics here:

       250
       251          if (m->m_pkthdr.len < sizeof(struct ip))
       252                  goto tooshort;
       253
       254  #ifdef  DIAGNOSTIC
       255          if (m->m_len < sizeof(struct ip))
       256                  panic("ipintr mbuf too short");
       257  #endif
       258
       259          if (m->m_len < sizeof (struct ip) &&
       260              (m = m_pullup(m, sizeof (struct ip))) == 0) {
       261                  ipstat.ips_toosmall++;
       262                  return;
       263          }
       264          ip = mtod(m, struct ip *);

    and the panic was at line 256.  But if I #undef'd DIAGNOSTICS,
    then the m_pullup() at line 260 does the right thing and the packet
    ends up being processed just fine.

    So I started wondering, (a) why was the test checking for
    something that apparently wasn't a fatal condition but rather
    one that is subsequently recovered from a couple of lines later
    and (b) why panic as a diagnostic "aid" from a recoverable
    condition rather than just (say) log a message to the console?

    All of this seems overly severe for no reason that is readily
    apparent to me.
1999-10-25 16:09:45 +00:00
Joel Sherrill
33679ec46e All warnings removed. 1998-08-21 13:04:55 +00:00
Joel Sherrill
39e6e65a2c Base files 1998-08-19 21:32:28 +00:00