Hello Dag, if its working for you i have no issues. For me these changes are taken into consideration during policy routing on pf(4). If you check the pf_route() call it does the same checks as outgoing processing of the modules. If they need to be considered after pf(4) does it internal processing probably should be after the call to pf_test6. There is no reason to have different behaviour for ipv6 from ipv4 internally in pf(4). Also this only affects the traffic sourced by the host itself and not forwarded traffic and i think this patch will provide a regression for the issues that the committed patch does.
On Tue, Nov 25, 2014 at 12:38 PM, Dag-Erling Smørgrav <d...@des.no> wrote: > Here's a patch that doesn't crash and tries not to break TSO. > > Index: sys/netpfil/pf/pf_ioctl.c > =================================================================== > --- sys/netpfil/pf/pf_ioctl.c (revision 274791) > +++ sys/netpfil/pf/pf_ioctl.c (working copy) > @@ -3576,9 +3576,10 @@ > int chk; > > /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ > - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { > + if ((*m)->m_pkthdr.csum_flags & > + ((CSUM_DELAY_IP|CSUM_DELAY_DATA) & ~ifp->if_hwassist)) { > in_delayed_cksum(*m); > - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; > + (*m)->m_pkthdr.csum_flags &= > ~(CSUM_DELAY_IP|CSUM_DELAY_DATA); > } > > chk = pf_test(PF_OUT, ifp, m, inp); > @@ -3620,12 +3621,14 @@ > int chk; > > /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ > - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { > + if ((*m)->m_pkthdr.csum_flags & > + (CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist)) { > 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(); > > DES > -- > Dag-Erling Smørgrav - d...@des.no > -- Ermal _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"