Deleted Added
sdiff udiff text old ( 98666 ) new ( 98849 )
full compact
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 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_output.c 8.3 (Berkeley) 1/21/94
34 * $FreeBSD: head/sys/netinet/ip_output.c 98666 2002-06-23 09:15:43Z luigi $
35 */
36
37#define _IP_VHL
38
39#include "opt_ipfw.h"
40#include "opt_ipdn.h"
41#include "opt_ipdivert.h"
42#include "opt_ipfilter.h"

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

912 * fragmented packets, then do it here.
913 */
914 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA &&
915 (ifp->if_hwassist & CSUM_IP_FRAGS) == 0) {
916 in_delayed_cksum(m);
917 m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
918 }
919
920 {
921 int mhlen, firstlen = len;
922 struct mbuf **mnext = &m->m_nextpkt;
923 int nfrags = 1;
924
925 /*
926 * Loop through length of segment after first fragment,
927 * make new header and copy data of each part and link onto chain.
928 */
929 m0 = m;
930 mhlen = sizeof (struct ip);
931 for (off = hlen + len; off < (u_short)ip->ip_len; off += len) {
932 MGETHDR(m, M_DONTWAIT, MT_HEADER);
933 if (m == 0) {
934 error = ENOBUFS;
935 ipstat.ips_odropped++;
936 goto sendorfree;
937 }
938 m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG;
939 m->m_data += max_linkhdr;

--- 1069 unchanged lines hidden ---