diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-07-25 10:43:41 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-07-25 10:43:42 +0200 |
commit | a2f952deaeeb15213eae1dbe047dca30d90a3c0c (patch) | |
tree | 1fa6750b730022cd626f923fd647cbbaf298aa5e | |
parent | 263631ae5a22daa90743d9758f44f1df109dc990 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |