Subject: [Hipsec] Base draft: padding issue

From: Petri Jokela <[email-masked]>
Date: Tue, 17 Oct 2006 13:39:12 +0300

Pekka Savola wrote:

>    All of the TLV parameters have a length (including Type and Length
>    fields) which is a multiple of 8 bytes.  When needed, padding MUST be
>    added to the end of the parameter so that the total length becomes a
>    multiple of 8 bytes.  This rule ensures proper alignment of data.  If
>    padding is added, the Length field MUST NOT include the padding.
> 
> ==> I must be missing something.  If padding is added according to the
> abovementioned text, adding the padding (up to the next 64 bit boundary)
> doesn't change the Length field -- so I'm not sure what the last 
> sentence is
> saying ?  I think protocol design shouldn't be such that there is more data
> (even if it's padding) that goes beyond the length field.

Related to this padding issue, how should we proceed?

I was first thinking about a similar method as e.g. in MIPv6 (Pad1 parameter, 
total length 1 octet, PadN parameter, total length 2-n octets), but we have a 
32-bit type field which makes it impossible to create one octet padding using 
the parameter.

Personally I don't have any problems with the current definition, but I can't 
tell if it is right or wrong. Anyway, the padding is included in the length of 
the HIP packet (Length field in the HIP header), but not in single parameter 
length fields.

Any comments?

/petri

-- 
Petri Jokela				e-mail: [email-masked]
Research Scientist			phone:  +358 9 299 2413
Ericsson Research, NomadicLab		mobile: +358 44 299 2413

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

---

From: "Henderson, Thomas R" <[email-masked]>
Date: Tue, 17 Oct 2006 07:38:13 -0700

I agree with Pekka Savola that the last sentence cited below is not
needed and is inaccurate.

Tom

> -----Original Message-----
> From: Petri Jokela [mailto:[email-masked]] 
> Sent: Tuesday, October 17, 2006 3:39 AM
> To: [email-masked]
> Subject: [Hipsec] Base draft: padding issue
> 
> Pekka Savola wrote:
>