- else
- pcap = true;
- if(send_request(c, "%d %d %d", CONTROL, REQ_PCAP, packet->len))
- send_meta(c, (char *)packet->data, packet->len);
+
+ pcap = true;
+ int len = packet->len;
+ if(c->outmaclength && c->outmaclength < len)
+ len = c->outmaclength;
+
+ if(send_request(c, "%d %d %d", CONTROL, REQ_PCAP, len))
+ send_meta(c, (char *)packet->data, len);