2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-27 19:37:44 +00:00

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
This commit is contained in:
Jarrod Johnson 2016-04-13 11:59:05 -04:00
parent a01e705ab7
commit 40eb4c014d

View File

@ -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