PERFORCE change 128289 for review
Marko Zec
zec at FreeBSD.org
Mon Oct 29 09:17:57 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=128289
Change 128289 by zec at zec_tca51 on 2007/10/29 16:17:16
When reassigning ifnets from one vnet to another, use
the new vimage_by_name() function to search for the
target vimage / vnet.
Affected files ...
.. //depot/projects/vimage/src/sys/kern/kern_vimage.c#54 edit
Differences ...
==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#54 (text+ko) ====
@@ -302,18 +302,12 @@
if (IS_DEFAULT_VIMAGE(vip))
return (ENXIO);
new_vnet = vip->vi_parent->v_net;
- } else
- LIST_FOREACH(new_vip, &vimage_head, vi_le) {
- if (!vi_child_of(vip, new_vip))
- continue;
- if (strcmp(vi_req->vi_name, new_vip->vi_name) == 0) {
- new_vnet = new_vip->v_net;
- break;
- }
- }
-
- if (new_vnet == NULL)
- return (ENXIO);
+ } else {
+ new_vip = vimage_by_name(vip, vi_req->vi_name);
+ if (new_vip == NULL)
+ return (ENXIO);
+ new_vnet = new_vip->v_net;
+ }
if (ifp == NULL)
ifp = ifunit(vi_req->vi_chroot);
More information about the p4-projects
mailing list