summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-server.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2014-10-08 14:15:45 -0500
committerTom Gundersen <teg@jklm.no>2014-10-11 12:15:54 +0200
commit76253e73f9c9c24fec755e485516f3b55d0707b4 (patch)
treeae99dc09b50a8d8de2428dbc6e6b57f51ef6776c /src/libsystemd-network/sd-dhcp-server.c
parent5482192e5774f52f2af0665a3b58539295e9c0a4 (diff)
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.
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-server.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
index a6d6178e72..24fedd2375 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/sd-dhcp-server.c
@@ -392,8 +392,8 @@ static int server_message_init(sd_dhcp_server *server, DHCPPacket **ret,
return -ENOMEM;
r = dhcp_message_init(&packet->dhcp, BOOTREPLY,
- be32toh(req->message->xid), type, req->max_optlen,
- &optoffset);
+ be32toh(req->message->xid), type, ARPHRD_ETHER,
+ req->max_optlen, &optoffset);
if (r < 0)
return r;
@@ -513,8 +513,8 @@ static int server_send_forcerenew(sd_dhcp_server *server, be32_t address,
return -ENOMEM;
r = dhcp_message_init(&packet->dhcp, BOOTREPLY, 0,
- DHCP_FORCERENEW, DHCP_MIN_OPTIONS_SIZE,
- &optoffset);
+ DHCP_FORCERENEW, ARPHRD_ETHER,
+ DHCP_MIN_OPTIONS_SIZE, &optoffset);
if (r < 0)
return r;