Phone app and iotcloud addition into the fourth benchmark and a few minor stuff
[iot2.git] / iotjava / iotruntime / master / RouterConfig.java
index 821922cc42a78dcf73bf68b0ca3411ce835779e2..760f3d25dc63d53a18bb5928f0f365941874c975 100644 (file)
@@ -159,6 +159,17 @@ public final class RouterConfig {
                }
        }
 
+       /**
+        * getAddressListObject() method returns the map from this class
+        * <p>
+        * This method is useful for MAC policy class so that it doesn't have
+        * to query the router again
+        */
+       public Map<String, String> getAddressListObject() {
+
+               return mapMACtoIPAdd;
+       }
+
        /**
         * getAddressList() method gets list of IP addresses
         * <p>
@@ -618,6 +629,9 @@ public final class RouterConfig {
                PrintWriter pwConfig = getPrintWriter(strConfigHost);
                // Configure NAT
                pwConfig.println("-t nat -A POSTROUTING -o eth0 -j MASQUERADE");
+               // Add the following 2 lines
+               pwConfig.println("-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT");
+               pwConfig.println("-A FORWARD -i wlan0 -o eth0 -j ACCEPT");
        }
 
        /**