Merge branch 'dsokoloski-upstream-dhcp-client-ident' into dev
This commit is contained in:
@@ -1031,6 +1031,7 @@ struct ndpi_flow_struct {
|
|||||||
|
|
||||||
struct {
|
struct {
|
||||||
char fingerprint[48];
|
char fingerprint[48];
|
||||||
|
char class_ident[48];
|
||||||
} dhcp;
|
} dhcp;
|
||||||
} protos;
|
} protos;
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,13 @@ void ndpi_search_dhcp_udp(struct ndpi_detection_module_struct *ndpi_struct, stru
|
|||||||
"%02X", dhcp->options[i+2+idx] & 0xFF);
|
"%02X", dhcp->options[i+2+idx] & 0xFF);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
}
|
}
|
||||||
|
} else if(id == 60 /* Class Identifier */) {
|
||||||
|
char *name = (char*)&dhcp->options[i+2];
|
||||||
|
int j = 0;
|
||||||
|
|
||||||
|
j = ndpi_min(len, sizeof(flow->protos.dhcp.class_ident)-1);
|
||||||
|
strncpy((char*)flow->protos.dhcp.class_ident, name, j);
|
||||||
|
flow->protos.dhcp.class_ident[j] = '\0';
|
||||||
} else if(id == 12 /* Host Name */) {
|
} else if(id == 12 /* Host Name */) {
|
||||||
char *name = (char*)&dhcp->options[i+2];
|
char *name = (char*)&dhcp->options[i+2];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user