X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet-ctrl.c;h=429f79db6a2a3061277ae142f0d2d4804c89a2ce;hb=1fc062adedda3f93f7f95395257a808c7b531fc9;hp=f0bbac522dd8ec1355485c81cdb511c50dbb59a6;hpb=465411cf0c2fd33177d032faf7a5bb59a6501104;p=palacios.git diff --git a/linux_module/palacios-vnet-ctrl.c b/linux_module/palacios-vnet-ctrl.c index f0bbac5..429f79d 100644 --- a/linux_module/palacios-vnet-ctrl.c +++ b/linux_module/palacios-vnet-ctrl.c @@ -1,7 +1,8 @@ /* - Palacios VNET Control Module - (c) Lei Xia, 2010 + * Palacios VNET Control Module + * (c) Lei Xia 2010 */ + #include #include #include @@ -611,7 +612,8 @@ route_write(struct file * file, } else if (strnicmp("DEL", token, strlen("DEL")) == 0) { char * idx_str = NULL; uint32_t d_idx; - + struct vnet_route_iter * route = NULL; + idx_str = strsep(&buf_iter, " "); if (!idx_str) { @@ -621,10 +623,14 @@ route_write(struct file * file, d_idx = simple_strtoul(idx_str, &idx_str, 10); - v3_vnet_del_route(d_idx); - - printk("VNET Control: One route deleted\n"); + printk("VNET: deleting route %d\n", d_idx); + list_for_each_entry(route, &(vnet_ctrl_s.route_list), node) { + if (route->idx == d_idx) { + delete_route(route); + break; + } + } } else { printk("Invalid Route command string\n"); }