> > 1.432 (1.29 (1997-09-23))   good
> > 1.46  (1.35 (1998-08-29))   good, but doesn't show lo:1 when it's up
> > 1.47  (1.36 (1998-10-31))   bad
> > 1.51  (1.39 (1999-03-18))   bad
> 
> Can you look at the diff between ifconfig 1.35 and 1.36 and tell us if
> there's anything that looks like a loop across detected aliases?  I
> noticed the strace showed two ioctl calls where I expected one.

I'm not sure if you already got a look at the source, but I made some
available at:

http://gap.tky.hut.fi/linux/

including patches, 1.46 vs 1.47.  My untrained eye didn't notice anything
peculiar about those.  The way how interfaces are printed (esp. when using
aliases) has gone through a rewrite though.

Then, I did a little experimentation with latest ifconfig.c source code,
uncommenting some things out I thought could cause the problems.
I think, the problem might be here, in the bottom
memcpy.  Rationale?  Interesting FIXME line; also, when I tried printing
(char *) &sa just before memcpy, it'd show different things on my IPv6
enabled and IPv6 disabled box.

Unfortunately, I'm only a beginner in C, so I could test it further :(

--------  ifconfig.c latest version ~line 1038  ----
        /* FIXME: sa is too small for INET6 addresses, inet6 should use that too,
           broadcast is unexpected */
        if (ap->getmask) {
            switch (ap->getmask(host, &sa, NULL)) {
            case -1:
                usage();
                break;
            case 1:
                if (didnetmask)
                    usage();

                goterr = set_netmask(skfd, &ifr, &sa);
                didnetmask++;
                break;
            }
        }
        if (ap->input(0, host, &sa) < 0) {
            ap->herror(host);
            usage();
        }
        memcpy((char *) &ifr.ifr_addr, (char *) &sa, sizeof(struct sockaddr));
---------

HTH, Regards,

-- 
Pekka Savola                    "Tell me of difficulties surmounted, 
[EMAIL PROTECTED]          not those you stumble over and fall"




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to