Re: [PATCH] [dhcp] Use random transaction ID to associate messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
> 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@xxxxxxxxxx>
> > > > 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.

|   For example, a client may choose a different,
|   random initial 'xid' each time the client is rebooted, and
|   subsequently use sequential 'xid's until the next reboot. 

This example is not suggesting us use random xid, but give us an example
of how to use random xid.


|   xid           4  Transaction ID, a random number chosen by the
|                    client, used by the client and server to associate
|                    messages and responses between a client and a
|                    server.

This description doesn't mention random is an option.
So I think rfc suggests us to use random xid, it's necessary.

CC: droms@xxxxxxxxxxxx

Amos

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux