From owner-svn-src-user@FreeBSD.ORG Sun Dec 27 18:20:51 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 5922D106568B; Sun, 27 Dec 2009 18:20:51 +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 4972B8FC17; Sun, 27 Dec 2009 18:20:51 +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 nBRIKpK7063471; Sun, 27 Dec 2009 18:20:51 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBRIKpJd063469; Sun, 27 Dec 2009 18:20:51 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200912271820.nBRIKpJd063469@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 27 Dec 2009 18:20:51 +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: r201054 - 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: Sun, 27 Dec 2009 18:20:51 -0000 Author: luigi Date: Sun Dec 27 18:20:51 2009 New Revision: 201054 URL: http://svn.freebsd.org/changeset/base/201054 Log: use DIR_DROP for explicit packet drops Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Modified: user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Sun Dec 27 18:04:05 2009 (r201053) +++ user/luigi/ipfw3-head/sys/netinet/ipfw/ip_dummynet.c Sun Dec 27 18:20:51 2009 (r201054) @@ -551,7 +551,6 @@ transmit_event(struct dn_pipe *pipe, str } #define div64(a, b) ((int64_t)(a) / (int64_t)(b)) -#define DN_TO_DROP 0xffff /* * Compute how many ticks we have to wait before being able to send * a packet. This is computed as the "wire time" for the packet @@ -596,7 +595,7 @@ compute_extra_bits(struct mbuf *pkt, str if (index >= p->loss_level) { struct dn_pkt_tag *dt = dn_tag_get(pkt); if (dt) - dt->dn_dir = DN_TO_DROP; + dt->dn_dir = DIR_DROP; } return extra_bits; } @@ -979,7 +978,7 @@ dummynet_send(struct mbuf *m) m->m_nextpkt = NULL; if (m_tag_first(m) == NULL) { pkt = NULL; /* probably unnecessary */ - dst = DN_TO_DROP; + dst = DIR_DROP; } else { pkt = dn_tag_get(m); dst = pkt->dn_dir; @@ -1031,7 +1030,7 @@ dummynet_send(struct mbuf *m) ether_output_frame(pkt->ifp, m); break; - case DN_TO_DROP: + case DIR_DROP: /* drop the packet after some time */ dn_free_pkt(m); break;