From owner-svn-src-user@FreeBSD.ORG Sat Dec 26 02:56:59 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0699A1065692; Sat, 26 Dec 2009 02:56:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA1128FC19; Sat, 26 Dec 2009 02:56:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBQ2uwRi078832; Sat, 26 Dec 2009 02:56:58 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBQ2uwcW078830; Sat, 26 Dec 2009 02:56:58 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200912260256.nBQ2uwcW078830@svn.freebsd.org> From: Luigi Rizzo Date: Sat, 26 Dec 2009 02:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201012 - user/luigi/ipfw3-head/sys/netinet/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2009 02:56:59 -0000 Author: luigi Date: Sat Dec 26 02:56:58 2009 New Revision: 201012 URL: http://svn.freebsd.org/changeset/base/201012 Log: another small simplification Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c Sat Dec 26 02:36:48 2009 (r201011) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_fw_pfil.c Sat Dec 26 02:56:58 2009 (r201012) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include #include #include @@ -239,7 +237,7 @@ ipfw_check_out(void *arg, struct mbuf ** struct ip_fw_args args; struct ng_ipfw_tag *ng_tag; struct m_tag *dn_tag; - int ipfw = 0; + int ipfw; int divert; int tee; #ifdef IPFIREWALL_FORWARD @@ -392,14 +390,14 @@ ipfw_divert(struct mbuf **m, int incomin goto nodivert; /* Cloning needed for tee? */ - if (tee) + if (tee) { clone = m_dup(*m, M_DONTWAIT); - else + /* In case m_dup was unable to allocate mbufs. */ + if (clone == NULL) + return 0; + } else clone = *m; - /* In case m_dup was unable to allocate mbufs. */ - if (clone == NULL) - goto teeout; /* * Divert listeners can only handle non-fragmented packets. @@ -445,7 +443,6 @@ ipfw_divert(struct mbuf **m, int incomin if (clone && ip_divert_ptr != NULL) ip_divert_ptr(clone, incoming); -teeout: /* * For tee we leave the divert tag attached to original packet. * It will then continue rule evaluation after the tee rule.