- } else if (opt->type == DHCPV4_OPT_VENDOR_SPECIFIC_INFORMATION &&
- opt->len == sizeof(hnet_internal_data)) {
- if (!memcmp(opt->data, hnet_internal_data, sizeof(hnet_internal_data)))
- return; // Ignoring hnet internal routers
+ } else if (iface->filter_class && opt->type == DHCPV4_OPT_USER_CLASS) {
+ uint8_t *c = opt->data, *cend = &opt->data[opt->len];
+ for (; c < cend && &c[*c] < cend; c = &c[1 + *c]) {
+ size_t elen = strlen(iface->filter_class);
+ if (*c == elen && !memcmp(&c[1], iface->filter_class, elen))
+ return; // Ignore from homenet
+ }