X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet-ctrl.c;h=74e14c42930c2e565867ea348ea16448af5225a1;hb=f549b22853dfed86175cdf110e9f56bbdb934271;hp=f0bbac522dd8ec1355485c81cdb511c50dbb59a6;hpb=465411cf0c2fd33177d032faf7a5bb59a6501104;p=palacios.releases.git diff --git a/linux_module/palacios-vnet-ctrl.c b/linux_module/palacios-vnet-ctrl.c index f0bbac5..74e14c4 100644 --- a/linux_module/palacios-vnet-ctrl.c +++ b/linux_module/palacios-vnet-ctrl.c @@ -1,7 +1,23 @@ -/* - Palacios VNET Control Module - (c) Lei Xia, 2010 +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2011, Lei Xia + * Copyright (c) 2011, The V3VEE Project + * All rights reserved. + * + * This is free software. You are permitted to use, redistribute, + * and modify it under the terms of the GNU General Public License + * Version 2 (GPLv2). The accompanying COPYING file contains the + * full text of the license. */ +/* Palacios VNET Control Module */ + #include #include #include @@ -611,7 +627,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 +638,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"); }