From: Jonas Gorski Date: Mon, 3 Oct 2011 23:39:31 +0000 (+0000) Subject: swconfig: fix vlan/port configs being applied to all switches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5438678549863ab375e65a451af344dc7edc302b;p=openwrt%2Fsvn-archive%2Farchive.git 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 --- diff --git a/package/swconfig/Makefile b/package/swconfig/Makefile index 91939bb73f..099058e5f0 100644 --- a/package/swconfig/Makefile +++ b/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 diff --git a/package/swconfig/src/uci.c b/package/swconfig/src/uci.c index 1de689ce6e..893e3d1dd8 100644 --- a/package/swconfig/src/uci.c +++ b/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);