[OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain

Daniel Golle daniel at makrotopia.org
Thu Apr 28 08:25:02 EDT 2016


Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 rules.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.c b/rules.c
index 756c78d..e20442e 100644
--- a/rules.c
+++ b/rules.c
@@ -270,7 +270,7 @@ append_chain(struct fw3_ipt_rule *r, struct fw3_rule *rule)
 	{
 		snprintf(chain, sizeof(chain), "zone_%s_notrack", rule->src.name);
 	}
-	else if (rule->target == FW3_FLAG_MARK)
+	else if (rule->target == FW3_FLAG_MARK && (rule->_src || rule->src.any))
 	{
 		snprintf(chain, sizeof(chain), "PREROUTING");
 	}
-- 
2.8.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list