From a2f952deaeeb15213eae1dbe047dca30d90a3c0c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 25 Jul 2018 10:43:41 +0200 Subject: [PATCH] iprule: fix broken in_dev/out_dev checks Since they are both char arrays, they can never be NULL Signed-off-by: Felix Fietkau --- iprule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iprule.c b/iprule.c index 105f469..67ef28a 100644 --- a/iprule.c +++ b/iprule.c @@ -70,10 +70,10 @@ const struct uci_blob_param_list rule_attr_list = { /* interface based rules are dynamic. */ static bool rule_ready(struct iprule *rule) { - if (rule->flags & IPRULE_OUT && rule->out_dev == NULL) + if (rule->flags & IPRULE_OUT && !rule->out_dev[0]) return false; - if (rule->flags & IPRULE_IN && rule->in_dev == NULL) + if (rule->flags & IPRULE_IN && !rule->in_dev[0]) return false; return true; -- 2.25.1