mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
networkd: add ability to use BOOTP
Add the following network option to enable BOOTP: [DHCPv4] Bootp=yes This will allow a two message request / reply sequence that doesn't require DHCP message types.
This commit is contained in:
parent
9120ae7099
commit
8a173aa996
@ -2525,6 +2525,17 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>BOOTP=</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>Takes a boolean. The DHCPv4 client can be configured to communicate with BOOP servers that
|
||||||
|
don't accept Option 53, DHCP Message Type. In this configuration, a BOOTP Request is sent without
|
||||||
|
any options by default. A BOOTP reply that contains Option 1: Subnet Mask is expected.</para>
|
||||||
|
|
||||||
|
<xi:include href="version-info.xml" xpointer="v257"/>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<!-- How to use the DHCP lease -->
|
<!-- How to use the DHCP lease -->
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
@ -1489,6 +1489,10 @@ static int dhcp4_configure(Link *link) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to allocate DHCPv4 client: %m");
|
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to allocate DHCPv4 client: %m");
|
||||||
|
|
||||||
|
r = sd_dhcp_client_set_bootp(link->dhcp_client, link->network->dhcp_send_bootp);
|
||||||
|
if (r < 0)
|
||||||
|
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to set BOOTP flag: %m");
|
||||||
|
|
||||||
r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
|
r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to attach event to DHCPv4 client: %m");
|
return log_link_debug_errno(link, r, "DHCPv4 CLIENT: Failed to attach event to DHCPv4 client: %m");
|
||||||
|
@ -243,6 +243,7 @@ DHCPv4.QuickAck, config_parse_bool,
|
|||||||
DHCPv4.RequestOptions, config_parse_dhcp_request_options, AF_INET, 0
|
DHCPv4.RequestOptions, config_parse_dhcp_request_options, AF_INET, 0
|
||||||
DHCPv4.Anonymize, config_parse_bool, 0, offsetof(Network, dhcp_anonymize)
|
DHCPv4.Anonymize, config_parse_bool, 0, offsetof(Network, dhcp_anonymize)
|
||||||
DHCPv4.SendHostname, config_parse_dhcp_send_hostname, AF_INET, 0
|
DHCPv4.SendHostname, config_parse_dhcp_send_hostname, AF_INET, 0
|
||||||
|
DHCPv4.BOOTP, config_parse_bool, 0, offsetof(Network, dhcp_send_bootp)
|
||||||
DHCPv4.Hostname, config_parse_hostname, 0, offsetof(Network, dhcp_hostname)
|
DHCPv4.Hostname, config_parse_hostname, 0, offsetof(Network, dhcp_hostname)
|
||||||
DHCPv4.Label, config_parse_dhcp_label, 0, offsetof(Network, dhcp_label)
|
DHCPv4.Label, config_parse_dhcp_label, 0, offsetof(Network, dhcp_label)
|
||||||
DHCPv4.RequestBroadcast, config_parse_tristate, 0, offsetof(Network, dhcp_broadcast)
|
DHCPv4.RequestBroadcast, config_parse_tristate, 0, offsetof(Network, dhcp_broadcast)
|
||||||
|
@ -179,6 +179,7 @@ struct Network {
|
|||||||
OrderedHashmap *dhcp_client_send_vendor_options;
|
OrderedHashmap *dhcp_client_send_vendor_options;
|
||||||
char *dhcp_netlabel;
|
char *dhcp_netlabel;
|
||||||
NFTSetContext dhcp_nft_set_context;
|
NFTSetContext dhcp_nft_set_context;
|
||||||
|
bool dhcp_send_bootp;
|
||||||
|
|
||||||
/* DHCPv6 Client support */
|
/* DHCPv6 Client support */
|
||||||
bool dhcp6_use_address;
|
bool dhcp6_use_address;
|
||||||
|
Loading…
Reference in New Issue
Block a user