summaryrefslogtreecommitdiff
blob: 2a6f7822c2b3a5ec8ab464a2aa61c5eba77188bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/dhcpdump.c
+++ b/dhcpdump.c
@@ -130,7 +130,7 @@
 	offset += ETHER_HDR_LEN;
 
 	// Check for IPv4 packets
-	if (eh->ether_type != 8) { 
+	if (eh->ether_type != htons(0x0800)) { 
 		printf("Ignored non IPv4 packet: %d\n", eh->ether_type);
 		return;
 	}