ip_input.c (262743) | ip_input.c (263307) |
---|---|
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 --- 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_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> | 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 --- 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_input.c 8.2 (Berkeley) 1/4/94 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: stable/10/sys/netinet/ip_input.c 262743 2014-03-04 15:14:47Z glebius $"); | 33__FBSDID("$FreeBSD: stable/10/sys/netinet/ip_input.c 263307 2014-03-18 16:56:05Z glebius $"); |
34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_kdtrace.h" 40#include "opt_route.h" 41 --- 660 unchanged lines hidden (view full) --- 702 ifa_free(&ia->ia_ifa); 703 } 704 705 /* 706 * Attempt reassembly; if it succeeds, proceed. 707 * ip_reass() will return a different mbuf. 708 */ 709 if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) { | 34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_kdtrace.h" 40#include "opt_route.h" 41 --- 660 unchanged lines hidden (view full) --- 702 ifa_free(&ia->ia_ifa); 703 } 704 705 /* 706 * Attempt reassembly; if it succeeds, proceed. 707 * ip_reass() will return a different mbuf. 708 */ 709 if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) { |
710 /* XXXGL: shouldn't we save & set m_flags? */ |
|
710 m = ip_reass(m); 711 if (m == NULL) 712 return; 713 ip = mtod(m, struct ip *); 714 /* Get the header length of the reassembled packet */ 715 hlen = ip->ip_hl << 2; 716 } 717 --- 76 unchanged lines hidden (view full) --- 794 maxnipq_update(); 795 return (0); 796} 797 798SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLTYPE_INT|CTLFLAG_RW, 799 NULL, 0, sysctl_maxnipq, "I", 800 "Maximum number of IPv4 fragment reassembly queue entries"); 801 | 711 m = ip_reass(m); 712 if (m == NULL) 713 return; 714 ip = mtod(m, struct ip *); 715 /* Get the header length of the reassembled packet */ 716 hlen = ip->ip_hl << 2; 717 } 718 --- 76 unchanged lines hidden (view full) --- 795 maxnipq_update(); 796 return (0); 797} 798 799SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLTYPE_INT|CTLFLAG_RW, 800 NULL, 0, sysctl_maxnipq, "I", 801 "Maximum number of IPv4 fragment reassembly queue entries"); 802 |
803#define M_IP_FRAG M_PROTO9 804 |
|
802/* 803 * Take incoming datagram fragment and try to reassemble it into 804 * whole datagram. If the argument is the first fragment or one 805 * in between the function will return NULL and store the mbuf 806 * in the fragment chain. If the argument is the last fragment 807 * the packet will be reassembled and the pointer to the new 808 * mbuf returned for further processing. Only m_tags attached 809 * to the first packet/fragment are preserved. --- 935 unchanged lines hidden --- | 805/* 806 * Take incoming datagram fragment and try to reassemble it into 807 * whole datagram. If the argument is the first fragment or one 808 * in between the function will return NULL and store the mbuf 809 * in the fragment chain. If the argument is the last fragment 810 * the packet will be reassembled and the pointer to the new 811 * mbuf returned for further processing. Only m_tags attached 812 * to the first packet/fragment are preserved. --- 935 unchanged lines hidden --- |