question about trailing padding of ancillary data chain (RFC3542)

JINMEI Tatuya / 神明達哉 <Jinmei_Tatuya@isc.org> Tue, 01 April 2008 22:20 UTC

Return-Path: <ipv6-bounces@ietf.org>
X-Original-To: ipv6-archive@megatron.ietf.org
Delivered-To: ietfarch-ipv6-archive@core3.amsl.com
Received: from core3.amsl.com (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 741153A6CC5; Tue, 1 Apr 2008 15:20:46 -0700 (PDT)
X-Original-To: ipv6@core3.amsl.com
Delivered-To: ipv6@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 8B65A3A6E8C for <ipv6@core3.amsl.com>; Tue, 1 Apr 2008 15:20:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.6
X-Spam-Level:
X-Spam-Status: No, score=0.6 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, CHARSET_FARAWAY_HEADER=3.2, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nMy7OuQjZXT4 for <ipv6@core3.amsl.com>; Tue, 1 Apr 2008 15:20:43 -0700 (PDT)
Received: from mon.jinmei.org (mon.jinmei.org [IPv6:2001:4f8:3:36::162]) by core3.amsl.com (Postfix) with ESMTP id 25C323A6D84 for <ipv6@ietf.org>; Tue, 1 Apr 2008 15:20:02 -0700 (PDT)
Received: from user-64-9-237-133.googlewifi.com (unknown [IPv6:2001:4f8:3:bb:217:f2ff:fee0:a91f]) by mon.jinmei.org (Postfix) with ESMTP id DA1C033C3A for <ipv6@ietf.org>; Tue, 1 Apr 2008 15:20:00 -0700 (PDT)
Date: Tue, 01 Apr 2008 15:19:56 -0700
Message-ID: <m2bq4tjjzn.wl%Jinmei_Tatuya@isc.org>
From: JINMEI Tatuya / 神明達哉 <Jinmei_Tatuya@isc.org>
To: ipv6@ietf.org
Subject: question about trailing padding of ancillary data chain (RFC3542)
User-Agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: ipv6-bounces@ietf.org
Errors-To: ipv6-bounces@ietf.org

I have a quick question about the following part of RFC3542.  It's
in Section 20.2 discussing cmsghdr:

  [...]  While sending an
  application may or may not include padding at the end of last
  ancillary data in msg_controllen and implementations must accept both
  as valid.

This first appeared in draft-ietf-ipngwg-2292bis-00.txt, but I
couldn't find why this was added (I was asked why by someone else and
I couldn't answer).  Does anyone know the background of this addition?
I found a e-mail message to the ipng wg that might trigger this
change, but I couldn't find any subsequent discussion.

Thanks,

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.

Date: Sun, 3 Aug 1997 15:20:03 -0700 (PDT)
From: Mukesh Kacker <Mukesh.Kacker@eng.sun.com>
Subject: (IPng 4241) msg_controllen and "padding at end" issue: draft-stevens-advanced-api-04.txt
To: ipng@sunroof.eng.sun.com
Cc: mukesh@jurassic.eng.sun.com

This IPng 4188 message from Koji Imada referred to some minor inconsistencies
with respect to whether msg_controllen includes the padding in the
last "ancillary data object" which were present in some initial copies of
draft-stevens-advanced-api-04.txt.

This appears to have been fixed in the "current" copy of
draft-stevens-advanced-api-04.txt at the FTP site in manner that support the
interpretation that msg_controllen DOES include the padding at the end of
the last ancillary data in the msg_control buffer.

However there are still some portability issues that may affect applications
which should be explicitly clarified which center around the interpretation
of msg_controllen and whether or not it includes

 (1) When receiving a control message buffer from kernel to userspace
    in recvmsg().

 - Is MSG_CTRUNC set in msg_flags when msg_controllen is large enough to
 include the "content" of the last ancillary data but not the padding ?


 (2) When sending a control message buffer from user space to the kernel
    in sendmsg()

   - Is msg_controllen required to include the padding at the end of
      last ancillary data object in this case ? If so, will the sendmsg()
      call fail (and so with what errno ?) if that padding is not included
      in msg_controllen ? [ setting MSG_CTRUNC as in recvmsg() is not an
      option since msg_flags is not a "return" parameter in this case ].
      Or are the implementations required to be "liberal" in what they
      acceptthis case and not fail ? (I suspect this latter case may
      predominate in implementations and therefore the spec should specify
      this).


I don't think the formal standards do not affect guidance on these issues.
Since the use msg_control/msg_controllen is likely to increase when IPv6 APIs
are used, I would like this draft should further clarify the specification
keeping existing implemenation practices into account in the cases raised
in (1) and (2) above.


----------------------------------------------------------------------
Mukesh Kacker                   | Football incorporates the two worst
Sun Microsystems Inc (SunSoft)  | characteristics of American society.
mukesh.kacker@eng.sun.com       | Violence punctuated by committee meetings.
415-786-5156                    |                      -- George Will
--------------------------------------------------------------------
IETF IPv6 working group mailing list
ipv6@ietf.org
Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------