On Mon, Sep 08, 2008 at 03:59:55PM +0400, Evgeniy Sokolov wrote:
This patch add possibility to load network configuration for container
in OpenVZ driver.
It support routing network and bridge devices. This types is currently
supported in create/define command.
Also, patch contain fix to small bug in openvzReadConfigParam method.
It was too late to add this to 0.4.5 but ...
@@ -298,10 +442,13 @@ openvzReadConfigParam(int vpsid ,const c
if (STREQLEN(line, param, strlen(param))) {
sf = line;
sf += strlen(param);
- if (sf[0] == '=' && (token = strtok_r(sf,"\"\t=\n", &saveptr)) != NULL) {
- strncpy(value, token, maxlen) ;
- value[maxlen-1] = '\0';
- found = 1;
+ if (sf[0] == '=' && sf[1] != '\0' ) {
+ sf ++;
+ if ((token = strtok_r(sf,"\"\t\n", &saveptr)) != NULL) {
+ strncpy(value, token, maxlen) ;
+ value[maxlen-1] = '\0';
+ found = 1;
+ }
}
}
}
I commited that bug fix before the release though,
Ok. Bug arise only during loading network configuration. Previous method
works good without networking.
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list