summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/pf/pf_ioctl.c
diff options
context:
space:
mode:
authorkp <kp@FreeBSD.org>2015-10-21 15:32:21 +0000
committerkp <kp@FreeBSD.org>2015-10-21 15:32:21 +0000
commitd621159ed6a7d1c98cf81f17e313dffc64bf7c4f (patch)
treebf808b690f2a7aeabe78ae7b008b62f190733067 /sys/netpfil/pf/pf_ioctl.c
parenta7e84cb353a2230668d83d375dc3fae7f6419bab (diff)
downloadFreeBSD-src-d621159ed6a7d1c98cf81f17e313dffc64bf7c4f.zip
FreeBSD-src-d621159ed6a7d1c98cf81f17e313dffc64bf7c4f.tar.gz
MFC r289316:
pf: Fix TSO issues In certain configurations (mostly but not exclusively as a VM on Xen) pf produced packets with an invalid TCP checksum. The problem was that pf could only handle packets with a full checksum. The FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only addresses, length and protocol). Certain network interfaces expect to see the pseudo-header checksum, so they end up producing packets with invalid checksums. To fix this stop calculating the full checksum and teach pf to only update TCP checksums if TSO is disabled or the change affects the pseudo-header checksum. PR: 154428, 193579, 198868 Relnotes: yes Sponsored by: RootBSD
Diffstat (limited to 'sys/netpfil/pf/pf_ioctl.c')
-rw-r--r--sys/netpfil/pf/pf_ioctl.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index a3528f0..d91c851 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -3560,12 +3560,6 @@ pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
{
int chk;
- /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */
- if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
- in_delayed_cksum(*m);
- (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
- }
-
chk = pf_test(PF_OUT, ifp, m, inp);
if (chk && *m) {
m_freem(*m);
@@ -3604,13 +3598,6 @@ pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
{
int chk;
- /* We need a proper CSUM before we start (s. OpenBSD ip_output) */
- if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
- in6_delayed_cksum(*m,
- (*m)->m_pkthdr.len - sizeof(struct ip6_hdr),
- sizeof(struct ip6_hdr));
- (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
- }
CURVNET_SET(ifp->if_vnet);
chk = pf_test6(PF_OUT, ifp, m, inp);
CURVNET_RESTORE();
OpenPOWER on IntegriCloud