Using clientMac address from the DHCP Layer in the logs
Change-Id: I40d93a241b56bd2350753b04dc6f72ad706d6e2d
diff --git a/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java b/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java
index 4514cdc..a765548 100755
--- a/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java
+++ b/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java
@@ -722,8 +722,11 @@
SubscriberAndDeviceInformation entry = null;
- log.info("Received DHCP Packet of type {} from {} with MacAddress {} and vlan {}",
- incomingPacketType, context.inPacket().receivedFrom(), packet.getSourceMAC(), packet.getVlanID());
+ MacAddress clientMacAddress = MacAddress.valueOf(dhcpPayload.getClientHardwareAddress());
+
+ log.info("Received DHCP Packet of type {} from {} with Client MacAddress {} and vlan {}",
+ incomingPacketType, context.inPacket().receivedFrom(),
+ clientMacAddress, packet.getVlanID());
switch (incomingPacketType) {
case DHCPDISCOVER: