From 76253e73f9c9c24fec755e485516f3b55d0707b4 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 8 Oct 2014 14:15:45 -0500 Subject: sd-dhcp-client: support non-Ethernet hardware addresses Like Infiniband. See RFC 4390 section 2.1 for details on DHCP and Infiniband; chaddr is zeroed, hlen is set to 0, and htype is set to ARPHRD_INFINIBAND because IB hardware addresses are 20 bytes in length. --- src/network/networkd-dhcp4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/network/networkd-dhcp4.c') diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index e451af8643..63bfa86f99 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -599,7 +599,9 @@ int dhcp4_configure(Link *link) { if (r < 0) return r; - r = sd_dhcp_client_set_mac(link->dhcp_client, &link->mac); + r = sd_dhcp_client_set_mac(link->dhcp_client, + (const uint8_t *) &link->mac, + sizeof (link->mac), ARPHRD_ETHER); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf