Displaying 1 result from an estimated 1 matches for "vendor_class_identifier_len".
2009 Apr 07
2
[PATCH] ipconfig: send hostname in DHCP request
...N+2];
+ int i = 4;
memset(&bootp, 0, sizeof(struct bootp_hdr));
@@ -179,12 +183,35 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
vec[1].iov_base = &bootp;
vec[1].iov_len = sizeof(struct bootp_hdr);
- vec[4].iov_base = vendor_class_identifier;
- vec[4].iov_len = vendor_class_identifier_len;
-
DEBUG(("xid %08x secs %d ", bootp.xid, ntohs(bootp.secs)));
- return packet_send(dev, vec, DHCP_IOV_LEN);
+ if (vendor_class_identifier_len > 2) {
+ vec[i].iov_base = vendor_class_identifier;
+ vec[i].iov_len = vendor_class_identifier_len;
+ i++;
+
+ DEBUG(("vendor_cla...