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 <stdio.h> #include <errno.h> #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include <stdint.h> 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 = 0x100000; // 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 + 0x100000; 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; }