diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
index 6bf46b8..90816b0 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/cli/DhcpRelayCommand.java
@@ -109,7 +109,7 @@
         boolean toResetFlag;
 
         if (counter != null) {
-            if (counter.equals("counter") || reset.equals("[counter]")) {
+            if (counter.equals("counter") || counter.equals("[counter]")) {
                 print(CONUTER_HEADER);
             } else {
                 print("first parameter is [counter]");
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
index cf71aa2a..d60c6b0 100644
--- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
+++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/config/DhcpServerConfig.java
@@ -76,10 +76,18 @@
             if (node.isTextual()) {
                 IpAddress ip = IpAddress.valueOf(node.asText());
                 if (ip.isIp4() && serverIp4Addr == null) {
-                    serverIp4Addr = ip.getIp4Address();
+                  try {
+                      serverIp4Addr = ip.getIp4Address();
+                  } catch (IllegalArgumentException iae) {
+                      log.warn("Invalid IPv4 address {} found in DHCP server config. Ignored.", ip.toString());
+                  }
                 }
                 if (ip.isIp6() && serverIp6Addr == null) {
+                  try {
                     serverIp6Addr = ip.getIp6Address();
+                  } catch (IllegalArgumentException iae) {
+                      log.warn("Invalid IPv6 address {} found in DHCP server config. Ignored.", ip.toString());
+                  }
                 }
             }
         });
@@ -90,10 +98,18 @@
                 if (node.isTextual()) {
                     IpAddress ip = IpAddress.valueOf(node.asText());
                     if (ip.isIp4() && gatewayIp4Addr == null) {
-                        gatewayIp4Addr = ip.getIp4Address();
+                      try {
+                          gatewayIp4Addr = ip.getIp4Address();
+                      } catch (IllegalArgumentException iae) {
+                          log.warn("Invalid IPv4 address {} found in DHCP gateway config. Ignored.", ip.toString());
+                      }
                     }
                     if (ip.isIp6() && gatewayIp6Addr == null) {
-                        gatewayIp6Addr = ip.getIp6Address();
+                      try {
+                          gatewayIp6Addr = ip.getIp6Address();
+                      } catch (IllegalArgumentException iae) {
+                          log.warn("Invalid IPv6 address {} found in DHCP gateway config. Ignored.", ip.toString());
+                      }
                     }
                 }
             });
diff --git a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
index 89ed072..3de840e 100644
--- a/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
+++ b/web/api/src/main/java/org/onosproject/rest/resources/FlowsWebResource.java
@@ -29,6 +29,7 @@
 import org.onosproject.net.flow.FlowEntry;
 import org.onosproject.net.flow.FlowRule;
 import org.onosproject.net.flow.FlowRuleService;
+import org.onosproject.net.flow.IndexTableId;
 import org.onosproject.rest.AbstractWebResource;
 
 import javax.ws.rs.Consumes;
@@ -124,6 +125,31 @@
         return ok(root).build();
     }
 
+     /**
+     * Gets all flow entries for a table. Returns array of all flow rules for a table.
+     * @param tableId table identifier
+     * @return 200 OK with a collection of flows
+     * @onos.rsModel FlowEntries
+     */
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    @Path("table/{tableId}")
+    public Response getTableFlows(@PathParam("tableId") int tableId) {
+        final Iterable<Device> devices = get(DeviceService.class).getDevices();
+        for (final Device device : devices) {
+            final Iterable<FlowEntry> flowEntries = service.getFlowEntries(device.id());
+            if (flowEntries != null) {
+                for (final FlowEntry entry : flowEntries) {
+                    if (((IndexTableId) entry.table()).id() == tableId) {
+                       flowsNode.add(codec(FlowEntry.class).encode(entry, this));
+                    }
+                }
+            }
+        }
+
+        return ok(root).build();
+    }
+
     /**
      * Creates new flow rules. Creates and installs a new flow rules.<br>
      * Flow rule criteria and instruction description:
