diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index f8f1254f..5e5c98d4 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -755,6 +755,9 @@ def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, profile, sock=N if (not isboot) and relayip == b'\x00\x00\x00\x00': # Ignore local DHCP packets if it isn't a firmware request return + relayipa = None + if relayip != b'\x00\x00\x00\x00': + relayipa = socket.inet_ntoa(relayip) gateway = None netmask = None niccfg = netutil.get_nic_config(cfg, node, ifidx=info['netinfo']['ifidx'], relayipn=relayip) @@ -884,6 +887,8 @@ def reply_dhcp4(node, info, packet, cfg, reqview, httpboot, cfd, profile, sock=N ipinfo = 'with static address {0}'.format(niccfg['ipv4_address']) else: ipinfo = 'without address, served from {0}'.format(myip) + if relayipa: + ipinfo += ' (relayed to {} via {})'.format(relayipa, requestor[0]) if isboot: log.log({ 'info': 'Offering {0} boot {1} to {2}'.format(boottype, ipinfo, node)})