ip_input.c (67334) | ip_input.c (67609) |
---|---|
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 67334 2000-10-19 23:15:54Z joe $ | 34 * $FreeBSD: head/sys/netinet/ip_input.c 67609 2000-10-26 12:18:13Z ru $ |
35 */ 36 37#define _IP_VHL 38 39#include "opt_bootp.h" 40#include "opt_ipfw.h" 41#include "opt_ipdn.h" 42#include "opt_ipdivert.h" --- 638 unchanged lines hidden (view full) --- 681 m = ip_reass(m, fp, &ipq[sum]); 682#endif 683 if (m == 0) { 684#ifdef IPFIREWALL_FORWARD 685 ip_fw_fwd_addr = NULL; 686#endif 687 return; 688 } | 35 */ 36 37#define _IP_VHL 38 39#include "opt_bootp.h" 40#include "opt_ipfw.h" 41#include "opt_ipdn.h" 42#include "opt_ipdivert.h" --- 638 unchanged lines hidden (view full) --- 681 m = ip_reass(m, fp, &ipq[sum]); 682#endif 683 if (m == 0) { 684#ifdef IPFIREWALL_FORWARD 685 ip_fw_fwd_addr = NULL; 686#endif 687 return; 688 } |
689 /* Get the length of the reassembled packets header */ 690 hlen = IP_VHL_HL(ip->ip_vhl) << 2; | |
691 ipstat.ips_reassembled++; 692 ip = mtod(m, struct ip *); | 689 ipstat.ips_reassembled++; 690 ip = mtod(m, struct ip *); |
691 /* Get the header length of the reassembled packet */ 692 hlen = IP_VHL_HL(ip->ip_vhl) << 2; |
|
693#ifdef IPDIVERT 694 /* Restore original checksum before diverting packet */ 695 if (divert_info != 0) { 696 ip->ip_len += hlen; 697 HTONS(ip->ip_len); 698 HTONS(ip->ip_off); 699 ip->ip_sum = 0; 700 ip->ip_sum = in_cksum_hdr(ip); --- 1096 unchanged lines hidden --- | 693#ifdef IPDIVERT 694 /* Restore original checksum before diverting packet */ 695 if (divert_info != 0) { 696 ip->ip_len += hlen; 697 HTONS(ip->ip_len); 698 HTONS(ip->ip_off); 699 ip->ip_sum = 0; 700 ip->ip_sum = in_cksum_hdr(ip); --- 1096 unchanged lines hidden --- |