[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 03063) Re: Bug in function inet6_rth_add of libinet6.a



YOSHIFUJI Hideaki / åèèæ wrote:

The function inet6_rth_add inlibinet6.a which adds an entry in a IPv6
routing header option does not work. It adds the entry at a wrong offset.


Good catch. Patch applied. Thank you.

Which patch, fixing the struct or the other? I would hope we'd fix the definition so the problem isn't propogated further.


Btw, the user-space definition is wrong in /usr/include/netinet/ip6.h, this would fix that:

# diff -u ip6.h.orig ip6.h
--- ip6.h.orig  2004-10-07 15:59:44.231050246 -0400
+++ ip6.h       2004-10-07 16:01:47.563079985 -0400
@@ -87,9 +87,8 @@
     uint8_t  ip6r0_len;                /* length in units of 8 octets */
     uint8_t  ip6r0_type;       /* always zero */
     uint8_t  ip6r0_segleft;    /* segments left */
-    uint8_t  ip6r0_reserved;   /* reserved field */
-    uint8_t  ip6r0_slmap[3];   /* strict/loose bit map */
-    struct in6_addr  ip6r0_addr[1];  /* up to 23 addresses */
+    uint32_t ip6r0_reserved;   /* reserved field */
+    /* followed by up to 127 IPv6 addresses */
   };

 /* Fragment header */

Don't know what that would break (ping6 uses the kernel version).

And the kernel is just as bad, I can work on a patch for that if you think it's worthwhile.

-Brian