#include "odhcpd.h"
#include "dhcpv6.h"
+static const char *excluded_class = "HOMENET";
+
static void relay_client_request(struct sockaddr_in6 *source,
const void *data, size_t len, struct interface *iface);
if (olen != ntohs(dest.serverid_length) ||
memcmp(odata, &dest.duid_type, olen))
return; // Not for us
+ } else if (otype == DHCPV6_OPT_USER_CLASS) {
+ uint8_t *c = odata, *cend = &odata[olen];
+ for (; &c[2] <= cend && &c[2 + (c[0] << 8) + c[1]] <= cend; c = &c[2 + (c[0] << 8) + c[1]]) {
+ size_t elen = strlen(excluded_class);
+ if (((((size_t)c[0]) << 8) | c[1]) == elen && !memcmp(&c[2], excluded_class, elen))
+ return; // Ignore from homenet
+ }
}
}
#define DHCPV6_OPT_STATUS 13
#define DHCPV6_OPT_RELAY_MSG 9
#define DHCPV6_OPT_AUTH 11
+#define DHCPV6_OPT_USER_CLASS 15
#define DHCPV6_OPT_INTERFACE_ID 18
#define DHCPV6_OPT_RECONF_MSG 19
#define DHCPV6_OPT_RECONF_ACCEPT 20