Skip to content

Commit

Permalink
Merge pull request #63 from wllm-rbnt/dev
Browse files Browse the repository at this point in the history
Fix missing port # in pcap files
  • Loading branch information
adulau authored Aug 5, 2022
2 parents 11fee71 + 0543025 commit a7f7ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcap/pcap_logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ static int create_pcap_logger(proto_obj **objp, struct sockaddr_storage *i_addr,
ABORT(R_NO_MEMORY);

//src_addr.sin_family = AF_INET;
//src_addr.sin_port = htons(i_port);
//src_addr.sin_addr = *i_addr;
memcpy(&src_addr, i_addr, sizeof(struct sockaddr_in));
src_addr.sin_port = htons(i_port);

//dst_addr.sin_family = AF_INET;
//dst_addr.sin_port = htons(r_port);
//dst_addr.sin_addr = *r_addr;
memcpy(&dst_addr, r_addr, sizeof(struct sockaddr_in));
dst_addr.sin_port = htons(r_port);

logpkt_ctx_init(pcap_obj,NULL,0,content_pcap_src_ether, content_pcap_dst_ether,
(const struct sockaddr*)&src_addr, sizeof(src_addr),
Expand Down

0 comments on commit a7f7ae5

Please sign in to comment.