79 lines
2.8 KiB
Diff
79 lines
2.8 KiB
Diff
diff -up dhcp-4.3.0/client/dhclient.8.duidv4 dhcp-4.3.0/client/dhclient.8
|
|
--- dhcp-4.3.0/client/dhclient.8.duidv4 2014-02-18 15:52:44.564123664 +0100
|
|
+++ dhcp-4.3.0/client/dhclient.8 2014-02-18 15:52:44.629122766 +0100
|
|
@@ -454,6 +454,9 @@ used to construct a RFC4361 style client
|
|
in the client's messages. This client id can be overridden by
|
|
setting a client id in the configuration file. Overridding the
|
|
client id in this fashion is discouraged.
|
|
+This option is turned on by default, if you want to redefine or turn off
|
|
+sending of client id, use send dhcp-client-identifier = "better identifier"
|
|
+or send dhcp-client-identifier = "" in /etc/dhcp/dhclient.conf.
|
|
.TP
|
|
.BI \-I
|
|
Use the standard DDNS scheme from RFCs 4701 & 4702.
|
|
diff -up dhcp-4.3.0/client/dhclient.c.duidv4 dhcp-4.3.0/client/dhclient.c
|
|
--- dhcp-4.3.0/client/dhclient.c.duidv4 2014-02-18 15:52:44.626122807 +0100
|
|
+++ dhcp-4.3.0/client/dhclient.c 2014-02-18 15:52:44.630122752 +0100
|
|
@@ -72,7 +72,7 @@ struct sockaddr_in sockaddr_broadcast;
|
|
struct in_addr giaddr;
|
|
struct data_string default_duid;
|
|
int duid_type = 0;
|
|
-int duid_v4 = 0;
|
|
+int duid_v4 = 1;
|
|
int std_dhcid = 0;
|
|
|
|
/* ASSERT_STATE() does nothing now; it used to be
|
|
@@ -1270,7 +1270,7 @@ static void setup_ib_interface(struct in
|
|
}
|
|
|
|
/* No client ID specified */
|
|
- log_fatal("dhcp-client-identifier must be specified for InfiniBand");
|
|
+ //log_fatal("dhcp-client-identifier must be specified for InfiniBand");
|
|
}
|
|
|
|
/* Individual States:
|
|
@@ -3299,6 +3299,7 @@ form_duid(struct data_string *duid, cons
|
|
{
|
|
struct interface_info *ip;
|
|
int len;
|
|
+ unsigned hlen;
|
|
|
|
/* For now, just use the first interface on the list. */
|
|
ip = interfaces;
|
|
@@ -3322,6 +3323,11 @@ form_duid(struct data_string *duid, cons
|
|
if (duid_type == 0)
|
|
duid_type = stateless ? DUID_LL : DUID_LLT;
|
|
|
|
+ if (ip->hw_address.hbuf[0] == HTYPE_INFINIBAND)
|
|
+ hlen = 9;
|
|
+ else
|
|
+ hlen = ip->hw_address.hlen;
|
|
+
|
|
/*
|
|
* 2 bytes for the 'duid type' field.
|
|
* 2 bytes for the 'htype' field.
|
|
@@ -3329,7 +3335,7 @@ form_duid(struct data_string *duid, cons
|
|
* enough bytes for the hardware address (note that hw_address has
|
|
* the 'htype' on byte zero).
|
|
*/
|
|
- len = 4 + (ip->hw_address.hlen - 1);
|
|
+ len = 4 + (hlen - 1);
|
|
if (duid_type == DUID_LLT)
|
|
len += 4;
|
|
if (!buffer_allocate(&duid->buffer, len, MDL))
|
|
@@ -3343,12 +3349,12 @@ form_duid(struct data_string *duid, cons
|
|
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
|
putULong(duid->buffer->data + 4, cur_time - DUID_TIME_EPOCH);
|
|
memcpy(duid->buffer->data + 8, ip->hw_address.hbuf + 1,
|
|
- ip->hw_address.hlen - 1);
|
|
+ hlen - 1);
|
|
} else {
|
|
putUShort(duid->buffer->data, DUID_LL);
|
|
putUShort(duid->buffer->data + 2, ip->hw_address.hbuf[0]);
|
|
memcpy(duid->buffer->data + 4, ip->hw_address.hbuf + 1,
|
|
- ip->hw_address.hlen - 1);
|
|
+ hlen - 1);
|
|
}
|
|
|
|
return ISC_R_SUCCESS;
|