diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2020-10-26 14:09:13 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2020-10-28 14:44:43 +0100 |
commit | 14b66dbc92fbae3bd7fc8be4bba476dd1bbb5795 (patch) | |
tree | a607ee8d2528385ef95a1aa3729aaec926950b24 /src/systemd/sd-dhcp-client.h | |
parent | b8162cd200c69be509475b8f2184a5ac651fc2b0 (diff) | |
download | systemd-14b66dbc92fbae3bd7fc8be4bba476dd1bbb5795.tar.gz |
dhcp4: fix DHCP on InfiniBand interfaces
With these patches applied, networkd is successfully able to get an
address from a DHCP server on an IPoIB interface.
1)
Makes networkd pass the actual interface type to the dhcp client,
instead of hardcoding it to Ethernet.
2)
Fixes some issues in handling the larger (20 Byte) IB MAC addresses in
the dhcp code.
3)
Add a new field to networkds Link struct, which holds the interface
broadcast address.
3.1)
Modify the DHCP code to also expect the broadcast address as parameter.
On an Ethernet-Interface the Broadcast address never changes and is always
all 6 bytes set to 0xFF.
On an IB one however it is not neccesarily always the same, thus
fetching the actual address from the interface is neccesary.
4)
Only the last 8 bytes of an IB MAC are stable, so when using an IB MAC to
generate a client ID, only pass those 8 bytes.
Diffstat (limited to 'src/systemd/sd-dhcp-client.h')
-rw-r--r-- | src/systemd/sd-dhcp-client.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h index ac3b5b369c..e0aa93a55b 100644 --- a/src/systemd/sd-dhcp-client.h +++ b/src/systemd/sd-dhcp-client.h @@ -126,6 +126,7 @@ int sd_dhcp_client_set_ifindex( int sd_dhcp_client_set_mac( sd_dhcp_client *client, const uint8_t *addr, + const uint8_t *bcast_addr, size_t addr_len, uint16_t arp_type); int sd_dhcp_client_set_client_id( |