[Freeipmi-devel] RE: Old libfreeipmi bug fix

2005-05-13 Thread Cress, Andrew R
Al,

Ah, you were right about the sequence number thing.
I did have the resolution in the ipmiutil/ipmignu.c, and I retested it
with a long SEL session, to make sure.  So, that change is not needed.  

Andy 

-Original Message-
From: Albert Chu [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 13, 2005 12:27 PM
To: Cress, Andrew R
Cc: freeipmi-devel@gnu.org
Subject: Re: Old libfreeipmi bug fix

Hey Andrew,

I remember the patch.  I wasn't quite sure why it didn't make it into
0.1.3.  Then I looked at the tag and ChangeLog dates.  The fix was
applied post 0.1.3 :-(

By the way, I believe you want "from = sizeof(struct sockaddr_in)" in
your patch if you were applying it locally.  Also didn't we fix the
sequence numbering problem in ipmiutil userspace??  I dug up and e-mail
showing I gave you this:

  rv = ipmi_lan_cmd(sockfd, hostaddr, hostaddr_len,
auth_type, session_seqnum, session_id,
authcode, authcode_len,
netfn, IPMI_BMC_IPMB_LUN_BMC, (rq_seq %
 (IPMI_LAN_SEQ_NUM_MAX + 1)),
cmd_rq, tmpl_rq, cmd_rs, tmpl_rs);

Al

--
Albert Chu
[EMAIL PROTECTED]
Lawrence Livermore National Laboratory

- Original Message -
From: "Cress, Andrew R" <[EMAIL PROTECTED]>
Date: Friday, May 13, 2005 9:00 am
Subject: Old libfreeipmi bug fix

> Al,
> 
> For some reason, the fix from the thread below didn't get propagated
> into libfreeipmi-0.1.3. I ran into it again.
> I have attached the patch I applied to make it work for me.
> I also created bug #13076 for it, so we don't lose track of it again
> :-).
> 
> Andy 
> 
> -Original Message-
> From: Albert Chu [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 28, 2004 12:20 PM
> To: Cress, Andrew R
> Cc: freeipmi-devel@gnu.org
> Subject: Re: RE: [Freeipmi-devel] Using libfreeipmi interface
> 
> Hi Andrew,
> 
> You're right that it needs to be initialized, but I think it has to be
> initialized to sizeof(struct sockaddr_in).  _pkt_len is probably a 
> largeenough size that it just happened to work. 
> 
> Thanks for the catch 
> 
> Al
> 
> --
> Albert Chu
> [EMAIL PROTECTED]
> Lawrence Livermore National Laboratory
> 
> - Original Message -
> From: "Cress, Andrew R" <[EMAIL PROTECTED]>
> Date: Wednesday, October 27, 2004 2:09 pm
> Subject: RE: [Freeipmi-devel] Using libfreeipmi interface
> 
> > Albert,
> > 
> > I did find the problem that was causing the recvfrom to abort.
> > 
> > In libfreeipmi/src/ipmi-lan-interface.c at about line 699:
> >fromlen = _pkt_len;  /* added this, fromlen must be 
> initialized */
> >pkt_len = ipmi_lan_recvfrom (sockfd, pkt, _pkt_len, 0, 
> > (struct sockaddr *)&from, &fromlen);
> > There may be other places that call recvfrom where this change 
> > would be
> > needed also.
> > 
> > It works now, if the app is careful with sequence numbers.
> > 
> > Andy
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Cress, Andrew R
> > Sent: Wednesday, October 27, 2004 2:07 PM
> > To: Albert Chu
> > Cc: freeipmi-devel@gnu.org
> > Subject: RE: [Freeipmi-devel] Using libfreeipmi interface
> > 
> > 
> > Albert,
> > 
> > I have been able to get the kcs interface working with the FreeIPMI
> > library, but not yet the  LAN interface.  I'm using
> > ipmi_lan_open_session() and ipmi_lan_cmd(), and I put in some debug
> > statements in ipmi-lan-interface.c.
> > The ipmi_lan_open_session fails at the Get_Session_Challenge command
> > response.
> > I'm confused as to why ipmi_lan_recvfrom returns -1 for this 
> command.> The ipmipower app does get status ok, but gets "invalid 
> authtype" 
> > tryingto reset.
> > The remote node does respond to BMC LAN commands via other (Intel)
> > server management applications, and I've included its configuration
> > information below.
> > 
> > Attempting to open_session to remote node:
> > assemble_ipmi_lan_pkt complete cmd=38
> > ipmi_lan_sendto status = 23
> > ipmi_lan_recvfrom len = 30
> > unassemble complete
> > get_chan_auth rsp: 38 00 07 17 01 00 00 00 00 00
> > ipmi_comp_test complete status = 1
> > assemble_ipmi_lan_pkt complete cmd=39
> > get_sess_chal rq: 39 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> > 00 00
> > ipmi_lan_sendto status = 38
> > ipmi_lan_recvfrom len = -1
> > ipmi_lan_open_session: rv = -1 id=0
> > 
> > BMC LAN Configuration of remote node:
> > Lan Param(0) Set in progress: 00
> > Lan Param(1) Auth type support: 17
> > Lan Param(2) Auth type enables: 17 17 06 06 00
> > Lan Param(3) IP address: 10 243 42 182
> > Lan Param(4) IP addr src: 01
> > Lan Param(5) MAC addr: 00 03 47 94 ff 46
> > Lan Param(6) Subnet mask: 255 255 255 0
> > Lan Param(7) IPv4 header: 40 40 10
> > Lan Param(10) BMC grat ARP : 01
> > Lan Param(11) grat ARP interval: 04
> > Lan Param(12) Def gateway IP: 10 243 42 251
> > Lan Param(13) Def gateway MAC: 00 05 9a da d3 fc
> > Lan Param(14) Sec gateway IP: 0 0 0 0
> > Lan Param(15) Sec g

[Freeipmi-devel] Re: Old libfreeipmi bug fix

2005-05-13 Thread Albert Chu
Hey Andrew,

I remember the patch.  I wasn't quite sure why it didn't make it into
0.1.3.  Then I looked at the tag and ChangeLog dates.  The fix was
applied post 0.1.3 :-(

By the way, I believe you want "from = sizeof(struct sockaddr_in)" in
your patch if you were applying it locally.  Also didn't we fix the
sequence numbering problem in ipmiutil userspace??  I dug up and e-mail
showing I gave you this:

  rv = ipmi_lan_cmd(sockfd, hostaddr, hostaddr_len,
auth_type, session_seqnum, session_id,
authcode, authcode_len,
netfn, IPMI_BMC_IPMB_LUN_BMC, (rq_seq %
 (IPMI_LAN_SEQ_NUM_MAX + 1)),
cmd_rq, tmpl_rq, cmd_rs, tmpl_rs);

Al

--
Albert Chu
[EMAIL PROTECTED]
Lawrence Livermore National Laboratory

- Original Message -
From: "Cress, Andrew R" <[EMAIL PROTECTED]>
Date: Friday, May 13, 2005 9:00 am
Subject: Old libfreeipmi bug fix

> Al,
> 
> For some reason, the fix from the thread below didn't get propagated
> into libfreeipmi-0.1.3. I ran into it again.
> I have attached the patch I applied to make it work for me.
> I also created bug #13076 for it, so we don't lose track of it again
> :-).
> 
> Andy 
> 
> -Original Message-
> From: Albert Chu [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 28, 2004 12:20 PM
> To: Cress, Andrew R
> Cc: freeipmi-devel@gnu.org
> Subject: Re: RE: [Freeipmi-devel] Using libfreeipmi interface
> 
> Hi Andrew,
> 
> You're right that it needs to be initialized, but I think it has to be
> initialized to sizeof(struct sockaddr_in).  _pkt_len is probably a 
> largeenough size that it just happened to work. 
> 
> Thanks for the catch 
> 
> Al
> 
> --
> Albert Chu
> [EMAIL PROTECTED]
> Lawrence Livermore National Laboratory
> 
> - Original Message -
> From: "Cress, Andrew R" <[EMAIL PROTECTED]>
> Date: Wednesday, October 27, 2004 2:09 pm
> Subject: RE: [Freeipmi-devel] Using libfreeipmi interface
> 
> > Albert,
> > 
> > I did find the problem that was causing the recvfrom to abort.
> > 
> > In libfreeipmi/src/ipmi-lan-interface.c at about line 699:
> >fromlen = _pkt_len;  /* added this, fromlen must be 
> initialized */
> >pkt_len = ipmi_lan_recvfrom (sockfd, pkt, _pkt_len, 0, 
> > (struct sockaddr *)&from, &fromlen);
> > There may be other places that call recvfrom where this change 
> > would be
> > needed also.
> > 
> > It works now, if the app is careful with sequence numbers.
> > 
> > Andy
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Cress, Andrew R
> > Sent: Wednesday, October 27, 2004 2:07 PM
> > To: Albert Chu
> > Cc: freeipmi-devel@gnu.org
> > Subject: RE: [Freeipmi-devel] Using libfreeipmi interface
> > 
> > 
> > Albert,
> > 
> > I have been able to get the kcs interface working with the FreeIPMI
> > library, but not yet the  LAN interface.  I'm using
> > ipmi_lan_open_session() and ipmi_lan_cmd(), and I put in some debug
> > statements in ipmi-lan-interface.c.
> > The ipmi_lan_open_session fails at the Get_Session_Challenge command
> > response.
> > I'm confused as to why ipmi_lan_recvfrom returns -1 for this 
> command.> The ipmipower app does get status ok, but gets "invalid 
> authtype" 
> > tryingto reset.
> > The remote node does respond to BMC LAN commands via other (Intel)
> > server management applications, and I've included its configuration
> > information below.
> > 
> > Attempting to open_session to remote node:
> > assemble_ipmi_lan_pkt complete cmd=38
> > ipmi_lan_sendto status = 23
> > ipmi_lan_recvfrom len = 30
> > unassemble complete
> > get_chan_auth rsp: 38 00 07 17 01 00 00 00 00 00
> > ipmi_comp_test complete status = 1
> > assemble_ipmi_lan_pkt complete cmd=39
> > get_sess_chal rq: 39 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> > 00 00
> > ipmi_lan_sendto status = 38
> > ipmi_lan_recvfrom len = -1
> > ipmi_lan_open_session: rv = -1 id=0
> > 
> > BMC LAN Configuration of remote node:
> > Lan Param(0) Set in progress: 00
> > Lan Param(1) Auth type support: 17
> > Lan Param(2) Auth type enables: 17 17 06 06 00
> > Lan Param(3) IP address: 10 243 42 182
> > Lan Param(4) IP addr src: 01
> > Lan Param(5) MAC addr: 00 03 47 94 ff 46
> > Lan Param(6) Subnet mask: 255 255 255 0
> > Lan Param(7) IPv4 header: 40 40 10
> > Lan Param(10) BMC grat ARP : 01
> > Lan Param(11) grat ARP interval: 04
> > Lan Param(12) Def gateway IP: 10 243 42 251
> > Lan Param(13) Def gateway MAC: 00 05 9a da d3 fc
> > Lan Param(14) Sec gateway IP: 0 0 0 0
> > Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00
> > Lan Param(16) Community string: public
> > Lan Param(17) Num dest: 04
> > Lan Param(18) Dest type: 01 00 01 00 69
> > Lan Param(19) Dest address: 01 00 00 [10 243 42 182] 00 03 47 94 
> ff 46
> > Lan Param(192) DHCP Server IP: 0 0 0 0
> > Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00
> > Lan Param(194) DHCP Enable: 00
> > GetChanAcc(lan), ret = 0, new value =