Fix NPE in LLDP link provider if there is no cluster metadata service available

If the cluster metadata service was previously shut down, the buildSrcMac()
method would throw an NPE. Now it returns the default mac if there is no
cluster metadata service available.'

Change-Id: Ibdb9b0b059a532af651814b8b954355ce644e4da
(cherry picked from commit ffde7afaec90e5741f66dfd26cc97600b29d91bb)
diff --git a/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/LldpLinkProvider.java b/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/LldpLinkProvider.java
index f7eda45..72b3ea3 100644
--- a/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/LldpLinkProvider.java
+++ b/providers/lldp/src/main/java/org/onosproject/provider/lldp/impl/LldpLinkProvider.java
@@ -235,8 +235,13 @@
     }
 
     private String buildSrcMac() {
-        String srcMac = ProbedLinkProvider.fingerprintMac(clusterMetadataService.getClusterMetadata());
         String defMac = ProbedLinkProvider.defaultMac();
+        if (clusterMetadataService == null) {
+            log.debug("No cluster metadata service is available. Using default value {}", defMac);
+            return defMac;
+        }
+
+        String srcMac = ProbedLinkProvider.fingerprintMac(clusterMetadataService.getClusterMetadata());
         if (srcMac.equals(defMac)) {
             log.warn("Couldn't generate fingerprint. Using default value {}", defMac);
             return defMac;