mirror of
https://opendev.org/x/pyghmi
synced 2025-01-13 19:27:48 +00:00
Ignore small packets claiming to be IPMI payload
A particular BMC had it's wires crossed and sent a stray SOL packet with the wrong payload type. We can't do anything to correctly process said packet without making a pretty wild assumption about it, so drop it with prejudice. Change-Id: I96e68a49f55d955cc57c3e52ce70b5932e29680e
This commit is contained in:
parent
d506f5142f
commit
ffd9c553ff
@ -1570,6 +1570,15 @@ class Session(object):
|
||||
# For now, skip the checksums since we are in LAN only,
|
||||
# TODO(jbjohnso): if implementing other channels, add checksum checks
|
||||
# here
|
||||
if len(payload) < 7:
|
||||
# This cannot possibly be a valid IPMI packet. Note this is after
|
||||
# the integrity checks, so this must be a buggy BMC packet
|
||||
# One example was a BMC that if receiving an SOL deactivate
|
||||
# from another party would emit what looks to be an attempt
|
||||
# at SOL deactivation payload, but with the wrong payload type
|
||||
# since we can't do anything remotely sane with such a packet,
|
||||
# drop it and carry about our business.
|
||||
return
|
||||
if self.servermode:
|
||||
self.seqlun = payload[4]
|
||||
self.clientaddr = payload[3]
|
||||
|
Loading…
x
Reference in New Issue
Block a user