summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-07-25 10:43:41 +0200
committerFelix Fietkau <nbd@nbd.name>2018-07-25 10:43:42 +0200
commita2f952deaeeb15213eae1dbe047dca30d90a3c0c (patch)
tree1fa6750b730022cd626f923fd647cbbaf298aa5e
parent263631ae5a22daa90743d9758f44f1df109dc990 (diff)
iprule: fix broken in_dev/out_dev checks
Since they are both char arrays, they can never be NULL Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--iprule.c4
1 files 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;