Comment 18 for bug 1034161

Revision history for this message
Aaron Rosen (arosen) wrote :

Hi Yang,

I just looked at the ip2route code and it does:

 if (setns(netns, CLONE_NEWNET) < 0) {
      fprintf(stderr, "seting the network namespace failed: %s\n",
         strerror(errno));
      return -1;
   }

static int setns(int fd, int nstype)
{
#ifdef __NR_setns
   return syscall(__NR_setns, fd, nstype);
#else
   errno = ENOSYS;
   return -1;
#endif
}

So it seem on the ip binary when it was built __NR_setns was defined so errno ENOSYS aka Function not implemented. Perhaps rebuilding iproute2 will help you assuming this is defined.