Deleted Added
full compact
ip_output.c (119178) ip_output.c (119644)
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
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 119178 2003-08-20 14:46:40Z bms $
34 * $FreeBSD: head/sys/netinet/ip_output.c 119644 2003-09-01 05:55:37Z silby $
35 */
36
37#include "opt_ipfw.h"
38#include "opt_ipdn.h"
39#include "opt_ipdivert.h"
40#include "opt_ipfilter.h"
41#include "opt_ipsec.h"
42#include "opt_mac.h"

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

1025 }
1026
1027#ifdef IPSEC
1028 /* clean ipsec history once it goes out of the node */
1029 ipsec_delaux(m);
1030#endif
1031
1032#ifdef MBUF_STRESS_TEST
35 */
36
37#include "opt_ipfw.h"
38#include "opt_ipdn.h"
39#include "opt_ipdivert.h"
40#include "opt_ipfilter.h"
41#include "opt_ipsec.h"
42#include "opt_mac.h"

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

1025 }
1026
1027#ifdef IPSEC
1028 /* clean ipsec history once it goes out of the node */
1029 ipsec_delaux(m);
1030#endif
1031
1032#ifdef MBUF_STRESS_TEST
1033 if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size) {
1034 struct mbuf *m1, *m2;
1035 int length, tmp;
1036
1037 tmp = length = m->m_pkthdr.len;
1038
1039 while ((length -= mbuf_frag_size) >= 1) {
1040 m1 = m_split(m, length, M_DONTWAIT);
1041 if (m1 == NULL)
1042 break;
1043 m1->m_flags &= ~M_PKTHDR;
1044 m2 = m;
1045 while (m2->m_next != NULL)
1046 m2 = m2->m_next;
1047 m2->m_next = m1;
1048 m->m_pkthdr.len = tmp;
1049 }
1050 }
1033 if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size)
1034 m = m_fragment(m, M_DONTWAIT, mbuf_frag_size);
1051#endif
1052 error = (*ifp->if_output)(ifp, m,
1053 (struct sockaddr *)dst, ro->ro_rt);
1054 goto done;
1055 }
1056
1057 if (ip->ip_off & IP_DF) {
1058 error = EMSGSIZE;

--- 1229 unchanged lines hidden ---
1035#endif
1036 error = (*ifp->if_output)(ifp, m,
1037 (struct sockaddr *)dst, ro->ro_rt);
1038 goto done;
1039 }
1040
1041 if (ip->ip_off & IP_DF) {
1042 error = EMSGSIZE;

--- 1229 unchanged lines hidden ---