Deleted Added
full compact
ip_reass.c (107114) ip_reass.c (108466)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
34 * $FreeBSD: head/sys/netinet/ip_input.c 107114 2002-11-20 19:07:27Z luigi $
34 * $FreeBSD: head/sys/netinet/ip_input.c 108466 2002-12-30 20:22:40Z sam $
35 */
36
37#include "opt_bootp.h"
38#include "opt_ipfw.h"
39#include "opt_ipdn.h"
40#include "opt_ipdivert.h"
41#include "opt_ipfilter.h"
42#include "opt_ipstealth.h"

--- 1715 unchanged lines hidden (view full) ---

1758 * really we are wasting a lot of work here.
1759 *
1760 * We don't use m_copy() because it might return a reference
1761 * to a shared cluster. Both this function and ip_output()
1762 * assume exclusive access to the IP header in `m', so any
1763 * data in a cluster may change before we reach icmp_error().
1764 */
1765 MGET(mcopy, M_DONTWAIT, m->m_type);
35 */
36
37#include "opt_bootp.h"
38#include "opt_ipfw.h"
39#include "opt_ipdn.h"
40#include "opt_ipdivert.h"
41#include "opt_ipfilter.h"
42#include "opt_ipstealth.h"

--- 1715 unchanged lines hidden (view full) ---

1758 * really we are wasting a lot of work here.
1759 *
1760 * We don't use m_copy() because it might return a reference
1761 * to a shared cluster. Both this function and ip_output()
1762 * assume exclusive access to the IP header in `m', so any
1763 * data in a cluster may change before we reach icmp_error().
1764 */
1765 MGET(mcopy, M_DONTWAIT, m->m_type);
1766 if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_DONTWAIT)) {
1767 /*
1768 * It's probably ok if the pkthdr dup fails (because
1769 * the deep copy of the tag chain failed), but for now
1770 * be conservative and just discard the copy since
1771 * code below may some day want the tags.
1772 */
1773 m_free(mcopy);
1774 mcopy = NULL;
1775 }
1766 if (mcopy != NULL) {
1776 if (mcopy != NULL) {
1767 M_COPY_PKTHDR(mcopy, m);
1768 mcopy->m_len = imin((ip->ip_hl << 2) + 8,
1769 (int)ip->ip_len);
1770 m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
1771#ifdef MAC
1772 /*
1773 * XXXMAC: This will eventually become an explicit
1774 * labeling point.
1775 */

--- 378 unchanged lines hidden ---
1777 mcopy->m_len = imin((ip->ip_hl << 2) + 8,
1778 (int)ip->ip_len);
1779 m_copydata(m, 0, mcopy->m_len, mtod(mcopy, caddr_t));
1780#ifdef MAC
1781 /*
1782 * XXXMAC: This will eventually become an explicit
1783 * labeling point.
1784 */

--- 378 unchanged lines hidden ---