Open vitalii-kondratiuk opened 1 month ago
The possible solution in DHCP_MSGOFFER
fprintf(stdout, "{\"msg\":\"DHCP offer details\","
"\"result\":\"info\","
"\"result-type\":\"offer\","
"\"result-ip\":\"%s\",",
get_ip_str(dhcph_g->dhcp_yip));
fprintf(stdout, "\"result-next-srv\":\"%s\"",
get_ip_str(dhcph_g->dhcp_sip));
For the DHCP_MSGACK
fprintf(stdout, "{\"msg\":\"DHCP ack details\","
"\"result\":\"info\","
"\"result-type\":\"offer\","
"\"result-ip\":\"%s\",",
get_ip_str(dhcph_g->dhcp_yip));
fprintf(stdout, "\"result-next-srv\":\"%s\"",
get_ip_str(dhcph_g->dhcp_sip));
The
Next Server IP address
in OFFER & ACK is displayed correctly only for the basic output format, in the case of using -j json option it refers to incorrect data.Basic output mode, CORRECT: JSON output mode, INCORRECT:
Here is the tcpdump capture: