All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Amos Kong <akong@redhat.com>
Cc: Yaniv Kaul <ykaul@redhat.com>,
	etherboot-developers@lists.sourceforge.net, jasowang@redhat.com,
	mdc@etherboot.org, ehabkost@redhat.com, kvm@vger.kernel.org,
	Hagen Paul Pfeifer <hagen@jauu.net>,
	ipxe-devel@ipxe.org
Subject: Re: [PATCH] [dhcp] Use random transaction ID to associate messages
Date: Thu, 15 Sep 2011 17:53:02 +0300	[thread overview]
Message-ID: <1316098382.3743.23.camel@lappy> (raw)
In-Reply-To: <139746928.693408.1316097790460.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

On Thu, 2011-09-15 at 10:43 -0400, Amos Kong wrote:
> ----- Original Message -----
> > ----- Original Message -----
> > > On Thu, 15 Sep 2011 21:00:38 +0800, Amos Kong <akong@redhat.com>
> > > wrote:
> > >
> > > > + netdev->xid = random();
> > >
> > > This will not work for reboots. The decision that the hardware
> > > address
> > > is
> > > choosen was not accidental. Not sure if some DHCP server will count
> > > on
> > > the
> > > ID. (RFC 2131 "Retain DHCP client configuration across server
> > > reboots,
> > > and,
> > > whenever possible, a DHCP client should be assigned the same
> > > configuration
> > > parameters despite restarts of the DHCP mechanism"). If not so I am
> > > fine
> > > with the patch.
> 
> Hi Hagen,
> 
> rfc2131 clearly describes that we need a random xid,
> I don't think xid is a port of "DHCP client configuration",
> it only be used to associate messages and responses between client and server.
> 
> I would post a patch to ipxe maillist later if it's ok.

rfc2131 only required that "A DHCP client MUST choose 'xid's in such a
way as to minimize the chance of using an 'xid' identical to one used
by another client.".

The 'random xid' suggestion is listed merely as an example.

The way I see it using a xid based on MAC instead of a random number is
safer since the odds for same MAC on the same network are pretty slim
since it would cause problems on other layers in the network.

Whats the reason behind this patch? Whats wrong with current selection
of xid?

-- 

Sasha.


  reply	other threads:[~2011-09-15 14:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 13:00 [PATCH] [dhcp] Use random transaction ID to associate messages Amos Kong
2011-09-15 13:28 ` Hagen Paul Pfeifer
2011-09-15 14:13   ` Yaniv Kaul
2011-09-15 14:34     ` Sasha Levin
     [not found]     ` <1441335413.692660.1316096032278.JavaMail.root-rwXUz/BPrj9+R5eDjrG6zsCp5Q1pQRjfhaY/URYTgi6ny3qCrzbmXA@public.gmane.org>
2011-09-15 14:43       ` Amos Kong
2011-09-15 14:53         ` Sasha Levin [this message]
2011-09-15 15:55           ` Amos Kong
     [not found]             ` <1339054677.695312.1316102130826.JavaMail.root-rwXUz/BPrj9+R5eDjrG6zsCp5Q1pQRjfhaY/URYTgi6ny3qCrzbmXA@public.gmane.org>
2011-09-18  1:05               ` Amos Kong
2011-09-15 18:09           ` Eduardo Habkost
2011-09-17  0:36           ` Amos Kong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316098382.3743.23.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=akong@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=etherboot-developers@lists.sourceforge.net \
    --cc=hagen@jauu.net \
    --cc=ipxe-devel@ipxe.org \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mdc@etherboot.org \
    --cc=ykaul@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.