ip_output.c (254523) | ip_output.c (254889) |
---|---|
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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 30 */ 31 32#include <sys/cdefs.h> | 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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/ip_output.c 254523 2013-08-19 13:27:32Z andre $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_output.c 254889 2013-08-25 21:54:41Z markj $"); |
34 35#include "opt_ipfw.h" 36#include "opt_ipsec.h" | 34 35#include "opt_ipfw.h" 36#include "opt_ipsec.h" |
37#include "opt_route.h" | 37#include "opt_kdtrace.h" |
38#include "opt_mbuf_stress_test.h" 39#include "opt_mpath.h" | 38#include "opt_mbuf_stress_test.h" 39#include "opt_mpath.h" |
40#include "opt_route.h" |
|
40#include "opt_sctp.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/kernel.h> 45#include <sys/malloc.h> 46#include <sys/mbuf.h> 47#include <sys/priv.h> 48#include <sys/proc.h> 49#include <sys/protosw.h> | 41#include "opt_sctp.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/kernel.h> 46#include <sys/malloc.h> 47#include <sys/mbuf.h> 48#include <sys/priv.h> 49#include <sys/proc.h> 50#include <sys/protosw.h> |
51#include <sys/sdt.h> |
|
50#include <sys/socket.h> 51#include <sys/socketvar.h> 52#include <sys/sysctl.h> 53#include <sys/ucred.h> 54 55#include <net/if.h> 56#include <net/if_llatbl.h> 57#include <net/netisr.h> 58#include <net/pfil.h> 59#include <net/route.h> 60#include <net/flowtable.h> 61#ifdef RADIX_MPATH 62#include <net/radix_mpath.h> 63#endif 64#include <net/vnet.h> 65 66#include <netinet/in.h> | 52#include <sys/socket.h> 53#include <sys/socketvar.h> 54#include <sys/sysctl.h> 55#include <sys/ucred.h> 56 57#include <net/if.h> 58#include <net/if_llatbl.h> 59#include <net/netisr.h> 60#include <net/pfil.h> 61#include <net/route.h> 62#include <net/flowtable.h> 63#ifdef RADIX_MPATH 64#include <net/radix_mpath.h> 65#endif 66#include <net/vnet.h> 67 68#include <netinet/in.h> |
69#include <netinet/in_kdtrace.h> |
|
67#include <netinet/in_systm.h> 68#include <netinet/ip.h> 69#include <netinet/in_pcb.h> 70#include <netinet/in_var.h> 71#include <netinet/ip_var.h> 72#include <netinet/ip_options.h> 73#ifdef SCTP 74#include <netinet/sctp.h> --- 542 unchanged lines hidden (view full) --- 617 if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size) 618 m = m_fragment(m, M_NOWAIT, mbuf_frag_size); 619#endif 620 /* 621 * Reset layer specific mbuf flags 622 * to avoid confusing lower layers. 623 */ 624 m_clrprotoflags(m); | 70#include <netinet/in_systm.h> 71#include <netinet/ip.h> 72#include <netinet/in_pcb.h> 73#include <netinet/in_var.h> 74#include <netinet/ip_var.h> 75#include <netinet/ip_options.h> 76#ifdef SCTP 77#include <netinet/sctp.h> --- 542 unchanged lines hidden (view full) --- 620 if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size) 621 m = m_fragment(m, M_NOWAIT, mbuf_frag_size); 622#endif 623 /* 624 * Reset layer specific mbuf flags 625 * to avoid confusing lower layers. 626 */ 627 m_clrprotoflags(m); |
628 IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); |
|
625 error = (*ifp->if_output)(ifp, m, 626 (const struct sockaddr *)gw, ro); 627 goto done; 628 } 629 630 /* Balk when DF bit is set or the interface didn't support TSO. */ 631 if ((ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { 632 error = EMSGSIZE; --- 18 unchanged lines hidden (view full) --- 651 ia->ia_ifa.if_obytes += m->m_pkthdr.len; 652 } 653 /* 654 * Reset layer specific mbuf flags 655 * to avoid confusing upper layers. 656 */ 657 m_clrprotoflags(m); 658 | 629 error = (*ifp->if_output)(ifp, m, 630 (const struct sockaddr *)gw, ro); 631 goto done; 632 } 633 634 /* Balk when DF bit is set or the interface didn't support TSO. */ 635 if ((ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { 636 error = EMSGSIZE; --- 18 unchanged lines hidden (view full) --- 655 ia->ia_ifa.if_obytes += m->m_pkthdr.len; 656 } 657 /* 658 * Reset layer specific mbuf flags 659 * to avoid confusing upper layers. 660 */ 661 m_clrprotoflags(m); 662 |
663 IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); |
|
659 error = (*ifp->if_output)(ifp, m, 660 (const struct sockaddr *)gw, ro); 661 } else 662 m_freem(m); 663 } 664 665 if (error == 0) 666 IPSTAT_INC(ips_fragmented); --- 640 unchanged lines hidden --- | 664 error = (*ifp->if_output)(ifp, m, 665 (const struct sockaddr *)gw, ro); 666 } else 667 m_freem(m); 668 } 669 670 if (error == 0) 671 IPSTAT_INC(ips_fragmented); --- 640 unchanged lines hidden --- |