FW: udhcpd listening on all interfaces

Blanchette, Sylvie sblanche at ciena.com
Tue May 3 14:34:17 UTC 2011


Denys,

The notify_file directive is commented out in my udhcpd.conf.

- Sylvie





-----Original Message-----
From: Denys Vlasenko [mailto:vda.linux at googlemail.com] 
Sent: Tuesday, May 03, 2011 10:30 AM
To: Blanchette, Sylvie
Cc: busybox at busybox.net
Subject: Re: FW: udhcpd listening on all interfaces

On Tue, May 3, 2011 at 3:42 PM, Blanchette, Sylvie <sblanche at ciena.com> wrote:
> Hi,
>
> I temporarily fixed the issue by adding the following code (found some
> bootpd code on the internet that does similar thing).
>
> As for the notify_file option, I don't use it. It's commented out in my
> udhcpd.conf file.
>
> Regards,
> Sylvie
>
>        max_sock = udhcp_sp_fd_set(&rfds, server_socket);
>        if (server_config.auto_time) {
>                tv.tv_sec = timeout_end - monotonic_sec();
>                tv.tv_usec = 0;
>        }
>        retval = 0;
>        if (!server_config.auto_time || tv.tv_sec > 0) {
>                retval = select(max_sock + 1, &rfds, NULL, NULL,
>                                server_config.auto_time ? &tv : NULL);
>        }
>        if (retval == 0) {
> +               // If we timeout on the select, means no activity since
> +               // since "auto_time" (udhcpd.conf) seconds, therefore close
> +               // session

What "session"? DHCP daemon doesnt run any "sessions", it is meant to
run forever.

> +               if (server_config.auto_time) {
> +                  log1("Timeout on select - ending session\n");
> +                  goto ret0;

No. You are here if auto_time != 0. You need to write lease, and go back
to waiting on select for the next packet or next timeout - exactly what
the next code does:

> +               } else {
> !                  write_leases();
> !                  timeout_end = monotonic_sec() + server_config.auto_time;
> !                  continue;
> +           }
>        }

I think the bug may be that your notify_file directive in udhcpd.conf
contains an invalid path. Please post your  udhcpd.conf.

-- 
vda




More information about the busybox mailing list