Skip to content

Commit

Permalink
ip4: count raw bytes instead of just payload (Closes gamelinux#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Mar 14, 2013
1 parent 2457431 commit c5e452a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prads.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ void prepare_ip4 (packetinfo *pi)
config.pr_s.ip4_recv++;
pi->af = AF_INET;
pi->ip4 = (ip4_header *) (pi->packet + pi->eth_hlen);
pi->packet_bytes = (ntohs(pi->ip4->ip_len) - (IP_HL(pi->ip4) * 4));
pi->packet_bytes = ntohs(pi->ip4->ip_len);

pi->our = filter_packet(pi->af, &PI_IP4SRC(pi));
vlog(0x3, "Got %s IPv4 Packet...\n", (pi->our?"our":"foregin"));
Expand Down

0 comments on commit c5e452a

Please sign in to comment.