From owner-freebsd-pf@FreeBSD.ORG Thu Sep 18 11:29:57 2014 Return-Path: Delivered-To: freebsd-pf@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB2A78C7 for ; Thu, 18 Sep 2014 11:29:57 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B3A6399 for ; Thu, 18 Sep 2014 11:29:57 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IBTvS1010570 for ; Thu, 18 Sep 2014 11:29:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-pf@FreeBSD.org Subject: [Bug 168190] [pf] panic when using pf and route-to (maybe: bad fragment handling?) Date: Thu, 18 Sep 2014 11:29:57 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 9.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: wwt@op.pl X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-pf@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 11:29:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=168190 Tomasz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wwt@op.pl --- Comment #24 from Tomasz --- Hello I have the same or similar problem with Dell R210 II kern/193452 I add patch http://www.benzedrine.cx/fbsd-byteorder.diff https://bugs.freebsd.org/bugzilla/attachment.cgi?id=124691&action=diff Index: sys/contrib/ipfilter/netinet/ip_fil_freebsd.c =================================================================== RCS file: /home/ncvs/src/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c,v retrieving revision 1.20.4.1 diff -u -r1.20.4.1 ip_fil_freebsd.c --- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c 23 Sep 2011 00:51:37 -0000 1.20.4.1 +++ sys/contrib/ipfilter/netinet/ip_fil_freebsd.c 4 Jun 2012 10:19:04 -0000 @@ -182,8 +182,18 @@ static int fr_check_wrapper(void *arg, struct mbuf **mp, struct ifnet *ifp, int dir) { + int r; + struct ip *ip = mtod(*mp, struct ip *); - return fr_check(ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT), mp); + ASSERT_HOST_BYTE_ORDER(*mp); + r = fr_check(ip, ip->ip_hl << 2, ifp, (dir == PFIL_OUT), mp); + if (*mp != NULL && (*mp)->m_pkthdr.len >= sizeof(struct ip) && + (*mp)->m_len < sizeof(struct ip)) { + printf("fr_check_wrapper: m_len %d fixed\n", + (int)(*mp)->m_len); + *mp = m_pullup(*mp, sizeof(struct ip)); + } + return r; } # ifdef USE_INET6 For now system work correctly for 3 days without panic and its lot off log message Sep 18 12:50:47 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 12:52:09 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 12:55:50 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:03:26 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:07:53 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:07:56 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:11:13 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:11:36 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:11:36 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:12:01 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:13:07 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:14:24 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:15:45 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:15:49 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:17:16 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:17:55 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:18:35 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:18:57 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:23 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:30 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:34 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:43 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:56 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:19:56 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:20:02 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:20:08 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:20:24 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:20:24 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:20:33 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed Sep 18 13:25:27 <0.2> ns2 kernel: fr_check_wrapper: m_len 0 fixed 9.2-RELEASE-p10 FreeBSD 9.2-RELEASE-p10 Kernel is Generic with options DEVICE_POLLING options DUMMYNET options IPFILTER_LOG options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_FORWARD options IPFIREWALL_VERBOSE options IPFIREWALL options IPFILTER network card is bce in sysctl I found something strange dev.bce.0.%desc: Broadcom NetXtreme II BCM5716 1000Base-T (C0) dev.bce.1.%desc: Broadcom NetXtreme II BCM5716 1000Base-T (C0) dev.brgphy.0.%desc: BCM5709 10/100/1000baseT PHY dev.brgphy.1.%desc: BCM5709 10/100/1000baseT PHY Best Regards Tomek -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.