Browse Source

swconfig: fix vlan/port configs being applied to all switches

Check devn instead of dev (which will never be null at this point).

SVN-Revision: 28362
Jonas Gorski 14 years ago
parent
commit
936320f1f9
2 changed files with 3 additions and 3 deletions
  1. 1 1
      package/swconfig/Makefile
  2. 2 2
      package/swconfig/src/uci.c

+ 1 - 1
package/swconfig/Makefile

@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=swconfig
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk

+ 2 - 2
package/swconfig/src/uci.c

@@ -183,7 +183,7 @@ found:
 					port = o->v.string;
 				}
 			}
-			if (!dev || !port || !port[0])
+			if (!devn || !port || !port[0])
 				continue;
 
 			port_n = strtoul(port, &port_err, 0);
@@ -208,7 +208,7 @@ found:
 					vlan = o->v.string;
 				}
 			}
-			if (!dev || !vlan || !vlan[0])
+			if (!devn || !vlan || !vlan[0])
 				continue;
 
 			vlan_n = strtoul(vlan, &vlan_err, 0);