diff options
author | Hidde van der Heide <hvanderheide@nexuz.net> | 2017-11-09 10:14:02 +0100 |
---|---|---|
committer | Hidde van der Heide <hvanderheide@nexuz.net> | 2017-11-09 10:14:02 +0100 |
commit | ee957e083153b3bd42231836ddb29e6bbf843aa0 (patch) | |
tree | 54eb36029548065aaaec9b04b68bf48a1da1b794 /src/lib/protocols/dhcp.c | |
parent | 441e43c167a88021854b56852e38a2317c2ac5bf (diff) | |
parent | c9f32ee76dbc5e323d321b088562df980d2f525f (diff) |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'src/lib/protocols/dhcp.c')
-rw-r--r-- | src/lib/protocols/dhcp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/protocols/dhcp.c b/src/lib/protocols/dhcp.c index cdf33947e..c46cc1c91 100644 --- a/src/lib/protocols/dhcp.c +++ b/src/lib/protocols/dhcp.c @@ -104,6 +104,13 @@ void ndpi_search_dhcp_udp(struct ndpi_detection_module_struct *ndpi_struct, stru "%02X", dhcp->options[i+2+idx] & 0xFF); 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 */) { char *name = (char*)&dhcp->options[i+2]; int j = 0; |