ip6_forward.c (235958) | ip6_forward.c (236170) |
---|---|
1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 * $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 * 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 * $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet6/ip6_forward.c 235958 2012-05-25 02:17:16Z bz $"); | 33__FBSDID("$FreeBSD: head/sys/netinet6/ip6_forward.c 236170 2012-05-28 09:30:13Z bz $"); |
34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipfw.h" 38#include "opt_ipsec.h" 39#include "opt_ipstealth.h" 40 41#include <sys/param.h> --- 534 unchanged lines hidden (view full) --- 576 /* See if destination IP address was changed by packet filter. */ 577 if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { 578 m->m_flags |= M_SKIP_FIREWALL; 579 /* If destination is now ourself drop to ip6_input(). */ 580 if (in6_localip(&ip6->ip6_dst)) { 581 m->m_flags |= M_FASTFWD_OURS; 582 if (m->m_pkthdr.rcvif == NULL) 583 m->m_pkthdr.rcvif = V_loif; | 34 35#include "opt_inet.h" 36#include "opt_inet6.h" 37#include "opt_ipfw.h" 38#include "opt_ipsec.h" 39#include "opt_ipstealth.h" 40 41#include <sys/param.h> --- 534 unchanged lines hidden (view full) --- 576 /* See if destination IP address was changed by packet filter. */ 577 if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { 578 m->m_flags |= M_SKIP_FIREWALL; 579 /* If destination is now ourself drop to ip6_input(). */ 580 if (in6_localip(&ip6->ip6_dst)) { 581 m->m_flags |= M_FASTFWD_OURS; 582 if (m->m_pkthdr.rcvif == NULL) 583 m->m_pkthdr.rcvif = V_loif; |
584 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { | 584 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { |
585 m->m_pkthdr.csum_flags |= | 585 m->m_pkthdr.csum_flags |= |
586 CSUM_DATA_VALID | CSUM_PSEUDO_HDR; | 586 CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; |
587 m->m_pkthdr.csum_data = 0xffff; 588 } 589#ifdef SCTP 590 if (m->m_pkthdr.csum_flags & CSUM_SCTP) 591 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; 592#endif 593 error = netisr_queue(NETISR_IPV6, m); 594 goto out; 595 } else 596 goto again; /* Redo the routing table lookup. */ 597 } 598 599#ifdef IPFIREWALL_FORWARD 600 /* See if local, if yes, send it to netisr. */ 601 if (m->m_flags & M_FASTFWD_OURS) { 602 if (m->m_pkthdr.rcvif == NULL) 603 m->m_pkthdr.rcvif = V_loif; | 587 m->m_pkthdr.csum_data = 0xffff; 588 } 589#ifdef SCTP 590 if (m->m_pkthdr.csum_flags & CSUM_SCTP) 591 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; 592#endif 593 error = netisr_queue(NETISR_IPV6, m); 594 goto out; 595 } else 596 goto again; /* Redo the routing table lookup. */ 597 } 598 599#ifdef IPFIREWALL_FORWARD 600 /* See if local, if yes, send it to netisr. */ 601 if (m->m_flags & M_FASTFWD_OURS) { 602 if (m->m_pkthdr.rcvif == NULL) 603 m->m_pkthdr.rcvif = V_loif; |
604 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { | 604 if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { |
605 m->m_pkthdr.csum_flags |= | 605 m->m_pkthdr.csum_flags |= |
606 CSUM_DATA_VALID | CSUM_PSEUDO_HDR; | 606 CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; |
607 m->m_pkthdr.csum_data = 0xffff; 608 } 609#ifdef SCTP 610 if (m->m_pkthdr.csum_flags & CSUM_SCTP) 611 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; 612#endif 613 error = netisr_queue(NETISR_IPV6, m); 614 goto out; --- 72 unchanged lines hidden --- | 607 m->m_pkthdr.csum_data = 0xffff; 608 } 609#ifdef SCTP 610 if (m->m_pkthdr.csum_flags & CSUM_SCTP) 611 m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; 612#endif 613 error = netisr_queue(NETISR_IPV6, m); 614 goto out; --- 72 unchanged lines hidden --- |