[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] udhcpd: lease conflict
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2017-12-31 9:32:13
Message-ID: CAK1hOcOE14GN-TLN4kW3fHDnHbgGo-TnTH904KrieRStEN8_FA () mail ! gmail ! com
[Download RAW message or body]
On Fri, Dec 15, 2017 at 1:41 PM, Jiri Prchal <jiri.prchal@aksignal.cz> 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 <jiri.prchal@aksignal.cz>
> ---
> 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
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic