Date: Mon, 20 Sep 2010 18:26:37 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r212910 - stable/7/sys/contrib/pf/net Message-ID: <201009201826.o8KIQb0K062412@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Mon Sep 20 18:26:37 2010 New Revision: 212910 URL: http://svn.freebsd.org/changeset/base/212910 Log: MFC r212403: When using pf routing options, properly handle IP fragmentation for interfaces with TSO enabled, otherwise one would see an extra ICMP unreach, frag needed pre matching packet on lo0. This syncs pf code to ip_output.c r162084. Submitted by: yongari via mlaier PR: kern/144311 Modified: stable/7/sys/contrib/pf/net/pf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/contrib/pf/net/pf.c ============================================================================== --- stable/7/sys/contrib/pf/net/pf.c Mon Sep 20 18:20:35 2010 (r212909) +++ stable/7/sys/contrib/pf/net/pf.c Mon Sep 20 18:26:37 2010 (r212910) @@ -6376,6 +6376,7 @@ pf_route(struct mbuf **m, struct pf_rule m0->m_pkthdr.csum_flags &= ifp->if_hwassist; if (ntohs(ip->ip_len) <= ifp->if_mtu || + (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || (ifp->if_hwassist & CSUM_FRAGMENT && ((ip->ip_off & htons(IP_DF)) == 0))) { /* @@ -6450,7 +6451,7 @@ pf_route(struct mbuf **m, struct pf_rule * Too large for interface; fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - if (ip->ip_off & htons(IP_DF)) { + if (ip->ip_off & htons(IP_DF) || (m0->m_pkthdr.csum_flags & CSUM_TSO)) { ipstat.ips_cantfrag++; if (r->rt != PF_DUPTO) { #ifdef __FreeBSD__
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009201826.o8KIQb0K062412>