engine: resources: Log dhcp mac addresses
Useful for identifying who is trying to connect when they're not in the system yet.
This commit is contained in:
@@ -818,6 +818,7 @@ func (obj *DHCPServerRes) handler4() func(net.PacketConn, net.Addr, *dhcpv4.DHCP
|
|||||||
return func(conn net.PacketConn, peer net.Addr, req *dhcpv4.DHCPv4) {
|
return func(conn net.PacketConn, peer net.Addr, req *dhcpv4.DHCPv4) {
|
||||||
// req is the incoming message from the dhcp client
|
// req is the incoming message from the dhcp client
|
||||||
// peer is who we're replying to (often a broadcast address)
|
// peer is who we're replying to (often a broadcast address)
|
||||||
|
obj.init.Logf("received a DHCPv4 packet from: %s", req.ClientHWAddr.String())
|
||||||
if obj.init.Debug {
|
if obj.init.Debug {
|
||||||
obj.init.Logf("received from DHCPv4 peer: %s", peer)
|
obj.init.Logf("received from DHCPv4 peer: %s", peer)
|
||||||
obj.init.Logf("received a DHCPv4 packet: %s", req.Summary())
|
obj.init.Logf("received a DHCPv4 packet: %s", req.Summary())
|
||||||
|
|||||||
Reference in New Issue
Block a user