X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/7bc22cd09969904278e8dfb376b9232fd41d0129..fef64804ddf489a29279204713303767c8c2238d:/package/swconfig/src/swlib.c diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c index 04b3bef49..59456a33d 100644 --- a/package/swconfig/src/swlib.c +++ b/package/swconfig/src/swlib.c @@ -581,11 +581,13 @@ add_switch(struct nl_msg *msg, void *arg) if (tb[SWITCH_ATTR_ID]) dev->id = nla_get_u32(tb[SWITCH_ATTR_ID]); if (tb[SWITCH_ATTR_NAME]) - dev->name = strdup(nla_get_string(tb[SWITCH_ATTR_DEV_NAME])); + dev->name = strdup(nla_get_string(tb[SWITCH_ATTR_NAME])); if (tb[SWITCH_ATTR_PORTS]) dev->ports = nla_get_u32(tb[SWITCH_ATTR_PORTS]); if (tb[SWITCH_ATTR_VLANS]) dev->vlans = nla_get_u32(tb[SWITCH_ATTR_VLANS]); + if (tb[SWITCH_ATTR_CPU_PORT]) + dev->cpu_port = nla_get_u32(tb[SWITCH_ATTR_CPU_PORT]); if (!sa->head) { sa->head = dev;