Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/pf/pf.c
Show All 34 Lines | |||||
* Materiel Command, USAF, under agreement number F30602-01-2-0537. | * Materiel Command, USAF, under agreement number F30602-01-2-0537. | ||||
* | * | ||||
* $OpenBSD: pf.c,v 1.634 2009/02/27 12:37:45 henning Exp $ | * $OpenBSD: pf.c,v 1.634 2009/02/27 12:37:45 henning Exp $ | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_bpf.h" | |||||
#include "opt_inet.h" | #include "opt_inet.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_bpf.h" | |||||
tuexen: The changes to this this files except the `|| defined(SCTP_SUPPORT)` are a general fix. Can you… | |||||
#include "opt_pf.h" | #include "opt_pf.h" | ||||
#include "opt_sctp.h" | #include "opt_sctp.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <sys/gsb_crc32.h> | #include <sys/gsb_crc32.h> | ||||
#include <sys/hash.h> | #include <sys/hash.h> | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#include <netinet/icmp6.h> | #include <netinet/icmp6.h> | ||||
#include <netinet6/nd6.h> | #include <netinet6/nd6.h> | ||||
#include <netinet6/ip6_var.h> | #include <netinet6/ip6_var.h> | ||||
#include <netinet6/in6_pcb.h> | #include <netinet6/in6_pcb.h> | ||||
#include <netinet6/in6_fib.h> | #include <netinet6/in6_fib.h> | ||||
#include <netinet6/scope6_var.h> | #include <netinet6/scope6_var.h> | ||||
#endif /* INET6 */ | #endif /* INET6 */ | ||||
#ifdef SCTP | #if defined(SCTP) || defined(SCTP_SUPPORT) | ||||
#include <netinet/sctp_crc32.h> | #include <netinet/sctp_crc32.h> | ||||
#endif | #endif | ||||
#include <machine/in_cksum.h> | #include <machine/in_cksum.h> | ||||
#include <security/mac/mac_framework.h> | #include <security/mac/mac_framework.h> | ||||
#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x | #define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x | ||||
▲ Show 20 Lines • Show All 5,475 Lines • ▼ Show 20 Lines | pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, | ||||
ip_off = ntohs(ip->ip_off); | ip_off = ntohs(ip->ip_off); | ||||
/* Copied from FreeBSD 10.0-CURRENT ip_output. */ | /* Copied from FreeBSD 10.0-CURRENT ip_output. */ | ||||
m0->m_pkthdr.csum_flags |= CSUM_IP; | m0->m_pkthdr.csum_flags |= CSUM_IP; | ||||
if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { | if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA & ~ifp->if_hwassist) { | ||||
in_delayed_cksum(m0); | in_delayed_cksum(m0); | ||||
m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; | m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; | ||||
} | } | ||||
#ifdef SCTP | #if defined(SCTP) || defined(SCTP_SUPPORT) | ||||
if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { | if (m0->m_pkthdr.csum_flags & CSUM_SCTP & ~ifp->if_hwassist) { | ||||
sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); | sctp_delayed_cksum(m0, (uint32_t)(ip->ip_hl << 2)); | ||||
m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; | m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; | ||||
} | } | ||||
#endif | #endif | ||||
/* | /* | ||||
* If small enough for interface, or the interface will take | * If small enough for interface, or the interface will take | ||||
▲ Show 20 Lines • Show All 1,107 Lines • Show Last 20 Lines |
The changes to this this files except the || defined(SCTP_SUPPORT) are a general fix. Can you commit them?