- snprintf(comment, sizeof(comment), "ubus:%s[%s] rule %d",
- blobmsg_name(c), blobmsg_name(cur), n++);
-
- blobmsg_for_each_attr(ropt, rule, orem)
+ blobmsg_for_each_attr(ropt, rule, orem) {
+ if (!strcmp(blobmsg_name(ropt), "type"))
+ type = blobmsg_data(ropt);