[PATCH 07/19] udhcpc: make udhcpc silent after 3 'Sending discover ...' messages
Frank TEO
frank128 at ymail.com
Fri Sep 28 04:34:24 UTC 2012
We should not suppress the message.
We should use it for validating dhcp retransmission purpose.
----- Original Message -----
From: Denys Vlasenko <vda.linux at googlemail.com>
To: Florian Fainelli <florian at alphacore.org>
Cc: busybox at busybox.net; Felix Fietkau <nbd at openwrt.org>
Sent: Thursday, 27 September 2012, 22:30
Subject: Re: [PATCH 07/19] udhcpc: make udhcpc silent after 3 'Sending discover ...' messages
On Tue, Sep 25, 2012 at 2:06 PM, Florian Fainelli <florian at alphacore.org> wrote:
> From: Felix Fietkau <nbd at openwrt.org>
>
> Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> ---
> networking/udhcp/dhcpc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
> index f72217c..f1013f4 100644
> --- a/networking/udhcp/dhcpc.c
> +++ b/networking/udhcp/dhcpc.c
> @@ -672,6 +672,7 @@ static int raw_bcast_from_client_config_ifindex(struct dhcp_packet *packet)
> static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
> {
> struct dhcp_packet packet;
> + static int msgs = 0;
Why static?
> /* Fill in: op, htype, hlen, cookie, chaddr fields,
> * random xid field (we override it below),
> @@ -689,7 +690,8 @@ static NOINLINE int send_discover(uint32_t xid, uint32_t requested)
> */
> add_client_options(&packet);
>
> - bb_info_msg("Sending discover...");
> + if (msgs++ < 3)
> + bb_info_msg("Sending discover...");
> return raw_bcast_from_client_config_ifindex(&packet);
> }
Why do you want to suppress the message?
_______________________________________________
busybox mailing list
busybox at busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
More information about the busybox
mailing list