Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.130.2.11 retrieving revision 1.152 diff -u -p -r1.130.2.11 -r1.152 --- src/sys/netinet/ip_input.c 2002/08/01 02:46:47 1.130.2.11 +++ src/sys/netinet/ip_input.c 2002/06/09 16:33:40 1.152 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.130.2.11 2002/08/01 02:46:47 nathanw Exp $ */ +/* $NetBSD: ip_input.c,v 1.152 2002/06/09 16:33:40 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.130.2.11 2002/08/01 02:46:47 nathanw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.152 2002/06/09 16:33:40 itojun Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -168,7 +168,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_input.c,v #define IPALLOWSRCRT 1 /* allow source-routed packets */ #endif #ifndef IPMTUDISC -#define IPMTUDISC 1 +#define IPMTUDISC 0 #endif #ifndef IPMTUDISCTIMEOUT #define IPMTUDISCTIMEOUT (10 * 60) /* as per RFC 1191 */ @@ -420,24 +420,10 @@ ip_input(struct mbuf *m) if (TAILQ_FIRST(&in_ifaddr) == 0) goto bad; ipstat.ips_total++; - /* - * If the IP header is not aligned, slurp it up into a new - * mbuf with space for link headers, in the event we forward - * it. Otherwise, if it is aligned, make sure the entire - * base IP header is in the first mbuf of the chain. - */ - if (IP_HDR_ALIGNED_P(mtod(m, caddr_t)) == 0) { - if ((m = m_copyup(m, sizeof(struct ip), - (max_linkhdr + 3) & ~3)) == NULL) { - /* XXXJRT new stat, please */ - ipstat.ips_toosmall++; - return; - } - } else if (__predict_false(m->m_len < sizeof (struct ip))) { - if ((m = m_pullup(m, sizeof (struct ip))) == NULL) { - ipstat.ips_toosmall++; - return; - } + if (m->m_len < sizeof (struct ip) && + (m = m_pullup(m, sizeof (struct ip))) == 0) { + ipstat.ips_toosmall++; + return; } ip = mtod(m, struct ip *); if (ip->ip_v != IPVERSION) {