VOL-2770 IGMPv2 should stay v2, not get converted to v3 for TT use-cases

"outgoingIgmpWithV3" config property added to igmpproxy config parameters.
When it is set to true, outgoing IGMP messages are converted to IGMPv3;
IGMPv2 otherwise.

Change-Id: I9f2f5c15d1073c91f7bd11677e3dd09896321e9e
diff --git a/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java b/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
index 11e28e5..b985b14 100644
--- a/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
+++ b/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
@@ -132,6 +132,7 @@
     private static ConnectPoint sourceDeviceAndPort = null;
     private static boolean enableIgmpProvisioning = false;
     private static boolean igmpOnPodBasis = false;
+    private static boolean outgoingIgmpWithV3 = true;
 
     private static final Integer MAX_PRIORITY = 10000;
     private static final String INSTALLED = "installed";
@@ -210,6 +211,10 @@
         return unSolicitedTimeout;
     }
 
+    public static boolean outgoingIgmpWithV3() {
+        return outgoingIgmpWithV3;
+    }
+
     protected BaseInformationService<SubscriberAndDeviceInformation> subsService;
 
     private List<Byte> validMembershipModes = Arrays.asList(MODE_IS_INCLUDE,  MODE_IS_EXCLUDE, CHANGE_TO_INCLUDE_MODE,
@@ -561,7 +566,7 @@
                             break;
 
                         default:
-                            log.warn("wrong IGMP v3 type:" + igmp.getIgmpType());
+                            log.warn("Unknown IGMP message type:" + igmp.getIgmpType());
                             igmpStatisticsManager.getIgmpStats().increaseInvalidIgmpMsgReceived();
                             igmpStatisticsManager.getIgmpStats().increaseUnknownIgmpTypePacketsRxCounter();
                             break;
@@ -870,6 +875,10 @@
             pimSSmInterworking = newCfg.pimSsmInterworking();
             enableIgmpProvisioning = newCfg.enableIgmpProvisioning();
             igmpOnPodBasis = newCfg.igmpOnPodBasis();
+            if (newCfg.outgoingIgmpWithV3() != null &&
+                    outgoingIgmpWithV3 != newCfg.outgoingIgmpWithV3()) {
+                outgoingIgmpWithV3 = newCfg.outgoingIgmpWithV3();
+            }
 
             if (connectPointMode != newCfg.connectPointMode() ||
                     connectPoint != newCfg.connectPoint()) {