On Fri, Dec 15, 2017 at 1:41 PM, Jiri Prchal <[email protected]> wrote:
> If there is lease for MAC which is no longer connected and only one IP in 
> pool, it doesn't lease to new one mac until expires the old one.

This is how it is intended to work.

> I think for this situation is there function "nobody_responds_to_arp", but it 
> is not called if "lease" is true.
> In patch I switched the logic and that function is called if is lease.
>
> Signed-off-by: Jiri Prchal <[email protected]>
> ---
>  networking/udhcp/dhcpd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
> index 238542b..5eb0682 100644
> --- a/networking/udhcp/dhcpd.c
> +++ b/networking/udhcp/dhcpd.c
> @@ -292,7 +292,7 @@ static uint32_t find_free_or_expired_nip(const uint8_t 
> *safe_mac, unsigned arppi
>                         goto next_addr;
>
>                 lease = find_lease_by_nip(nip);
> -               if (!lease) {
> +               if (lease) {
>  //TODO: DHCP servers do not always sit on the same subnet as clients: should 
> *ping*, not arp-ping!
>                         if (nobody_responds_to_arp(nip, safe_mac, arpping_ms))
>                                 return nip;
> --
> 2.7.4
>
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to