lkml.org 
[lkml]   [1999]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: SIOCGIFCONF still not working
From
Date
>>>>> Ulrich Drepper writes:

> Some time ago it was reported here the SIOCGIFCONF is not working and
> I thing Davem said he'll fix it. Well, I have 2.3.14 and it still
> does not work. A few functions, and soon more, in glibc depend on
> this.

> The symptoms are that only one interfaec is reported. You call

> struct ifconf ifc;
> ifc.ifc_buf = NULL;
> ifc.ifc_len = 0;
> ioctl (fd, SIOCGIFCONF, &ifc);

> where fd is an open socket and you get in ifc_len the result 12 (which
> means, room for exactly one ifconf entry).

> Could somebody please look at this? I really want to finish the IPv6
> support.

> Thanks,

Here's a patch. The problem is the following change in
net/ipv4/devinet (early 2.3.x):
- struct ifreq ifr;
+ struct ifreq *ifr = (struct ifreq *) buf;

--- net/ipv4/devinet.c.~1~ Thu Jun 10 07:54:44 1999
+++ net/ipv4/devinet.c Fri Jun 11 09:17:34 1999
@@ -615,10 +615,10 @@

for ( ; ifa; ifa = ifa->ifa_next) {
if (!ifr) {
- done += sizeof(ifr);
+ done += sizeof(struct ifreq);
continue;
}
- if (len < (int) sizeof(ifr))
+ if (len < (int) sizeof(struct ifreq))
return done;
memset(ifr, 0, sizeof(struct ifreq));
if (ifa->ifa_label)
Could this please added to Linux 2.3.15?

Thanks,
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.210 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site