Fix usage of appendIfUnique

This commit is contained in:
2019-11-28 19:28:48 +01:00
parent c01d1f49c2
commit 27a06c0cd2
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ func HandleDHCPv4Packet(packet gopacket.Packet) error {
// Examine packet further
if dhcppacket.Operation == layers.DHCPOpRequest {
// Request packet
appendIfUnique(dhcppacket.ClientHWAddr.String(), requestMAC)
requestMAC = appendIfUnique(dhcppacket.ClientHWAddr.String(), requestMAC)
} else {
// Response/Offer packet
addResponseEntry(dhcppacket.ClientIP.String(), dhcppacket.YourClientIP.String(), dhcppacket.ClientHWAddr.String(), ethernetpacket.SrcMAC.String())