OpenVZ Forum


Home » Mailing lists » Users » trouble with veth device in combination with long veid
Re: trouble with veth device in combination with long veid [message #13889 is a reply to message #13845] Thu, 07 June 2007 07:45 Go to previous messageGo to previous message
kfh is currently offline  kfh
Messages: 28
Registered: October 2006
Junior Member
On Wednesday den 6. June 2007 17:14:57 Nils Domrose wrote:
> Hi,
>
> we are facing a problem with veth device in combination with long veids.
> if we configure a veth device as described in the wiki, we are unable
> to start that VE with the following error:
>

In veth.c a buffer with length 11 is allocated.
The buffer is used as follows:
snprintf(buf, sizeof(buf), "VEID=%d", veid);

As 6 characters are used for static content (VEID= + '\0'), only 5
characters are left. Your VEID (249104) is 6 characters long.

Apply the following patch, and you should be running.
(An alternative is to limit your VEID in the range 100 to <= 99999)


--- a/src/lib/veth.c
+++ b/src/lib/veth.c
@@ -90,7 +90,7 @@ static int veth_dev_remove(vps_handler *h, envid_t veid, veth_dev *dev)
static int run_vznetcfg(envid_t veid, veth_dev *dev)
{
int ret;
- char buf[11];
+ char buf[12];
char *argv[] = {VZNETCFG, "init", "veth", NULL, NULL};
char *env[2];

(Last line is empty)

Regards,
Kristian Høgh
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OpenVZ to Virtozzo
Next Topic: /dev/tty0
Goto Forum:
  


Current Time: Sat Aug 23 04:07:08 GMT 2025

Total time taken to generate the page: 0.06484 seconds