ipsets: permit default timeout of 0
[project/firewall3.git] / options.c
index aed0cfb8a441dcd44ca9c478add57aa49bed20cd..61317860308d09e4ac0d14e2b3f309930d5a9cd0 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1170,6 +1170,9 @@ fw3_parse_blob_options(void *s, const struct fw3_option *opts,
                                                if (blobmsg_type(e) == BLOBMSG_TYPE_INT32) {
                                                        snprintf(buf, sizeof(buf), "%d", blobmsg_get_u32(e));
                                                        v = buf;
+                                               } else if (blobmsg_type(o) == BLOBMSG_TYPE_BOOL) {
+                                                       snprintf(buf, sizeof(buf), "%d", blobmsg_get_bool(o));
+                                                       v = buf;
                                                } else {
                                                        v = blobmsg_get_string(e);
                                                }
@@ -1189,6 +1192,9 @@ fw3_parse_blob_options(void *s, const struct fw3_option *opts,
                                if (blobmsg_type(o) == BLOBMSG_TYPE_INT32) {
                                        snprintf(buf, sizeof(buf), "%d", blobmsg_get_u32(o));
                                        v = buf;
+                               } else if (blobmsg_type(o) == BLOBMSG_TYPE_BOOL) {
+                                       snprintf(buf, sizeof(buf), "%d", blobmsg_get_bool(o));
+                                       v = buf;
                                } else {
                                        v = blobmsg_get_string(o);
                                }