From: Felix Fietkau Date: Wed, 25 Jul 2018 08:43:41 +0000 (+0200) Subject: iprule: fix broken in_dev/out_dev checks X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a2f952deaeeb15213eae1dbe047dca30d90a3c0c;p=project%2Fnetifd.git iprule: fix broken in_dev/out_dev checks Since they are both char arrays, they can never be NULL Signed-off-by: Felix Fietkau --- 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;