Revision 4b66f92b

View differences:

src/vm/VirtualMachine.cc
787 787
static void parse_context_network(const char* vars[][2], int num_vars,
788 788
        VectorAttribute * context, VectorAttribute * nic)
789 789
{
790
    string name   = nic->vector_value("NETWORK");
791 790
    string nic_id = nic->vector_value("NIC_ID");
792 791

  
793 792
    for (int i=0; i < num_vars; i++)
......
810 809
        {
811 810
            ostringstream cval_ss;
812 811

  
813
            cval_ss << "$NETWORK["<< vars[i][1] <<", NETWORK=\""<< name <<"\"]";
812
            cval_ss << "$NETWORK["<< vars[i][1] <<", NIC_ID=\""<< nic_id <<"\"]";
814 813
            cval = cval_ss.str();
815 814
        }
816 815

  
src/vm/vm_var_syntax.cc
231 231

  
232 232
    attr_value.clear();
233 233

  
234
    if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
234
    if ( net_name.empty() ||
235
        (net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID"))
235 236
    {
236 237
        return;
237 238
    }
src/vm/vm_var_syntax.y
176 176

  
177 177
    attr_value.clear();
178 178

  
179
    if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
179
    if ( net_name.empty() ||
180
        (net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID"))
180 181
    {
181 182
        return;
182 183
    }

Also available in: Unified diff