Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2009 18:20:51 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r201054 - user/luigi/ipfw3-head/sys/netinet/ipfw
Message-ID:  <200912271820.nBRIKpJd063469@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912271820.nBRIKpJd063469>