In addition to the patch provided earlier in this bug report, I
found it necessary (on both 2.6.8 and 2.6.14 kernels) to change
the frame type comparison in ipxkern.c to ignore the tailing
spaces and newline character returned from reading the IPX
interface file.

The attached patch was sufficient (on my systems) to correctly
determine the frame type.  However, it may also be advisable to
add a check to the return value of asc2frame() so that similar
errors will be easier to find in the future.

-- 
Cheers,      |      [EMAIL PROTECTED]     |    [EMAIL PROTECTED]
Kevin Locke  |   http://kevinlocke.name  |   kevinoid on freenode
--- ipxkern.c.orig      2005-12-29 14:04:33.000000000 -0700
+++ ipxkern.c   2005-12-29 14:03:35.000000000 -0700
@@ -39,13 +39,13 @@
 static int 
 asc2frame(char *frame)
 {
-       if (strcasecmp("etherii", frame) == 0)
+       if (strncasecmp("etherii", frame, 7) == 0)
                return IPX_FRAME_ETHERII;
-       else if (strcasecmp("802.2", frame) == 0)
+       else if (strncasecmp("802.2", frame, 5) == 0)
                return IPX_FRAME_8022;
-       else if (strcasecmp("802.3", frame) == 0)
+       else if (strncasecmp("802.3", frame, 5) == 0)
                return IPX_FRAME_8023;
-       else if (strcasecmp("snap", frame) == 0)
+       else if (strncasecmp("snap", frame, 4) == 0)
                return IPX_FRAME_SNAP;
        else
                return 0;

Reply via email to