[ipxe-devel] Fwd: [BUG] Fragmented packets during iSCSI login phase cause login failures

Michael Brown mbrown at fensystems.co.uk
Wed Feb 15 23:25:02 UTC 2012


On Wednesday 15 Feb 2012 19:29:31 Shyam Iyer wrote:
> We found that since ipxe fragments the packets during login phase as
> well the target is unable to successfully let the ipxe initiator login.
> 
> <snip>
>
> Upon further looking at the function(thanks to Evan) iscsi_tx_step at
> src/net/tcp/iscsi.c, it seems that this is a fundamental design that
> would cause packets to be fragmented because of the state machine in
> this function that involves sending tx packets for each state..
>
> <snip>

It sounds as though your target has a TCP stack that is fundamentally broken, 
since it seems to be expecting TCP to preserve packet boundaries.  TCP 
provides a logical byte stream with no defined boundaries.

iSCSI layers on top of TCP to provide PDUs, which include a length field within 
a fixed-format header (the Basic Header Segment).  This length field serves to 
indicate the logical record boundaries, and is totally independent of the TCP 
packet boundaries.

The first PDU sent by iPXE is a Login Request, as per RFC3720.  It sounds as 
though your target is failing to examine the length field within the PDU's 
Basic Header Segment, and is instead incorrectly assuming that the PDU ends at 
the TCP packet boundary.  Fix this, and your problem should go away.

Michael



More information about the ipxe-devel mailing list