diff --git a/gtests/net/packetdrill/packet_socket_linux.c b/gtests/net/packetdrill/packet_socket_linux.c
index 8abf10666bc4422ab32e4c63cbb5489dcc5a249b..bab7f34555530424498aefd6231f803cf4a7accb 100644
--- a/gtests/net/packetdrill/packet_socket_linux.c
+++ b/gtests/net/packetdrill/packet_socket_linux.c
@@ -175,7 +175,7 @@ void packet_socket_set_filter(struct packet_socket *psock,
 	bpfcode.filter[3].k = ((client_ether[0] << 8)  |
 			       (client_ether[1]));
 
-	if (DEBUG_LOGGING) {
+	if (debug_logging) {
 		int i;
 		DEBUGP("filter constants:\n");
 		for (i = 0; i < bpfcode.len; ++i)