+ if ((c = tb[IFACE_ATTR_PREFIX_FILTER])) {
+ const char *str = blobmsg_get_string(c);
+ char *astr = malloc(strlen(str) + 1);
+ char *delim;
+ int l;
+ if (!astr || !strcpy(astr, str) ||
+ (delim = strchr(astr, '/')) == NULL || (*(delim++) = 0) ||
+ sscanf(delim, "%i", &l) == 0 || l > 128 ||
+ inet_pton(AF_INET6, astr, &iface->pio_filter_addr) == 0) {
+ iface->pio_filter_length = 0;
+ } else {
+ iface->pio_filter_length = l;
+ }
+ if (astr)
+ free(astr);
+ }
+