inject TCP RST test pass
This commit is contained in:
@@ -290,7 +290,7 @@ int dumpfile_io_ingress(struct dumpfile_io *handle, uint16_t thr_idx, struct pac
|
||||
pkt = &pkts[nr_parsed];
|
||||
memset(pkt, 0, sizeof(struct packet));
|
||||
packet_parse(pkt, pcap_pkt->data, pcap_pkt->len);
|
||||
packet_set_io_ctx(pkt, pcap_pkt);
|
||||
packet_set_origin_ctx(pkt, pcap_pkt);
|
||||
packet_set_origin(pkt, PACKET_ORIGIN_DUMPFILE);
|
||||
nr_parsed++;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ void dumpfile_io_egress(struct dumpfile_io *handle, uint16_t thr_idx, struct pac
|
||||
stat->raw_tx_pkts++;
|
||||
stat->raw_tx_bytes += len;
|
||||
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_io_ctx(pkt);
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_origin_ctx(pkt);
|
||||
if (pcap_pkt)
|
||||
{
|
||||
free(pcap_pkt);
|
||||
@@ -333,7 +333,7 @@ void dumpfile_io_drop(struct dumpfile_io *handle, uint16_t thr_idx, struct packe
|
||||
for (int i = 0; i < nr_pkts; i++)
|
||||
{
|
||||
pkt = &pkts[i];
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_io_ctx(pkt);
|
||||
struct pcap_pkt *pcap_pkt = (struct pcap_pkt *)packet_get_origin_ctx(pkt);
|
||||
if (pcap_pkt)
|
||||
{
|
||||
stat->drop_pkts++;
|
||||
|
||||
Reference in New Issue
Block a user