aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2012-12-11 13:09:22 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2012-12-11 13:09:22 +0100
commita6185d169a858715d09ea1ae980e15fc9d1fd99f (patch)
tree98657fd3c50c2a43b5929d1e225c4a5cd5814616
parentcorrectly decode packet size and response type (diff)
downloadglouglou-a6185d169a858715d09ea1ae980e15fc9d1fd99f.tar.xz
glouglou-a6185d169a858715d09ea1ae980e15fc9d1fd99f.zip
correctly encode packet size and response type
-rw-r--r--gg_sniff/pcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gg_sniff/pcap.c b/gg_sniff/pcap.c
index 27a411a..0f95dad 100644
--- a/gg_sniff/pcap.c
+++ b/gg_sniff/pcap.c
@@ -463,7 +463,7 @@ ip_handle(struct ip *ip, const u_char *pend, u_int wirelen)
if (!close) {
pkt.type = PACKET_DATA;
pkt.data_connid = conn->id;
- pkt.data_size = size << 8 | response;
+ pkt.data_size = size / GG_PKTDATA_SIZE_FACTOR | (response << 7);
gg_client_send(_cap.ggcli, &pkt);
ggnet_conn_data(_cap.net, conn, size, response);
} else {