Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-03-25 Thread Michael Brown

On Friday 20 March 2009 13:12:43 Hans de Goede wrote:
> Sorry for the long delay. Here is a reminder of what this what about, when
> doing 2 way chap, booting from an intel server nic with ibft, there is no
> way to specify the reverse username. And the ibft info in sysfs contains a
> garbage string for the reverse username. As requested here is a dump of the
> ibft table.
>
> Notice the string consisting of a single capital "S" followed by a 0xff
> character, that is what gets shown as the reverse username in sysfs.

Definitely a bug in the Intel firmware.  The iBFT reverse username entry 
contains a valid string descriptor pointing to the "S<0xff>" string.

Michael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-03-20 Thread Hans de Goede


Konrad Rzeszutek wrote:
>> Sure, if you can tell me how to get the blob?
> 
> gcc find_ibft.c -o find_ibft
> sudo ./find_ibft blob
> 

Hi All,

Sorry for the long delay. Here is a reminder of what this what about, when doing
2 way chap, booting from an intel server nic with ibft, there is no way to 
specify
the reverse username. And the ibft info in sysfs contains a garbage string for
the reverse username. As requested here is a dump of the ibft table.

Notice the string consisting of a single capital "S" followed by a 0xff 
character, that
is what gets shown as the reverse username in sysfs.

Regards,

Hans

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



blob
Description: Binary data


Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Supreeth Venkataraman
Hey Guys,

Is the rev_chap_name_len field in the ibft_tgt structure set to zero? if so
we should not be scanning for the reverse CHAP name in fwparam_ibft as a
zero in rev_chap_name_len effectively indicates that there is no reverse
CHAP username. If the field is a non zero value then this is likely a
firmware bug. Could you please post an entire iBFT dump from the failure
case?

Thanks,
Supreeth

On Tue, Feb 3, 2009 at 10:31 AM, Konrad Rzeszutek wrote:

> >
> > Sure, if you can tell me how to get the blob?
>
> gcc find_ibft.c -o find_ibft
> sudo ./find_ibft blob
>
>
> >
>
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
> #include 
>
> const char *filename = "/dev/mem";
> int main(int argc, char *argv[])
> {
>
>int fd = 0;
>unsigned char *fbuf;
>unsigned char *p;
>struct stat buf;
>int i,len;
>unsigned int len_p;
>
>fd = open(filename, O_RDONLY);
>if (fd <= 0) {
>printf("Could not open; err: %d(%s)\n", errno,
> strerror(errno));
>return errno;
>}
>if (stat(filename, &buf) != 0) {
>printf("Could not open; err: %d(%s)\n", errno,
> strerror(errno));
>return errno;
>}
>
>len = 0x10; // Up to 1MB.
>fbuf = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0);
>if (fbuf == MAP_FAILED) {
>printf("Could not map: error: %d(%s)\n", errno,
>   strerror(errno));
>return errno;
>}
>len_p = 0;
>for (p = fbuf; p < fbuf + 0x10; p += 4)
>{
>if (memcmp(p, "iBFT", 4) == 0) {
>len_p = *(unsigned int *)(p + 4);
>printf("iBFT detected. (%d)\n", len_p);
>break;
>}
>}
>if (len_p)
>{
>if (argc > 1) {
>int outfd;
>outfd = open(argv[1], O_RDWR|O_CREAT, 0644);
>if (outfd != -1) {
>write(outfd, p, len_p);
>close(outfd);
>}
>}
>printf("(%lx): DATA:\n", p);
>
>for (i = 0; i < len_p; i++) {
>if ((i % 70) == 0)
>printf("\n%.3x: ", i);
>if (isgraph(p[i]))
>printf("%c", p[i]);
>else
>printf("_");
>//  putchar(fbuf[i]);
>}
>printf("\n");
>}
>else
>{
>printf("Bummer. No iBFT found.\n");
>}
>if (munmap(fbuf, len)) {
>printf("Could not unmap: %d(%s)\n", errno, strerror(errno));
>return errno;
>}
>close(fd);
>return 0;
> }
>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Konrad Rzeszutek
> 
> Sure, if you can tell me how to get the blob?

gcc find_ibft.c -o find_ibft
sudo ./find_ibft blob


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

const char *filename = "/dev/mem";
int main(int argc, char *argv[])
{

int fd = 0;
unsigned char *fbuf;
unsigned char *p;
struct stat buf;
int i,len;
unsigned int len_p;

fd = open(filename, O_RDONLY);
if (fd <= 0) {
printf("Could not open; err: %d(%s)\n", errno, strerror(errno));
return errno;
}
if (stat(filename, &buf) != 0) {
printf("Could not open; err: %d(%s)\n", errno, strerror(errno));
return errno;
}

len = 0x10; // Up to 1MB.
fbuf = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0);
if (fbuf == MAP_FAILED) {
printf("Could not map: error: %d(%s)\n", errno,
   strerror(errno));
return errno;
}
len_p = 0;
for (p = fbuf; p < fbuf + 0x10; p += 4)
{
if (memcmp(p, "iBFT", 4) == 0) {
len_p = *(unsigned int *)(p + 4);
printf("iBFT detected. (%d)\n", len_p);
break;
}
}
if (len_p)
{
if (argc > 1) {
int outfd;
outfd = open(argv[1], O_RDWR|O_CREAT, 0644);
if (outfd != -1) {
write(outfd, p, len_p);
close(outfd);
}
}
printf("(%lx): DATA:\n", p);

for (i = 0; i < len_p; i++) {
if ((i % 70) == 0)
printf("\n%.3x: ", i);
if (isgraph(p[i]))
printf("%c", p[i]);
else
printf("_");
//  putchar(fbuf[i]);
}
printf("\n");
}
else
{
printf("Bummer. No iBFT found.\n");
}
if (munmap(fbuf, len)) {
printf("Could not unmap: %d(%s)\n", errno, strerror(errno));
return errno;
}
close(fd);
return 0;
}


Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Hans de Goede



Konrad Rzeszutek wrote:
> On Tue, Feb 03, 2009 at 10:30:13AM +0100, Hans de Goede wrote:
>>
>>
>> Mike Christie wrote:
>>> Konrad Rzeszutek wrote:
 On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
> Hi,
>
> When using 2-way chap and booting from an intel network card with intel 
> firmware initiator, their is no way to specify the username in the 
> firmware 
> initiator for the reverse chap, nor does it care what username the target 
> provides.
>
> However under sysfs (ibft) there is a reverse username attribute 
> (containing 
> garbage) and as this garbage is not provided by the target open-iscsi 
> does not 
> want to talk to the target.
 That is b/c the ibft module parses the iBFT structure and this is the 
 offset where
 the reverse username attribute is at. You can insert a bunch of printks in 
 the 
 module and see data.

 Better yet, try this attached tool. I wrote it up some time with a 
 different purpose
 in mind and just now converted it over to read from /dev/mem. Try it and 
 see if the
 data comes out looking valid.

 (Last time I used it on an Intel NICs, they would insert 0xFF everywhere 
 in the 
 IBFT).

> So how do we work around this?
 Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)

>>> Hey, so this is a problem with only intel nics? If so let's talk to the 
>>> intel guys to see if they are going to fix it, or is already fixed by 
>>> just updating the firmware.
>>>
>> Yes, this seems to be a problem with the ibft of the intel nic firmware. I 
>> do 
>> not have the all FF FF problem, everything is correct, except for the 
>> reverseusername, which is not surprising as the firmware BIOS setup 
>> interface 
>> does not allow one to specify a reverseusername. But then I would expect the 
>> reverse username sysfs attribute to be empty which it is not (which 
>> undoubtly 
>> is a firmware bug).
> 
> OK. Can you send me the binary blob? Maybe there is something that can
> be done in the iscsi_ibft to detect this and do the right thing (ie, not
> fill reverse username with garbage).
> 

Sure, if you can tell me how to get the blob?

Regards,

Hans

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Konrad Rzeszutek

On Tue, Feb 03, 2009 at 10:30:13AM +0100, Hans de Goede wrote:
> 
> 
> 
> Mike Christie wrote:
> > Konrad Rzeszutek wrote:
> >> On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
> >>> Hi,
> >>>
> >>> When using 2-way chap and booting from an intel network card with intel 
> >>> firmware initiator, their is no way to specify the username in the 
> >>> firmware 
> >>> initiator for the reverse chap, nor does it care what username the target 
> >>> provides.
> >>>
> >>> However under sysfs (ibft) there is a reverse username attribute 
> >>> (containing 
> >>> garbage) and as this garbage is not provided by the target open-iscsi 
> >>> does not 
> >>> want to talk to the target.
> >> That is b/c the ibft module parses the iBFT structure and this is the 
> >> offset where
> >> the reverse username attribute is at. You can insert a bunch of printks in 
> >> the 
> >> module and see data.
> >>
> >> Better yet, try this attached tool. I wrote it up some time with a 
> >> different purpose
> >> in mind and just now converted it over to read from /dev/mem. Try it and 
> >> see if the
> >> data comes out looking valid.
> >>
> >> (Last time I used it on an Intel NICs, they would insert 0xFF everywhere 
> >> in the 
> >> IBFT).
> >>
> >>> So how do we work around this?
> >> Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)
> >>
> > 
> > Hey, so this is a problem with only intel nics? If so let's talk to the 
> > intel guys to see if they are going to fix it, or is already fixed by 
> > just updating the firmware.
> > 
> 
> Yes, this seems to be a problem with the ibft of the intel nic firmware. I do 
> not have the all FF FF problem, everything is correct, except for the 
> reverseusername, which is not surprising as the firmware BIOS setup interface 
> does not allow one to specify a reverseusername. But then I would expect the 
> reverse username sysfs attribute to be empty which it is not (which undoubtly 
> is a firmware bug).

OK. Can you send me the binary blob? Maybe there is something that can
be done in the iscsi_ibft to detect this and do the right thing (ie, not
fill reverse username with garbage).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Konrad Rzeszutek

On Tue, Feb 03, 2009 at 12:53:32AM +, Michael Brown wrote:
> On Monday 02 February 2009 19:12:25 Konrad Rzeszutek wrote:
> > A year ago that was the problem - you got something like this:
> >
> > konrad@/data/git/ibft$ hexdump intel_nic.bin
> > 000 4269 5446 029c  0001 4e49 4554 004c
> > 010        
> > *
> > 030        
> > *
> > 290      
> > 29c
> >
> > Where the iBFT NIC and target structure are filled
> > with 0xFF.
> 
> The checksum of that table is non-zero, so anything scanning for it should 
> ignore it anyway.  If the ibft module treats it as a valid table, then it's a 
> bug.

It does not:

 if (csum) {
printk(KERN_ERR "iBFT has incorrect checksum (0x%x)!\n", csum);
return -ENOENT;
}   

Wheew.. 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-03 Thread Hans de Goede



Mike Christie wrote:
> Konrad Rzeszutek wrote:
>> On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
>>> Hi,
>>>
>>> When using 2-way chap and booting from an intel network card with intel 
>>> firmware initiator, their is no way to specify the username in the firmware 
>>> initiator for the reverse chap, nor does it care what username the target 
>>> provides.
>>>
>>> However under sysfs (ibft) there is a reverse username attribute 
>>> (containing 
>>> garbage) and as this garbage is not provided by the target open-iscsi does 
>>> not 
>>> want to talk to the target.
>> That is b/c the ibft module parses the iBFT structure and this is the offset 
>> where
>> the reverse username attribute is at. You can insert a bunch of printks in 
>> the 
>> module and see data.
>>
>> Better yet, try this attached tool. I wrote it up some time with a different 
>> purpose
>> in mind and just now converted it over to read from /dev/mem. Try it and see 
>> if the
>> data comes out looking valid.
>>
>> (Last time I used it on an Intel NICs, they would insert 0xFF everywhere in 
>> the 
>> IBFT).
>>
>>> So how do we work around this?
>> Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)
>>
> 
> Hey, so this is a problem with only intel nics? If so let's talk to the 
> intel guys to see if they are going to fix it, or is already fixed by 
> just updating the firmware.
> 

Yes, this seems to be a problem with the ibft of the intel nic firmware. I do 
not have the all FF FF problem, everything is correct, except for the 
reverseusername, which is not surprising as the firmware BIOS setup interface 
does not allow one to specify a reverseusername. But then I would expect the 
reverse username sysfs attribute to be empty which it is not (which undoubtly 
is a firmware bug).

Regards,

Hans



> > 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-02 Thread Michael Brown

On Monday 02 February 2009 19:12:25 Konrad Rzeszutek wrote:
> A year ago that was the problem - you got something like this:
>
> konrad@/data/git/ibft$ hexdump intel_nic.bin
> 000 4269 5446 029c  0001 4e49 4554 004c
> 010        
> *
> 030        
> *
> 290      
> 29c
>
> Where the iBFT NIC and target structure are filled
> with 0xFF.

The checksum of that table is non-zero, so anything scanning for it should 
ignore it anyway.  If the ibft module treats it as a valid table, then it's a 
bug.

Michael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-02 Thread Konrad Rzeszutek

On Mon, Feb 02, 2009 at 12:06:05PM -0600, Mike Christie wrote:
> 
> Konrad Rzeszutek wrote:
> > On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
> >> Hi,
> >>
> >> When using 2-way chap and booting from an intel network card with intel 
> >> firmware initiator, their is no way to specify the username in the 
> >> firmware 
> >> initiator for the reverse chap, nor does it care what username the target 
> >> provides.
> >>
> >> However under sysfs (ibft) there is a reverse username attribute 
> >> (containing 
> >> garbage) and as this garbage is not provided by the target open-iscsi does 
> >> not 
> >> want to talk to the target.
> > 
> > That is b/c the ibft module parses the iBFT structure and this is the 
> > offset where
> > the reverse username attribute is at. You can insert a bunch of printks in 
> > the 
> > module and see data.
> > 
> > Better yet, try this attached tool. I wrote it up some time with a 
> > different purpose
> > in mind and just now converted it over to read from /dev/mem. Try it and 
> > see if the
> > data comes out looking valid.
> > 
> > (Last time I used it on an Intel NICs, they would insert 0xFF everywhere in 
> > the 
> > IBFT).
> > 
> >> So how do we work around this?
> > 
> > Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)
> > 
> 
> Hey, so this is a problem with only intel nics? If so let's talk to the 

A year ago that was the problem - you got something like this:

konrad@/data/git/ibft$ hexdump intel_nic.bin 
000 4269 5446 029c  0001 4e49 4554 004c
010        
*
030        
*
290        
29c

Where the iBFT NIC and target structure are filled
with 0xFF. 

Compared to the IBM HS-20:

konrad@/data/git/ibft$ hexdump hs20.bin 
000 4269 5446 017d  a101 4249 004d 
010 4269 2046 2e31 0030    
020        
030 0101 0012   0048 0098 0100 
040     0102 004a 0300 
050        
*
080        0020
090 0136    0103 0066 0700 
0a0      a8c0 294d 0016
0b0       a8c0 fe4f
0c0        
*
0f0  1100 9d25 018b 0509   
100 0104 0036 0300     
110  a8c0 744f 0cbc    
120  0025 0157     
130    7169 2e6e 3032 3730 302d
140 2e37 6f63 3a6d 6f6b 726e 6461 692e 696e
150 6974 7461 726f 6900 6e71 322e 3030 2e37
160 6f63 2e6d 6e69 6574 2d6c 6273 3478 3a34
170 7473 726f 6761 2d65 3031 6267  
17d

(I can attach the binary blobs if that would make it easier.)

> intel guys to see if they are going to fix it, or is already fixed by 
> just updating the firmware.

I think due dillegence first - see if that little piece of C code I attached
extracts a valid looking iBFT instead of garbage filled iBFT.

If it is valid, it could be that the ibft module is doing
something wrong.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-02 Thread Mike Christie

Konrad Rzeszutek wrote:
> On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
>> Hi,
>>
>> When using 2-way chap and booting from an intel network card with intel 
>> firmware initiator, their is no way to specify the username in the firmware 
>> initiator for the reverse chap, nor does it care what username the target 
>> provides.
>>
>> However under sysfs (ibft) there is a reverse username attribute (containing 
>> garbage) and as this garbage is not provided by the target open-iscsi does 
>> not 
>> want to talk to the target.
> 
> That is b/c the ibft module parses the iBFT structure and this is the offset 
> where
> the reverse username attribute is at. You can insert a bunch of printks in 
> the 
> module and see data.
> 
> Better yet, try this attached tool. I wrote it up some time with a different 
> purpose
> in mind and just now converted it over to read from /dev/mem. Try it and see 
> if the
> data comes out looking valid.
> 
> (Last time I used it on an Intel NICs, they would insert 0xFF everywhere in 
> the 
> IBFT).
> 
>> So how do we work around this?
> 
> Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)
> 

Hey, so this is a problem with only intel nics? If so let's talk to the 
intel guys to see if they are going to fix it, or is already fixed by 
just updating the firmware.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Issues with intel firmware initiator, ibft and 2-way chap

2009-02-02 Thread Konrad Rzeszutek
On Mon, Feb 02, 2009 at 11:39:18AM +0100, Hans de Goede wrote:
> 
> Hi,
> 
> When using 2-way chap and booting from an intel network card with intel 
> firmware initiator, their is no way to specify the username in the firmware 
> initiator for the reverse chap, nor does it care what username the target 
> provides.
> 
> However under sysfs (ibft) there is a reverse username attribute (containing 
> garbage) and as this garbage is not provided by the target open-iscsi does 
> not 
> want to talk to the target.

That is b/c the ibft module parses the iBFT structure and this is the offset 
where
the reverse username attribute is at. You can insert a bunch of printks in the 
module and see data.

Better yet, try this attached tool. I wrote it up some time with a different 
purpose
in mind and just now converted it over to read from /dev/mem. Try it and see if 
the
data comes out looking valid.

(Last time I used it on an Intel NICs, they would insert 0xFF everywhere in the 
IBFT).

> 
> So how do we work around this?

Try to use the IBM HS-20 (ibm-hs20-iscsi.lab.redhat.com, I think)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

const char *filename = "/dev/mem";
int main(int argc, char *argv[])
{

int fd = 0;
unsigned char *fbuf;
unsigned char *p;
struct stat buf;
int i,len;
unsigned int len_p;

fd = open(filename, O_RDONLY);
if (fd <= 0) {
printf("Could not open; err: %d(%s)\n", errno, strerror(errno));
return errno;
}
if (stat(filename, &buf) != 0) {
printf("Could not open; err: %d(%s)\n", errno, strerror(errno));
return errno;
}

len = 0x10; // Up to 1MB.
fbuf = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0);
if (fbuf == MAP_FAILED) {
printf("Could not map: error: %d(%s)\n", errno,
   strerror(errno));
return errno;
}
len_p = 0;
for (p = fbuf; p < fbuf + 0x10; p += 4)
{
if (memcmp(p, "iBFT", 4) == 0) {
len_p = 0xfff;
printf("iBFT detected.\n");
break;
}
}
if (len_p)
{
if (argc > 1) {
int outfd;
outfd = open(argv[1], O_RDWR|O_CREAT, 0644);
if (outfd != -1) {
write(outfd, p, len_p);
close(outfd);
}
}
printf("(%lx): DATA:\n", p);

for (i = 0; i < len_p; i++) {
if ((i % 70) == 0)
printf("\n%.3x: ", i);
if (isgraph(p[i]))
printf("%c", p[i]);
else
printf("_");
//  putchar(fbuf[i]);
}
printf("\n");
}
if (munmap(fbuf, len)) {
printf("Could not unmap: %d(%s)\n", errno, strerror(errno));
return errno;
}
close(fd);
return 0;
}


Issues with intel firmware initiator, ibft and 2-way chap

2009-02-02 Thread Hans de Goede

Hi,

When using 2-way chap and booting from an intel network card with intel 
firmware initiator, their is no way to specify the username in the firmware 
initiator for the reverse chap, nor does it care what username the target 
provides.

However under sysfs (ibft) there is a reverse username attribute (containing 
garbage) and as this garbage is not provided by the target open-iscsi does not 
want to talk to the target.

So how do we work around this?

Regards,

Hans


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---