Re: [dev] [sdhcp] The problem with renewals

From: Laslo Hunhold <dev_AT_frign.de>
Date: Mon, 16 Mar 2020 18:06:29 +0100

On Tue, 10 Mar 2020 19:37:41 -0400
Sean MacLennan <seanm_AT_seanm.ca> wrote:

Dear Sean,

> I found a couple of bugs in sdhcp... both having to do with
> renewal. If you are having problems renewing your lease or find that
> your IP keeps changing... read on.
>
> The first problem is that sdhcp assumes the renew and rebind times
> will be set. These fields are optional, only the lease time is
> required. So you may end up never timing out until the lease
> expires. This can cause you to lose your IP depending on the server.
>
> Because the optget() is a relatively expensive call, it is actually
> cheaper to calculate the times every time. I have attached a patch
> that does this.
>
> The second problem is the server IP. sdhcp assumes that the server id
> (ODserverid) is the IP of the server. This is not always the case. It
> seems that the only safe IP is the address from the recvfrom().
>
> Currently sdhcp ignores this value, but it should set server IP to
> this. I don't have a patch for this since the suckless sdhcp and my
> sdhcp have diverged a lot here. If you ask nicely I might roll up a
> patch.
>
> All the ODserverid code should be safe to remove.

thanks for all the input on sdhcp. I must admit that I don't know much
about the intrinsics of DHCP, just what it's there for to do (the best
analogy might be the machines in Zion in the Matrix series).

Would you be open to work on a small patchset for it reflecting your
proposals? But before you do that, we might also just want to wait for
feedback by Michael Forney, who seems to be the current active
maintainer.

For anybody wondering what sdhcp is: It lies in the
2f30-git-repositories[0].

With best regards

Laslo

[0]:http://git.2f30.org/sdhcp/
Received on Mon Mar 16 2020 - 18:06:29 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 16 2020 - 18:24:09 CET