ioctl SIOCGIFCONF fails when there are >32 virtual interfaces

ioctl SIOCGIFCONF fails when there are >32 virtual interfaces

Post by Sam Eat » Sat, 22 Feb 1997 04:00:00

This one has me tearing my hair out....

Solaris 2.5 on Sparc, latest recommended patches.

When I added my 31st virtual interface, thereby giving me 32 in total
from le0, to le0:31, quite a collection of programs started throwing up

One of the main programs that is completely broken by this is Solstice
Backup (networker) 4.1.2, which gives a set of errors such as :

get_myaddress: ioctl (get interface configuration): Invalid argument
is_myaddr: Invalid argument

With a bit of digging and examining some other programs which I DO have
source for which were also broken, it seems that the ioctl call
SIOCGIFCONF is now failing with EINVAL, and logical deduction would
suggest that this is what get_myaddress is using behind the scenes.

I'm assuming that there is some * bug in the code implementing
ioctl SIOCGIFCONF which doesn't like there being more than 31
interfaces, as the problem disappears the moment I remove that 32nd

I've looked in the FAQ, and I've looked at the current public patches.
I don't have a SunSolve account, coz my company hasn't yet 'seen the
need' to purchase a support contract, so I haven't been through all the
stuff on SunSolve.  So I can't find anything about it.

So basically I'm stumped, and wonder if a) this is a known problem, and
b) if there's a patch/workaround/dead chicken for it?

Thanks in advance...

Sam Eaton             System Administrator, Cocoon Internet Services Ltd
        "Fortified with essential bitterness and sarcasm"
Version: 3.1

X+(-) R(+) tv+ b+++>++++ DI++>+++ D---() G>+++ e++>++++ h r(++) y+(*)


1. ioctl call - SIOCGIFCONF from a i386 fails on ia64


My application is making a ioctl call with SIOCGIFCONF as parameter. I
have copied the code fragment below

        fd=socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);

I built this application on a 32 bit RH7.2 machine. I run it on this
machine it works fine.
When i run this binary on a ia64 RH7.2 machine I get junk value for
"ifr_name" but when I build this on the ia64 machine and then run it,
it works fine.

Is this a known bug and already fixed.....

please let me know


2. restoring from mksysb

3. syslog: ioctl: I_GETSIG failed 32

4. finding last line of files ...

5. VM fails when real mem >32 M.

6. Keyboard auto-repeat rate.


8. Migrating ISP to Linux, help needed?

9. snoop: ioctl SIOCGIFCONF

10. ioctl(SIOCGIFCONF)

11. ioctl and SIOCGIFCONF

12. ioctl call fails when not on virtual terminal - help!

13. >> Diamond Stealth 32 VLB & XFree86 3.1 HELP !!!<<