swconfig: fix vlan/port configs being applied to all switches
authorJonas Gorski <jogo@openwrt.org>
Mon, 3 Oct 2011 23:39:31 +0000 (23:39 +0000)
committerJonas Gorski <jogo@openwrt.org>
Mon, 3 Oct 2011 23:39:31 +0000 (23:39 +0000)
Check devn instead of dev (which will never be null at this point).

SVN-Revision: 28362

package/swconfig/Makefile
package/swconfig/src/uci.c

index 91939bb73f4c33cef83c924b3d591732507f5542..099058e5f076ee6f87ad1b5d2ebec5fc07741917 100644 (file)
@@ -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
index 1de689ce6e3e303641a36a273064ccf5257044be..893e3d1dd8f61e02678884f9beddb81dbd839fe8 100644 (file)
@@ -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);