Subject: [Mip6] [issue74] Problem in the structures defined

From: Basavaraj Patil <[email-masked]>
Date: Mon, 27 Mar 2006 20:08:43 +0000

New submission from Basavaraj Patil <[email-masked]>:

Hi,

   I'm not sure if at this time it is possible to fix it or not, but
 i've detected a problem in the structures defined in the -07 version.
 All of the MH structure have the same initial fields as 'struct
 ip6_mh', and one of such fields is the reserved field. However, in a
 definition such as of 'struct ip6_mh_binding_request' we have

    struct ip6_mh_binding_request {
       ...
       uint8_t  ip6mhbr_reserved; /* from ip6_mh */
       ...      ^^^^^^^^^^^^^^^^
       uint16_t ip6mhbr_reserved; /* a binding refresh request
                ^^^^^^^^^^^^^^^^   * specific field */
       ...
    };

   The same issue of duplicate members exists on other structure
 definitions with the same 'reserved' field. Hopefully this is something
 the RFC Editor may fix with input from the authors/chairs but it is
 something that must be fixed or else these structure definitions can't
 be used.

   Thanks,

      Hugo Santos

----------
category: Technical
draft: draft-ietf-mip6-mipext-advapi
messages: 238
nosy: bpatil
priority: Must fix
status: No discussion
title: Problem in the structures defined

_________________________________________________
Mip6 issue tracker <[email-masked]>
<http://www.mip4.org/issues/tracker/mip6/issue74>
_________________________________________________

_______________________________________________
Mip6 mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/mip6

---

From: Brian Haley <[email-masked]>
Date: Mon, 27 Mar 2006 16:22:59 -0500

>        uint8_t  ip6mhbr_reserved; /* from ip6_mh */

This late in the game, it's probably safest to do this:

*** 399,407 ****
              uint8_t    ip6mhbr_proto;
              uint8_t    ip6mhbr_hdrlen;
              uint8_t    ip6mhbr_type;
!            uint8_t    ip6mhbr_reserved;
              uint16_t   ip6mhbr_cksum;
!            uint16_t   ip6mhbr_reserved;
              /* Followed by optional Mobility Options */
          };

--- 399,407 ----
              uint8_t    ip6mhbr_proto;
              uint8_t    ip6mhbr_hdrlen;
              uint8_t    ip6mhbr_type;
!            uint8_t    ip6mhbr_reserved1;
              uint16_t   ip6mhbr_cksum;
!            uint16_t   ip6mhbr_reserved2;
              /* Followed by optional Mobility Options */
          };

And for HoTI, CoTI, and Binding Error.  This compiles for me.

Does anyone remember why we didn't do this instead?

/*
  * Binding Refresh Request Message
  */
struct ip6mh_binding_request {
     struct ip6_mh ip6mhbr_hdr;
     uint16_t ip6mbr_reserved;
     /* Followed by optional Mobility Options */
};
#define ip6mhbr_proto	ip6mhbr_hdr.ip6mh_proto
...

And the ip6_mh reserved field is just ignored.

-Brian

---

From: Keiichi SHIMA <[email-masked]>
Date: Tue, 28 Mar 2006 10:06:22 +0900 (JST)

I support Brian's fix.

---
Keiichi SHIMA
IIJ Research Laboratory <[email-masked]>
WIDE Project <[email-masked]>

From: Brian Haley <[email-masked]>
Subject: Re: [Mip6] [issue74] Problem in the structures defined
Date: Mon, 27 Mar 2006 16:22:59 -0500

---

From: "Samita Chakrabarti" <[email-masked]>
Date: Mon, 27 Mar 2006 18:12:55 -0800

Please see in-line.

> > This late in the game, it's probably safest to do this:

Thanks. I support this fix as well. Perhaps we  can fix this in the final
xml file  (I hope).

> Does anyone remember why we didn't do this instead?

The ip6_mh structure was pulled out from individual messages because
of concerns of  layout  mismatch of compiled layout produced by different
compilers ( a point raised by IESG coments). Thus, we had to spell out each
field  of ip6_mh in each message to ensure maximum possibility of
portability
across different compilers/implementations.

Obviously the existing  reserved fieldname in BR, COTI, HOTI  was overlooked
when I
added the ip6_mh fields with the matching names with the messages.

-Samita