Hi All, This patch fixes a bug introduced in CVS revision 1.70 of src/plugins/lan/lan.c.
Looks like someone forgot to put in braces around the 'if'. thanks dan From: Dan Gora <d...@adax.com> Date: Thu, 18 Apr 2013 17:38:45 -0300 Subject: [PATCH] Fix bug in plugins/lan/lan.c introduced in CVS revision 1.70. Fixed a bug where connecting to a remote shelf manager via the lan interface would always fail with: Activate Session error: Session sequence out of range Error: Unable to establish LAN session This is due to a bug introduced in get_random() where braces were missing from an error check. --- ipmitool/src/plugins/lan/lan.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ipmitool/src/plugins/lan/lan.c b/ipmitool/src/plugins/lan/lan.c index d371151..b107730 100644 --- a/ipmitool/src/plugins/lan/lan.c +++ b/ipmitool/src/plugins/lan/lan.c @@ -208,9 +208,10 @@ get_random(void *data, int len) if (fd < 0) return errno; - if (len < 0) + if (len < 0) { close(fd); return errno; /* XXX: ORLY? */ + } rv = read(fd, data, len); ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel