b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | --- a/networking/udhcp/dhcpc.c |
| 2 | +++ b/networking/udhcp/dhcpc.c |
| 3 | @@ -722,6 +722,7 @@ static int bcast_or_ucast(struct dhcp_pa |
| 4 | static NOINLINE int send_discover(uint32_t requested) |
| 5 | { |
| 6 | struct dhcp_packet packet; |
| 7 | + static int msgs = 0; |
| 8 | |
| 9 | /* Fill in: op, htype, hlen, cookie, chaddr fields, |
| 10 | * xid field, message type option: |
| 11 | @@ -736,6 +737,7 @@ static NOINLINE int send_discover(uint32 |
| 12 | */ |
| 13 | add_client_options(&packet); |
| 14 | |
| 15 | + if (msgs++ < 3) |
| 16 | bb_simple_info_msg("broadcasting discover"); |
| 17 | return raw_bcast_from_client_data_ifindex(&packet, INADDR_ANY); |
| 18 | } |