Re: 2.2.15 + IPv6: serious bug when removing aliased interfaces

From: Peter T. Breuer (ptb@it.uc3m.es)
Date: Sun May 21 2000 - 13:03:57 EST


"A month of sundays ago Alan Cox wrote:"
> > Because the this only happens with IPv6, it is an obvious bug. In
> > addition, about 99.9% of people are using commands like 'ifconfig eth0:5
> > up' and [down]. It should go right by default.
>
> So strace your ifconfig eth0:5 down figure out which ioctl is causing the
> problem and if its kernel or user space then submit a patch. If its
> inconsistent then Im happy to take a patch for it

I have to say, however, that on the 2.2.15 right here on my workstation
(with ipv6 loaded), ifconfig lo:0 down works fine. It doesn't touch lo.
However ...

On a 2.2.10 downstairs, also with ipv6 loaded, ifconfig lo:0 down works
its bad-magic on lo! It gets blasted. Downstairs, I believe ipv6 is
possibly loaded before ethernet drivers.

It might be the ifconfig version. The most obvious differences in the
traces is that downstairs (2.2.10), the ifconfig does a whole lot of
rooting around in proc:

  access("/proc/net", R_OK) = 0
  access("/proc/net/unix", R_OK) = 0
  socket(PF_UNIX, SOCK_DGRAM, 0) = 3
  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
  access("/proc/net/if_inet6", R_OK) = 0
  socket(PF_INET6, SOCK_DGRAM, 0) = 5
  access("/proc/net/ax25", R_OK) = -1 ENOENT (No such file or directory)

None of that upstairs here (2.2.15). Downstairs (2.2.10), the final
ioctl is:

  ioctl(5, SIOCGIFFLAGS, 0xbffff5ec) = 0
  ioctl(5, SIOCSIFFLAGS, 0xbffff5ec) = 0

and upstairs (2.2.15) it is:

  ioctl(3, SIOCGIFFLAGS, 0xbfffee60) = 0
  ioctl(3, SIOCSIFFLAGS, 0xbfffee60) = 0

Downstairs (2.2.10), 5 is a socket:

  access("/proc/net/if_inet6", R_OK) = 0
  socket(PF_INET6, SOCK_DGRAM, 0) = 5

and upstairs (2.2.15), 3 is a slightly different socket:

  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3

I seem to have net-tools 1.432 ifconfig 1.29 (1997-09-23) upstairs.
Yes, this is libc 5.4.38. Downstairs it is net-tools 1.54 ifconfig 1.39
(1999-03-18), and glibc 2.1.2.

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:20 EST