Merge "[VOL-3673] Adding per device filter to dhcpl2relay-allocations command"
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 c391605..7f523b9 100755
--- a/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java
+++ b/app/src/main/java/org/opencord/dhcpl2relay/impl/DhcpL2Relay.java
@@ -241,9 +241,6 @@
 
         //start the dhcp relay agent
         appId = coreService.registerApplication(DHCP_L2RELAY_APP);
-        // ensure that host-learning via dhcp includes IP addresses
-        componentConfigService.preSetProperty(HOST_LOC_PROVIDER,
-                                              "useDhcp", Boolean.TRUE.toString());
         componentConfigService.registerProperties(getClass());
         eventDispatcher.addSink(DhcpL2RelayEvent.class, listenerRegistry);
 
@@ -1031,7 +1028,9 @@
             } else {
                 option82.setAgentCircuitId(entry.circuitId());
             }
-            option82.setAgentRemoteId(entry.remoteId());
+            if (entry.remoteId() != null && !entry.remoteId().isBlank()) {
+                option82.setAgentRemoteId(entry.remoteId());
+            }
             if (log.isTraceEnabled()) {
                 log.trace("adding option82 {} ", option82);
             }