On Tue, Dec 04, 2001 at 06:39:27PM +0100, Hartmann, O. wrote:

> Hello.
>
> We have the same problem around here with FLEXlm, but the 'damage' is
> much bigger due to the fact we tried to use PGI's F90 compiler within
> a floating network license.
>
> Indeed, lmutil reports a zero host-id for each host, so the central
> license manager host does not allow to use any license anymore.
>
> The last update has been done today and we run FreeBSD 4.4-STABLE.
> Our environment for Linux and PGI is at an experimental stage, so that
> means we try to figure out how 'stable' a FreeBSD environment can
> handle Linux software like Fortran compilers from PGI within a network
> with the appropriate network license.
>
> At this moment up to 10 workstations are 'without' PGI compiler due to
> the failing of FLEXlm.
>
> Hope this bug gets fixed soon ;-))

Marcel posted a patch to the emulation list.  I tested it and it solved
the problem for me.  I am attaching the message he sent. Also, he said
the patch should be comitted by the end of the week to -STABLE.

-- 
Glenn Johnson
[EMAIL PROTECTED]
--- Begin Message ---
On Sun, Dec 02, 2001 at 08:54:17PM -0800, Marcel Moolenaar wrote:
> >    692 lmutil   CALL  linux_ioctl(0x3,SIOCGIFHWADDR,0xbfbff614)
> >    692 lmutil   RET   linux_ioctl -1 errno 22 Invalid argument
> >    692 lmutil   CALL  close(0x3)
> >    692 lmutil   RET   close 0
> >    692 lmutil   CALL  write(0x1,0x280ad000,0x29)
> >    692 lmutil   GIO   fd 1 wrote 41 bytes
> >        "The FLEXlm host ID of this machine is ""
> >        "
> >    692 lmutil   RET   write 41/0x29

Can you try the attached patch. Note that the patch is against
-current. If it doesn't apply cleanly to -stable, let me know.

-- 
 Marcel Moolenaar         USPA: A-39004          [EMAIL PROTECTED]
Index: linux_ioctl.c
===================================================================
RCS file: /home/ncvs/src/sys/compat/linux/linux_ioctl.c,v
retrieving revision 1.76
diff -u -r1.76 linux_ioctl.c
--- linux_ioctl.c       19 Nov 2001 15:43:45 -0000      1.76
+++ linux_ioctl.c       3 Dec 2001 06:17:55 -0000
@@ -1793,6 +1793,7 @@
        struct ifnet *ifp;
        int len, unit;
        char *ep;
+       int is_eth, index;
 
        for (len = 0; len < LINUX_IFNAMSIZ; ++len)
                if (!isalpha(lxname[len]))
@@ -1802,13 +1803,18 @@
        unit = (int)strtoul(lxname + len, &ep, 10);
        if (ep == NULL || ep == lxname + len || ep >= lxname + LINUX_IFNAMSIZ)
                return (NULL);
+       index = 0;
+       is_eth = (len == 3 && !strncmp(lxname, "eth", len)) ? 1 : 0;
        TAILQ_FOREACH(ifp, &ifnet, if_link) {
-               /* allow Linux programs to use FreeBSD names */
+               /*
+                * Allow Linux programs to use FreeBSD names. Don't presume
+                * we never have an interface named "eth", so don't make
+                * the test optional based on is_eth.
+                */
                if (ifp->if_unit == unit && ifp->if_name[len] == '\0' &&
                    strncmp(ifp->if_name, lxname, len) == 0)
                        break;
-               if (ifp->if_index == unit && IFP_IS_ETH(ifp) &&
-                   strncmp(lxname, "eth", len) == 0)
+               if (is_eth && IFP_IS_ETH(ifp) && unit == index++)
                        break;
        }
        if (ifp != NULL)
--- End Message ---

Reply via email to