Bug#327031: ifdown routine only works on Linux
Robert Millan
rmh at aybabtu.com
Mon Sep 12 17:19:28 UTC 2005
On Mon, Sep 12, 2005 at 04:08:19PM +0200, Petter Reinholdtsen wrote:
>
> > The ifdown() routine in src/ifdown.c (called by halt or reboot when
> > passed -i flag) produces weird output on GNU/kFreeBSD (prints
> > uninitialised strings).
>
> Looking at the code, I fail to understand why this give such result.
> Can you explain more?
>
> I'm not to happy about just commenting out the code, as it would make
> init behanve differently (and not according to the documentation) on
> non-linux platforms.
>
> Is the ioctl-call broken on freebsd? Is it the wrong one? What
> exactly is the problem?
Ok, you win :).
It seems on kFreeBSD, some interfaces are "phantom" ones. They exist, and are
detected by the numif assignment in ifdown.c, but their ifr_name component only
contains trash (on my system, there are 2 normal interfaces, and 8 "phantom"
ones).
Attempting to shut them down will fail with ENXIO (interpreted in this context
as "no such device").
I'm not sure how to distinguish them (I've put the kfreebsd-gnu list on CC).
--
Robert Millan
More information about the Glibc-bsd-devel
mailing list