From 8174814a507489ebbe8bb85c1004e1f02919ca82 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 22 Nov 2019 18:51:22 +0100 Subject: [PATCH] utils: persist effective extra_src and extra_dest options in state file Signed-off-by: Jo-Philipp Wich --- utils.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/utils.c b/utils.c index a1cba7e..441dbd2 100644 --- a/utils.c +++ b/utils.c @@ -569,6 +569,22 @@ write_zone_uci(struct uci_context *ctx, struct fw3_zone *z, } } + if (z->extra_src) + { + ptr.o = NULL; + ptr.option = "extra_src"; + ptr.value = z->extra_src; + uci_set(ctx, &ptr); + } + + if (z->extra_dest) + { + ptr.o = NULL; + ptr.option = "extra_dest"; + ptr.value = z->extra_dest; + uci_set(ctx, &ptr); + } + sprintf(buf, "0x%x", z->flags[0]); ptr.o = NULL; ptr.option = "__flags_v4"; -- 2.25.1