[systemd-devel] [PATCH 4/4] libsystemd-network: Add Init-Reboot support

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Mar 14 20:02:13 PDT 2014


On Thu, Mar 13, 2014 at 01:01:52PM +0200, Patrik Flykt wrote:
> Init-Reboot is tried if a client IP address has been given when
> the DHCP client is started. In Init-Reboot, start by sending a
> broadcasted DHCP Request including the supplied client IP address
> but without the server identifier. After sending the request,
> enter Reboot state.
> 
> If a DHCP Ack is received, proceed to Bound state as usual. If a
> DHCP Nak is received or the first timeout triggers, start the
> address acquisition over from DHCP Init state.
> 
> See RFC 2131, sections 4.3.2, 4.4, 4.4.1 and 4.4.2 for details.
Looks good in general.

This means that I can complain about spelling :) There's no such word
as "broadcasted". Past tense and adjective are "broadcast".

> -                        if (client->state == DHCP_STATE_REQUESTING)
> +                        if (client->state == DHCP_STATE_REQUESTING ||
> +                            client->state == DHCP_STATE_REBOOTING)
Using IN_SET(client->state, DHCP_STATE_REQUESTING,  DHCP_STATE_REBOOTING)
seems to be visually less cluttered.

Zbyszek


More information about the systemd-devel mailing list