pcmcia-cs: ifuser times out in gethostbyname for empty route tables

pcmcia-cs: ifuser times out in gethostbyname for empty route tables

Post by Alex Riese » Thu, 15 May 2003 12:00:27

Hello, David!

[lkml: sorry for off-topic, but David is very slow on responses, and
the fix could be useful to someone
Brian: the sources are downloaded from debian-unstable]

If I try to stop pcmcia services without actually connecting to the network,
if user will hang for annoyngly long time. I narrowed the problem down
to ifuser tryng to resolve the word "Destination" (first word of the
last line of "netstat -rn" output for empty route table).

That are the second and the third hunks in the attached patch.
The first doesn't start netstat at all if there is nothing to do anyway,
and the last adds check for looopback network.

--- pcmcia-cs-3.2.2/cardmgr/ifuser.c    2001-08-24 14:19:20.000000000 +0200

     if ((*argv[i] == '-') || (argc < i+1)) usage(argv[0]);
     dev = argv[i]; i++;
+    if ( i >= argc )
+       return (!busy);

     /* Get routing table */

     } while (!feof(f) && !isdigit(s[0]));

     tail = &tbl;
+    if ( !isdigit(s[0]) )
+       goto rt_end;
     do {
        r = malloc(sizeof(route_t));

        r->match = (strcmp(iface, dev) == 0);
        *tail = r; tail = &(r->next);
     } while (fgets(s, 128, f) != NULL);
     *tail = NULL;


        for (r = tbl; r; r = r->next) {
+           if ((a & 0xff000000) == 0x7f000000) /* loopback network */
+               continue;
            if ((a & r->mask) == r->dest) {
                if (r->match) {
                    if (verbose) {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


1. Hawking Wireless PCMCIA card / pcmcia-cs

I downloaded (from hawking-tech.com) the linux driver for my wireless
card.  I ran into trouble installing it, and had to download and
install 'pcmcia-cs' from Sourceforge.

I did .Config, make all, and make install on both packages.  (I had to
do pcmcia-cs first, so that the Hawking driver would install.)

Then, I rebooted.  When I go into the Control Center (I'm using SuSE
8.0 Professional), it doesn't see another network device.  I chose
"Configure" and told it to install a pcmcia network card with DHCP.
Then, I rebooted.  (I know, there's got to be way to do everything
except replace the kernel without rebooting, but I don't know how.)
Still, I get nothing.  Does anyone know where to look?

The Hawking driver doesn't come with any documentation that I could
find.  There were 'doc' and 'man' folders, but neither contained
anything useful, and there was no README, just a file containing the
names of supported cards, a 'TODO' file, and a bugfix file.  The file
I downloaded can be gotten by going to the driver download section of
Hawkingtech.com and selecting the device WE011P.

Thank you,

2. zsh and arrow keys

3. Q: HELP: Cirrus PCMCIA IRQ Device time-outs...

4. Any handy command to plot/graph an array of time series data?

5. More page outs than page ins?

6. hooked API

7. Unix Libraries Ins/Outs

8. fsck, raid reconstruction

9. "route add" but table always empty

10. How Do Routing Table Entries Get Added to Routing Table at Bootup?

11. route with debian sarge shows an empty table

12. pcmcia-cs and Kernel 2.6

13. how to install pcmcia-cs