ip_reass.c (242079) | ip_reass.c (242463) |
---|---|
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: head/sys/netinet/ip_input.c 242079 2012-10-25 09:39:14Z ae $"); | 33__FBSDID("$FreeBSD: head/sys/netinet/ip_input.c 242463 2012-11-02 01:20:55Z ae $"); |
34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 462 unchanged lines hidden (view full) --- 504 return; 505 if (m == NULL) /* consumed by filter */ 506 return; 507 508 ip = mtod(m, struct ip *); 509 dchg = (odst.s_addr != ip->ip_dst.s_addr); 510 ifp = m->m_pkthdr.rcvif; 511 | 34 35#include "opt_bootp.h" 36#include "opt_ipfw.h" 37#include "opt_ipstealth.h" 38#include "opt_ipsec.h" 39#include "opt_route.h" 40 41#include <sys/param.h> --- 462 unchanged lines hidden (view full) --- 504 return; 505 if (m == NULL) /* consumed by filter */ 506 return; 507 508 ip = mtod(m, struct ip *); 509 dchg = (odst.s_addr != ip->ip_dst.s_addr); 510 ifp = m->m_pkthdr.rcvif; 511 |
512 if (V_pfilforward == 0) 513 goto passin; 514 | |
515 if (m->m_flags & M_FASTFWD_OURS) { 516 m->m_flags &= ~M_FASTFWD_OURS; 517 goto ours; 518 } | 512 if (m->m_flags & M_FASTFWD_OURS) { 513 m->m_flags &= ~M_FASTFWD_OURS; 514 goto ours; 515 } |
519 if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) { 520 /* 521 * Directly ship the packet on. This allows forwarding 522 * packets originally destined to us to some other directly 523 * connected host. 524 */ 525 ip_forward(m, dchg); 526 return; | 516 if (m->m_flags & M_IP_NEXTHOP) { 517 dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL); 518 if (dchg != 0) { 519 /* 520 * Directly ship the packet on. This allows 521 * forwarding packets originally destined to us 522 * to some other directly connected host. 523 */ 524 ip_forward(m, 1); 525 return; 526 } |
527 } | 527 } |
528 | |
529passin: 530 531 /* 532 * Process options and, if not destined for us, 533 * ship it on. ip_dooptions returns 1 when an 534 * error was detected (causing an icmp message 535 * to be sent and the original packet to be freed). 536 */ --- 1224 unchanged lines hidden --- | 528passin: 529 530 /* 531 * Process options and, if not destined for us, 532 * ship it on. ip_dooptions returns 1 when an 533 * error was detected (causing an icmp message 534 * to be sent and the original packet to be freed). 535 */ --- 1224 unchanged lines hidden --- |