CORD-1030 Back porting bug fixes

- Disable BOS=0 flow and wait for the fix from brcm
- Fix two NPEs

Change-Id: I7db802ab77587509fc4db73624d52aa65f3a12b7
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index b3ef7b0..a4efb7f 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -493,12 +493,13 @@
             return false;
         }
         fwdObjs.addAll(fwdObjsMpls);
-        // Generates the transit rules used by the MPLS VPWS and by other tunnels.
-        fwdObjsMpls = handleMpls(targetSwId, destSwId, nextHops, segmentId, false);
+        // Generates the transit rules used by the MPLS Pwaas. For now it is
+        // the only case !BoS supported.
+        /*fwdObjsMpls = handleMpls(targetSwId, destSwId, nextHops, segmentId, routerIp, false);
         if (fwdObjsMpls.isEmpty()) {
             return false;
         }
-        fwdObjs.addAll(fwdObjsMpls);
+        fwdObjs.addAll(fwdObjsMpls);*/
 
         for (ForwardingObjective fwdObj : fwdObjs) {
             log.debug("Sending MPLS fwd obj {} for SID {}-> next {} in sw: {}",
diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3Pipeline.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3Pipeline.java
index 01bd28f..fe6cb2e 100644
--- a/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3Pipeline.java
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/Ofdpa3Pipeline.java
@@ -485,6 +485,10 @@
      * otherwise null
      */
     private ModTunnelIdInstruction getModTunnelIdInstruction(TrafficTreatment treatment) {
+        if (treatment == null) {
+            return null;
+        }
+
         L2ModificationInstruction l2ModificationInstruction;
         for (Instruction instruction : treatment.allInstructions()) {
             if (instruction.type() == L2MODIFICATION) {
@@ -506,6 +510,10 @@
      * otherwise null
      */
     private OutputInstruction getOutputInstruction(TrafficTreatment treatment) {
+        if (treatment == null) {
+            return null;
+        }
+
         for (Instruction instruction : treatment.allInstructions()) {
             if (instruction.type() == Instruction.Type.OUTPUT) {
                 return (OutputInstruction) instruction;