Revision 85dde9a9

b/net.c
658 658
    VLANClientState *vc;
659 659

  
660 660
    QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
661
        if (vc->info->type == NET_CLIENT_TYPE_NIC)
662
            continue;
661 663
        if (!strcmp(vc->name, id)) {
662 664
            return vc;
663 665
        }
......
1217 1219
    VLANClientState *vc;
1218 1220

  
1219 1221
    vc = qemu_find_netdev(id);
1220
    if (!vc || vc->info->type == NET_CLIENT_TYPE_NIC) {
1222
    if (!vc) {
1221 1223
        qerror_report(QERR_DEVICE_NOT_FOUND, id);
1222 1224
        return -1;
1223 1225
    }
......
1262 1264
            }
1263 1265
        }
1264 1266
    }
1265
    vc = qemu_find_netdev(name);
1267
    QTAILQ_FOREACH(vc, &non_vlan_clients, next) {
1268
        if (!strcmp(vc->name, name)) {
1269
            goto done;
1270
        }
1271
    }
1266 1272
done:
1267 1273

  
1268 1274
    if (!vc) {

Also available in: Unified diff