Mailinglist Archive: opensuse-bugs (4238 mails)

< Previous Next >
[Bug 732910] dhclient does not work with "ifup"

--- Comment #35 from Neil Rickert <nrickert@xxxxxxxxxxxxx> 2011-12-22 23:04:05
UTC ---
I'm not using IPv6 here, so I'm not quite familiar with what is there. But it
is showing the sort of thing that I expected.

fd=2 is open for read to dhclient-script.
the echo to "/dev/stderr" somehow manages to write to it, even though it is
only supposed to be open for read.

The effect is that dhclient-script becomes corrupted.

The bug in dhclient, as suggested by Ludwig and Marius, is that fd=2 is
probably being closed inappropriately. So the next thing opened becomes
connected to fd=2.

That's compounded by the funky implementation of "/dev/fd/2" (same thing as
"/dev/stderr"). The implementation is apparently finding the file connected
with that file descriptor and reopening it with write. My understanding is
that it should only do a dup() of the file descriptor which would have left it
read-only. In my opinion, that one is a kernel bug. And then we have
"/etc/rc.status" doing
echo string >/dev/stderr
instead of
echo string >&2

and that triggers the kernel bug. Turning on DEBUG for dhcp reassigns fd=2,
and thus avoids the whole problem.

It is possible that the bug in dhclient is an old one, that has never been
triggered before, because the other complicating factors also have to be
present before it causes problems.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >