Make sure backup path satisfies constraints

Change-Id: Ifbf4815dc86a1ad2dcc9314649925d018eb3bb8e
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
index 5ab65be..ceeeaa6 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
@@ -105,6 +105,9 @@
      * @return true if the path passes all constraints
      */
     protected boolean checkPath(Path path, List<Constraint> constraints) {
+        if (path == null) {
+            return false;
+        }
         for (Constraint constraint : constraints) {
             if (!constraint.validate(path, resourceService::isAvailable)) {
                 return false;
@@ -174,6 +177,7 @@
         final List<Constraint> constraints = intent.constraints();
         ImmutableList<DisjointPath> filtered = FluentIterable.from(paths)
                 .filter(path -> checkPath(path, constraints))
+                .filter(path -> checkPath(path.backup(), constraints))
                 .toList();
         if (filtered.isEmpty()) {
             throw new PathNotFoundException(one, two);