2014-07-10 17:01:31 +00:00
|
|
|
diff -up dhcp-4.3.1b1/client/dhclient.8.KrJcIv dhcp-4.3.1b1/client/dhclient.8
|
|
|
|
--- dhcp-4.3.1b1/client/dhclient.8.KrJcIv 2014-07-10 17:39:25.852763873 +0200
|
|
|
|
+++ dhcp-4.3.1b1/client/dhclient.8 2014-07-10 17:54:26.841012988 +0200
|
|
|
|
@@ -458,6 +458,9 @@ used to construct a RFC4361 style client
|
2014-02-17 16:46:53 +00:00
|
|
|
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.
|
2014-07-10 17:01:31 +00:00
|
|
|
diff -up dhcp-4.3.1b1/client/dhclient.c.KrJcIv dhcp-4.3.1b1/client/dhclient.c
|
|
|
|
--- dhcp-4.3.1b1/client/dhclient.c.KrJcIv 2014-07-10 17:54:26.829013157 +0200
|
|
|
|
+++ dhcp-4.3.1b1/client/dhclient.c 2014-07-10 17:55:50.155835918 +0200
|
|
|
|
@@ -73,7 +73,7 @@ struct sockaddr_in sockaddr_broadcast;
|
2014-02-17 16:46:53 +00:00
|
|
|
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
|
2014-07-10 17:01:31 +00:00
|
|
|
@@ -1301,7 +1301,7 @@ static void setup_ib_interface(struct in
|
2014-02-17 16:46:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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:
|
2014-07-10 17:01:31 +00:00
|
|
|
@@ -3342,6 +3342,7 @@ form_duid(struct data_string *duid, cons
|
2014-02-17 16:46:53 +00:00
|
|
|
struct interface_info *ip;
|
|
|
|
int len;
|
2014-07-10 17:01:31 +00:00
|
|
|
char *str;
|
2014-02-17 16:46:53 +00:00
|
|
|
+ unsigned hlen;
|
|
|
|
|
|
|
|
/* For now, just use the first interface on the list. */
|
|
|
|
ip = interfaces;
|
2014-07-10 17:01:31 +00:00
|
|
|
@@ -3365,6 +3366,11 @@ form_duid(struct data_string *duid, cons
|
2014-02-17 16:46:53 +00:00
|
|
|
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.
|
2014-07-10 17:01:31 +00:00
|
|
|
@@ -3372,7 +3378,7 @@ form_duid(struct data_string *duid, cons
|
2014-02-17 16:46:53 +00:00
|
|
|
* 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))
|
2014-07-10 17:01:31 +00:00
|
|
|
@@ -3386,12 +3392,12 @@ form_duid(struct data_string *duid, cons
|
2014-02-17 16:46:53 +00:00
|
|
|
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);
|
|
|
|
}
|
2014-07-10 17:01:31 +00:00
|
|
|
|
|
|
|
str = quotify_buf(duid->data, duid->len, MDL);
|