fw3 was not parsing the 'weekdays' option of rules correctly, it would
only put the first day listed into the iptables --weekdays option.

Signed-off-by: Christopher Ng <[email protected]>
---
 iptables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iptables.c b/iptables.c
index e7e8b59..9e8fa74 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1208,7 +1208,7 @@ fw3_ipt_rule_time(struct fw3_ipt_rule *r, struct fw3_time 
*time)
                                        rem--;
                                }
 
-                               p += snprintf(p, rem, "%u", i);
+                               len = snprintf(p, rem, "%u", i);
 
                                if (len < 0 || len >= rem)
                                        break;
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to