From 40eb4c014d4023be4ab591d6cd9319aa504bc718 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 13 Apr 2016 11:59:05 -0400 Subject: [PATCH] Be apathetic about endianness of SOL port number Some implementations are confused on the endianness of SOL port number. Recognize both 623 and 28418 as the default. This poses a challenge should the day come that non-standard port is desired, but it seems very unlikely for that to come up... Change-Id: Ib184a9102fd24a0c27d7a3f5adf86b8d1dca22ea --- pyghmi/ipmi/console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/console.py b/pyghmi/ipmi/console.py index f5bdab24..7aba51c9 100644 --- a/pyghmi/ipmi/console.py +++ b/pyghmi/ipmi/console.py @@ -124,7 +124,7 @@ class Console(object): #BMC tells us this is the maximum allowed size #data[6:7] is the promise of how small packets are going to be, but we #don't have any reason to worry about it - if (data[8] + (data[9] << 8)) != 623: + if (data[8] + (data[9] << 8)) not in (623, 28418): #TODO(jbjohnso): support atypical SOL port number raise NotImplementedError("Non-standard SOL Port Number") #ignore data[10:11] for now, the vlan detail, shouldn't matter to this