summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/swconfig/src/swlib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c
index c2316d068..20e727eb5 100644
--- a/package/swconfig/src/swlib.c
+++ b/package/swconfig/src/swlib.c
@@ -397,6 +397,9 @@ int swlib_set_attr_string(struct switch_dev *dev, struct switch_attr *a, int por
val.value.ports = ports;
break;
case SWITCH_TYPE_NOVAL:
+ if (str && !strcmp(str, "0"))
+ return 0;
+
break;
default:
return -1;