~ubuntu-branches/ubuntu/lucid/vzctl/lucid

« back to all changes in this revision

Viewing changes to src/lib/net.c

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2008-01-27 10:24:49 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080127102449-ivjpirh4dyshc0cl
Tags: 3.0.22-3
Correction for #459717. Thanks to eyck <eyck.debian@kuszelas.eu> for the
report.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
{
120
120
        char *argv[3];
121
121
        char *envp[10];
122
 
        const char *script;
 
122
        char *script;
123
123
        int ret;
124
124
        char buf[STR_SIZE];
125
125
        int i = 0;
146
146
                default:
147
147
                        return 0;
148
148
        }
149
 
        argv[0] = (char *)script;
 
149
        argv[0] = script;
150
150
        argv[1] = NULL;
151
151
        ret = run_script(script, argv, envp, 0);
152
152
        free_arg(envp);
170
170
        int inv_op;
171
171
 
172
172
        list_for_each(ip, ip_h, list) {
173
 
                if ((ret = ip_ctl(h, veid, op, ip->val))) 
 
173
                if ((ret = ip_ctl(h, veid, op, ip->val)))
174
174
                        break;
175
175
        }
176
176
        if (ret && rollback) {
199
199
                return ret;
200
200
        if ((ret = run_net_script(veid, ADD, ip_h, state, net->skip_arpdetect)))
201
201
                vps_ip_ctl(h, veid, VE_IP_DEL, ip_h, 0);
202
 
        
 
202
 
203
203
        return ret;
204
204
}
205
205
 
247
247
        ve_netdev.veid = veid;
248
248
        ve_netdev.op = op;
249
249
        ve_netdev.dev_name = name;
250
 
        if (ioctl(h->vzfd, VZCTL_VE_NETDEV, &ve_netdev) < 0) 
 
250
        if (ioctl(h->vzfd, VZCTL_VE_NETDEV, &ve_netdev) < 0)
251
251
                return VZ_NETDEV_ERROR;
252
252
        return 0;
253
253
}
309
309
        }
310
310
        if (net->ipv6_net != YES) {
311
311
                if (remove_ipv6_addr(net))
312
 
                        logger(0, 0, "Warning: ipv6 support disabled");
 
312
                        logger(0, 0, "WARNING: IPv6 support is disabled");
313
313
        }
314
314
        if (op == ADD) {
315
315
                if (net->delall == YES)
344
344
                if (token == NULL)
345
345
                        continue;
346
346
                if (parse_int(token, &id))
347
 
                        continue;       
 
347
                        continue;
348
348
                if (veid != id)
349
349
                        continue;
350
350
                if ((token = strtok(NULL, " ")) != NULL)
395
395
        for (;;) {
396
396
                veip.ip = addr;
397
397
                ret = ioctl(h->vzfd, VZCTL_GET_VEIPS, &veip);
398
 
                if (ret < 0) 
 
398
                if (ret < 0)
399
399
                        goto out;
400
400
                else if (ret <= veip.num)
401
401
                        break;
424
424
{
425
425
        int ret;
426
426
        ret = get_vps_ip_ioctl(h, veid, ip_h);
427
 
        if (ret < 0) 
 
427
        if (ret < 0)
428
428
                ret = get_vps_ip_proc(veid, ip_h);
429
429
        if (ret < 0)
430
430
                free_str_param(ip_h);