int main(int argc, char *argv[])
{
int pipefd[2];
pid_t pid;
unsigned long flags = CLONE_NEWNET;
if(system("ip link add name FOO type dummy"))
return 1;
if(pipe(pipefd) == -1) {
perror("pipe");
return 1;
}
pid = fork();
if(pid == -1) {
perror("fork");
return 1;
}
if(pid) {
char buf[256];
read(pipefd[0], buf, 1);
snprintf(buf, sizeof(buf), "ip link set FOO netns %d", pid);
system(buf);
} else {
if(unshare(flags) == -1) {
perror("unshare");
return 1;
}
write(pipefd[1], "a", 1);
system("ip link set FOO netns 1");
return 0;
}
waitpid(pid, NULL, 0);
system("ip link show");
system("ip link del FOO");
return 0;
}
--
Martín Ferrari
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTin_KDKEejs1ld-qv5jOyuALysjZ8NLC2-786htJ@mail.gmail.com">http://lists.debian.org/AANLkTin_KDKEejs1ld-qv5jOyuALysjZ8NLC2-786htJ@mail.gmail.com
07-22-2010, 04:43 PM
Bug#577640: Another oops + repost
Martín Ferrari <martin.ferrari@gmail.com> writes:
> Hi again,
>
> First of all, I would like to know if anybody was able to fix this
> problem that got kinda lost in the thread:
I can't reproduce this on 2.6.35-rc1+
Can you please test a 2.6.35-rc version? If you can still reproduce
it there can you send me your .config? Otherwise I expect my last
round of changes to sysfs fixed whatever was the underlying problem.
Thanks,
Eric
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: m1zkxjwjq9.fsf@fess.ebiederm.org">http://lists.debian.org/m1zkxjwjq9.fsf@fess.ebiederm.org
07-26-2010, 03:21 AM
Martín Ferrari
Bug#577640: Another oops + repost
Hi,
On Thu, Jul 22, 2010 at 18:43, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> First of all, I would like to know if anybody was able to fix this
>> problem *that got kinda lost in the thread:
>
> I can't reproduce this on 2.6.35-rc1+
>
> Can you please test a 2.6.35-rc version? *If you can still reproduce
> it there can you send me your .config? *Otherwise I expect my last
> round of changes to sysfs fixed whatever was the underlying problem.
I just download and compiled rc6, and all of these problems seem to be
solved. Thanks a lot!
--
Martín Ferrari
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTimC8q6_ZU60VX5SmXGqsD+RCpf4RaF3MLQptsG4@mail .gmail.com">http://lists.debian.org/AANLkTimC8q6_ZU60VX5SmXGqsD+RCpf4RaF3MLQptsG4@mail .gmail.com
07-26-2010, 09:45 AM
Bug#577640: Another oops + repost
Martín Ferrari <martin.ferrari@gmail.com> writes:
> Hi,
>
> On Thu, Jul 22, 2010 at 18:43, Eric W. Biederman <ebiederm@xmission.com> wrote:
>
>>> First of all, I would like to know if anybody was able to fix this
>>> problem *that got kinda lost in the thread:
>>
>> I can't reproduce this on 2.6.35-rc1+
>>
>> Can you please test a 2.6.35-rc version? *If you can still reproduce
>> it there can you send me your .config? *Otherwise I expect my last
>> round of changes to sysfs fixed whatever was the underlying problem.
>
> I just download and compiled rc6, and all of these problems seem to be
> solved. Thanks a lot!
Welcome. I'm glad to hear there wasn't some weird corner case
that I had missed.
Eric
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: m1tynmtw39.fsf@fess.ebiederm.org">http://lists.debian.org/m1tynmtw39.fsf@fess.ebiederm.org