Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-3419

virtualize PPP

    XMLWordPrintable

    Details

      Description

      information from forum:

      2.6.16-026test017
      fc4-ve# rpm -qa | grep ppp
      ppp-2.4.2-7


      16120 open("/dev/ppp", O_RDWR) = -1 EPERM (Operation not permitted)


      drivers/net/ppp_generic.c:
      ...
      static int ppp_open(struct inode *inode, struct file *file)
      {
              /*
               * This could (should?) be enforced by the permissions on /dev/ppp.
               */
              if (!capable(CAP_NET_ADMIN))
                      return -EPERM;
              return 0;
      }
      ...
      CAP_NET_ADMIN -> CAP_VE_NET_ADMIN


      Don't forget to load ppp_async module on the node:
      [root@dhcp0-174 ~]# modprobe ppp_async
      [root@dhcp0-174 ~]# echo $?
      0


      25784 ioctl(10, PPPIOCNEWUNIT, 0x80083c08) = -1 EPERM (Operation not permitted)

      dmesg:
      PPP: couldn't register device ppp0 (-1)

      source:
              ret = register_netdev(dev);
              if (ret != 0) {
                      printk(KERN_ERR "PPP: couldn't register device %s (%d)\n",
                             dev->name, ret);
                      goto out2;
              }


      so register_netdev() failed
            |
           \|/
            |
      register_netdevice():

              ret = -EPERM;
              if (!ve_is_super(get_exec_env()) && ve_is_dev_movable(dev))
                      goto out;


      ppp should be in "movable" list!

      tun, loopback, ... already there

        Attachments

          Activity

            People

            Assignee:
            gorcunov@openvz.org Cyrill Gorcunov
            Reporter:
            vtaras@openvz.org Vasily Tarasov
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: