Skip to content

Commit

Permalink
Simplify final output
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Dec 9, 2024
1 parent 437fea3 commit c412b22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tools/dhcp-discover.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,12 @@ int run_dhcp_discover(void)
// Print results
if(iface != NULL)
{
printf("Received %u DHCP (IPv4) and %u RA (IPv6) answers on %s%s%s\n",
v4, v6, cli_bold(), iface, cli_normal());
if(v4 < 1 && v6 < 1)
printf("No answer on %s%s%s\n",
cli_bold(), iface, cli_normal());
else
printf("Received %u DHCP (IPv4) and %u RA (IPv6) answers on %s%s%s\n",
v4, v6, cli_bold(), iface, cli_normal());
free(iface);
}
}
Expand Down

0 comments on commit c412b22

Please sign in to comment.