From 54741517f10357b6a039e857d0645bb75e2fb4c0 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sat, 14 May 2022 18:12:19 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/discovery/protocols/pxe.py | 1 + 1 file changed, 1 insertion(+) diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index 906cc425..ca06cfba 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -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)