2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 11:57:37 +00:00

Clear DHCP buffer between recv

Very large PXE requests can leave residual
information that small, non-pxe requests will
interact poorly with, leading to spurious pxe-client
with cloned uuid of most recent large request.

Clearing between IO normalizes the state to avoid the bleed
over.
This commit is contained in:
Jarrod Johnson 2022-05-14 18:12:19 -04:00
parent 459c9a5210
commit 54741517f1

View File

@ -381,6 +381,7 @@ def snoop(handler, protocol=None, nodeguess=None):
if not ready or not ready[0]:
continue
for netc in ready[0]:
rawbuffer[:] = b'\x00' * 2048
idx = None
if netc == net4:
i = recvmsg(netc.fileno(), ctypes.pointer(msg), 0)