bugfix: build packet also copy metadata from original packet
This commit is contained in:
@@ -303,6 +303,7 @@ struct packet *packet_build_tcp(const struct packet *origin_pkt, uint32_t tcp_se
|
||||
.args = NULL,
|
||||
.thr_idx = -1,
|
||||
};
|
||||
memcpy(&new_pkt->meta, &origin_pkt->meta, sizeof(struct metadata));
|
||||
packet_set_origin(new_pkt, &origin);
|
||||
|
||||
return new_pkt;
|
||||
@@ -352,6 +353,7 @@ struct packet *packet_build_udp(const struct packet *origin_pkt, const char *udp
|
||||
.args = NULL,
|
||||
.thr_idx = -1,
|
||||
};
|
||||
memcpy(&new_pkt->meta, &origin_pkt->meta, sizeof(struct metadata));
|
||||
packet_set_origin(new_pkt, &origin);
|
||||
|
||||
return new_pkt;
|
||||
@@ -428,6 +430,7 @@ struct packet *packet_build_l3(const struct packet *origin_pkt, uint8_t ip_proto
|
||||
.args = NULL,
|
||||
.thr_idx = -1,
|
||||
};
|
||||
memcpy(&new_pkt->meta, &origin_pkt->meta, sizeof(struct metadata));
|
||||
packet_set_origin(new_pkt, &origin);
|
||||
|
||||
return new_pkt;
|
||||
|
||||
Reference in New Issue
Block a user