From sacadmin Wed Oct  3 03:13:18 2007
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l93ADIL7018804;
	Wed, 3 Oct 2007 03:13:18 -0700 (PDT)
Received: (from meem@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id l93ADIi4018801;
	Wed, 3 Oct 2007 03:13:18 -0700 (PDT)
Date: Wed, 3 Oct 2007 03:13:18 -0700 (PDT)
From: Peter Memishian <meem@sac.sfbay.sun.com>
Message-Id: <200710031013.l93ADIi4018801@sac.sfbay.sun.com>
To: PSARC-record@sac.sfbay.sun.com
Cc: clearview-discuss@opensolaris.org
Subject: IP_DHCPINIT_IF socket option [PSARC/2007/571 FastTrack timeout 10/9/2007]
Status: RO
Content-Length: 567


Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2007 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 IP_DHCPINIT_IF socket option
    1.2. Name of Document Author/Supplier:
	 Author:  Peter Memishian
    1.3  Date of This Document:
	03 October, 2007
4. Technical Description
    See the case directory for more detail

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


From peter.memishian@sun.com Wed Oct  3 03:15:23 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l93AFM0M018952
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 3 Oct 2007 03:15:22 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l93AC7rA006669
	for <@sunmail2sca.sfbay.sun.com:psarc-ext@sun.com>; Wed, 3 Oct 2007 18:12:12 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JPB00503Z095900@brm-avmta-1.central.sun.com> for psarc-ext@sun.com
 (ORCPT psarc-ext@sun.com); Wed, 03 Oct 2007 04:12:09 -0600 (MDT)
Received: from dhcp-cbjs05-219-56.PRC.Sun.COM ([129.158.219.180])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JPB00MYKZ07DJC0@brm-avmta-1.central.sun.com> for
 psarc-ext@sun.com (ORCPT psarc-ext@sun.com); Wed,
 03 Oct 2007 04:12:08 -0600 (MDT)
Received: from dhcp-cbjs05-219-56.PRC.Sun.COM (localhost [127.0.0.1])
	by dhcp-cbjs05-219-56.PRC.Sun.COM (8.14.1+Sun/8.14.1)
 with ESMTP id l93ABm50027411; Wed, 03 Oct 2007 18:11:48 +0800 (CST)
Received: (from meem@localhost)	by dhcp-cbjs05-219-56.PRC.Sun.COM
 (8.14.1+Sun/8.14.1/Submit) id l93ABm9W027408; Wed,
 03 Oct 2007 18:11:48 +0800 (CST)
Date: Wed, 03 Oct 2007 18:11:47 +0800
From: Peter Memishian <peter.memishian@sun.com>
Subject: PSARC/2007/571 IP_DHCPINIT_IF socket option
To: psarc-ext@sun.com
Cc: clearview-discuss@opensolaris.org
Reply-to: peter.memishian@sun.com
Message-id: <18179.27363.890925.900350@dhcp-cbjs05-219-56.PRC.Sun.COM>
MIME-version: 1.0
X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
X-Authentication-warning: dhcp-cbjs05-219-56.PRC.Sun.COM: meem set sender to
 peter.memishian@sun.com using -f
Status: RO
Content-Length: 4309


I'm sponsoring this case for myself.  The timeout is set for 10/9/2007.

Overview
--------

  This case proposes a new IP_DHCPINIT_IF socket option that allows our
  DHCP client to be entirely sockets-based while maintaining maximum
  interoperability with DHCP servers.  The proposed stability is
  Consolidation Private, and patch binding is requested.

Details
-------

  While DHCP is a UDP-based protocol and thus in theory our DHCP client
  should be able to use the standard sockets-based API to obtain a lease
  for an IPv4 address, subtleties in our IP implementation and in the DHCP
  protocol definition itself have thus far prevented this.  As a result,
  our DHCP client instead makes use of the low-level DLPI API until a
  lease on an IPv4 address has been obtained, and then switches over to
  sockets.

  Complexity and code duplication issues aside (e.g., the client has to do
  its own UDP and IP checksum calculations when using DLPI), use of DLPI
  prevents DHCP from working with IP-layer technologies such as IPMP,
  sidesteps IP Filter policies for DHCP traffic, and interferes with
  Dynamic Reconfiguration (e.g., an IP interface trying to obtain a DHCP
  lease via DLPI will cause DR removal of the underlying link to fail).
  Thus, we'd like to update the DHCP client to be sockets-based.

  By and large, resolving the necessary issues to allow this have been
  straightforward.  One difficulty remains: handling DHCPOFFER and DHCPACK
  packets sent by the DHCP server to the DHCP client prior to the client
  obtaining a lease.  Specifically, RFC2131 (which details DHCP) states:

      If 'giaddr' is zero and 'ciaddr' is zero, and the broadcast bit is
      set, then the server broadcasts DHCPOFFER and DHCPACK messages to
      0xffffffff. If the broadcast bit is not set and 'giaddr' is zero and
      'ciaddr' is zero, then the server _unicasts_ DHCPOFFER and DHCPACK
      messages to the client's hardware address _and_ 'yiaddr' address.

      [ Note that "yiaddr" is the IP address being offered to the client
        which it has no a priori knowledge of. ]

  ... and then goes on to state:

      The BROADCAST bit will provide a _hint_ to the DHCP server and BOOTP
      relay agent to broadcast any messages to the client on the client's
      subnet.

  That is, even if the client sets the broadcast bit, the server is free
  to ignore the bit and unicast the DHCPOFFER and DHCPACK packets back to
  the client.  Indeed, it seems that not all DHCP server implementations
  respect the broadcast bit -- as evidenced by this Microsoft knowledge
  base article:

      http://support.microsoft.com/kb/928233

  Thus, to preserve interoperability, we propose a simple but admittedly
  unfortunate socket option: IP_DHCPINIT_IF.  As with other IP_*_IF socket
  options, IP_DHCPINIT_IF takes a pointer to an integer indicating the IP
  interface to enable "DHCPINIT" mode on.  Once DHCPINIT mode is enabled
  on an interface, the IP module will treat any IP unicast DHCP packets
  received on that interface as if they were sent to an IP address that
  was owned by the system.  This will allow the DHCP client (which will
  have a socket bound to INADDR_ANY and the appropriate DHCP port) to
  receive the packets.  The DHCP client will then -- as usual -- perform
  filtering based on the "xid" contained with the DHCP portion of the
  packet to determine if the packet is a response to a previous request.
	
  As with other IP_*_IF socket options, only one interface may be placed
  in IP_DHCPINIT_IF mode on a given socket at a time, and specifying an
  interface index of zero disables the socket option.  Closing the socket
  also disables the socket option.  Multiple consumers of IP_DHCPINIT_IF
  will not interfere with one another -- that is, the interface will
  remain in DHCPINIT mode as long as there as at least one socket that has
  enabled IP_DHCPINIT_IF for that interface.

  Because enabling IP_DHCPINIT_IF disables the IP "fastpath", use of
  IP_DHCPINIT_IF will require PRIV_SYS_IP_CONFIG.  The DHCP client will
  only use IP_DHCPINIT_IF during lease acquisition (the period where DLPI
  is currently used).

  Because DHCPv6 uses IPv6 link-local addresses, it sidesteps this issue
  entirely.  Thus, no IPV6_DHCPINIT_IF is necessary.

-- 
meem

From meem@triplex.east.sun.com Tue Oct  9 21:17:27 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l9A4HQgB025986
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 9 Oct 2007 21:17:26 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l9A4E4MB024532;
	Wed, 10 Oct 2007 05:14:09 +0100 (BST)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JPO00A07H3K8100@brm-avmta-1.central.sun.com>; Tue,
 09 Oct 2007 22:14:08 -0600 (MDT)
Received: from triplex.East.Sun.COM ([129.148.174.104])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JPO00AATH3I0C00@brm-avmta-1.central.sun.com>; Tue,
 09 Oct 2007 22:14:07 -0600 (MDT)
Received: from triplex.East.Sun.COM (localhost [127.0.0.1])
	by triplex.East.Sun.COM (8.14.1+Sun/8.14.1) with ESMTP id l9A46bIQ407986; Wed,
 10 Oct 2007 00:06:37 -0400 (EDT)
Received: (from meem@localhost)
	by triplex.East.Sun.COM (8.14.1+Sun/8.14.1/Submit) id l9A46bVx407983; Wed,
 10 Oct 2007 00:06:37 -0400 (EDT)
Date: Wed, 10 Oct 2007 00:06:36 -0400
From: Peter Memishian <peter.memishian@sun.com>
Subject: re: [clearview-discuss] PSARC/2007/571 IP_DHCPINIT_IF socket option
In-reply-to: <18179.27363.890925.900350@dhcp-cbjs05-219-56.PRC.Sun.COM>
To: peter.memishian@sun.com
Cc: psarc-ext@sun.com, clearview-discuss@opensolaris.org
Message-id: <18188.20428.587483.853205@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.17 under 21.4 (patch 18) "Social Property" XEmacs Lucid
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <18179.27363.890925.900350@dhcp-cbjs05-219-56.PRC.Sun.COM>
Status: RO
Content-Length: 131


 > I'm sponsoring this case for myself.  The timeout is set for 10/9/2007.

This case has timed out and is now approved.

--
meem

