Skip to content

Commit

Permalink
set default addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Nov 10, 2017
1 parent a6e01b1 commit 7875afe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/proto_detail/proto_detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ static int mod_decode(void const *instance, REQUEST *request, uint8_t *const dat

request->packet->code = inst->code;

/*
* Set default addresses
*/
request->packet->sockfd = -1;
request->packet->src_ipaddr.af = AF_INET;
request->packet->src_ipaddr.addr.v4.s_addr = htonl(INADDR_NONE);
request->packet->dst_ipaddr = request->packet->src_ipaddr;

request->reply->src_ipaddr = request->packet->src_ipaddr;
request->reply->dst_ipaddr = request->packet->src_ipaddr;

end = data + data_len;

MPRINT("HEADER %s", data);
Expand Down

0 comments on commit 7875afe

Please sign in to comment.